diff --git a/include/common/valhalla/baldr/admin.h b/include/common/valhalla/baldr/admin.h index fe2cab2..329e6f9 100644 --- a/include/common/valhalla/baldr/admin.h +++ b/include/common/valhalla/baldr/admin.h @@ -1,9 +1,7 @@ #ifndef VALHALLA_BALDR_ADMIN_H_ #define VALHALLA_BALDR_ADMIN_H_ -#include #include -#include #include #include @@ -64,11 +62,11 @@ class Admin { uint32_t country_offset() const; protected: - uint32_t country_offset_; // country name offset - uint32_t state_offset_; // state name offset - std::array country_iso_{}; // country ISO3166-1 - std::array state_iso_{}; // state ISO3166-2 - char spare_[3]{}; // spare for byte alignment + uint32_t country_offset_; // country name offset + uint32_t state_offset_; // state name offset + char country_iso_[kCountryIso]{}; // country ISO3166-1 + char state_iso_[kStateIso]{}; // state ISO3166-2 + char spare_[3]{}; // spare for byte alignment }; } // namespace baldr diff --git a/include/common/valhalla/baldr/connectivity_map.h b/include/common/valhalla/baldr/connectivity_map.h index de6f0bd..26facc7 100644 --- a/include/common/valhalla/baldr/connectivity_map.h +++ b/include/common/valhalla/baldr/connectivity_map.h @@ -23,14 +23,6 @@ class connectivity_map_t { connectivity_map_t(const boost::property_tree::ptree& pt, const std::shared_ptr& graph_reader = {}); - /** - * Alternative to GetTiles() to query whether a level even exists, e.g. transit.# - * - * @param level the level to query - * @return boolean indicating whether a level even exists - */ - bool level_color_exists(const uint32_t level) const; - /** * Returns the color for the given graphid * @@ -47,9 +39,8 @@ class connectivity_map_t { * @param radius the radius of the circle * @return colors the colors of the tiles that intersect this circle at this level */ - std::unordered_set get_colors(const baldr::TileLevel& hierarchy_level, - const baldr::PathLocation& location, - float radius) const; + std::unordered_set + get_colors(uint32_t hierarchy_level, const baldr::PathLocation& location, float radius) const; /** * Returns the geojson representing the connectivity map diff --git a/include/common/valhalla/baldr/curl_tilegetter.h b/include/common/valhalla/baldr/curl_tilegetter.h index 3090fa3..1c063cd 100644 --- a/include/common/valhalla/baldr/curl_tilegetter.h +++ b/include/common/valhalla/baldr/curl_tilegetter.h @@ -1,11 +1,11 @@ #pragma once -#include -#include - #include #include +#include +#include + namespace valhalla { namespace baldr { @@ -55,21 +55,5 @@ class curl_tile_getter_t : public tile_getter_t { const interrupt_t* interrupt_ = nullptr; }; -/** - * @brief Build uri address to make remote call - * @name[in] tile_url Base url address - * @name[in] fname File to call for - * @name[in] remote_path This parameter is used only in testing - * @return full uri address - */ -inline std::string make_single_point_url(const std::string& tile_url, - const std::string& fname, - const std::string& remote_path = {}) { - static const std::string path_pattern{"{tilePath}"}; - auto id_pos = tile_url.find(path_pattern); - return tile_url.substr(0, id_pos) + remote_path + fname + - tile_url.substr(id_pos + path_pattern.size()); -} - } // namespace baldr } // namespace valhalla diff --git a/include/common/valhalla/baldr/datetime.h b/include/common/valhalla/baldr/datetime.h index ebb3fee..0285a64 100644 --- a/include/common/valhalla/baldr/datetime.h +++ b/include/common/valhalla/baldr/datetime.h @@ -12,28 +12,14 @@ #include #include -// date emits a warning otherwise for C++17, see -// https://github.com/valhalla/valhalla/pull/3878#issuecomment-1365487437 -#define HAS_UNCAUGHT_EXCEPTIONS 1 - -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif #include #include -#if defined(__GNUC__) && !defined(__clang__) -#pragma GCC diagnostic pop -#pragma GCC diagnostic pop -#endif #include #include #include -#include +#include namespace valhalla { namespace baldr { diff --git a/include/common/valhalla/baldr/directededge.h b/include/common/valhalla/baldr/directededge.h index 1ec4818..68b6c5c 100644 --- a/include/common/valhalla/baldr/directededge.h +++ b/include/common/valhalla/baldr/directededge.h @@ -327,20 +327,6 @@ class DirectedEdge { */ void set_bridge(const bool bridge); - /** - * Is this edge indoor? - * @return Returns true if this edge is indoor, false if not (outdoor). - */ - bool indoor() const { - return indoor_; - } - - /** - * Sets the flag indicating this edge is indoor. - * @param indoor True if the edge is indoor, false if not (outdoor). - */ - void set_indoor(const bool indoor); - /** * Get the HOV type (see graphconstants.h). */ @@ -564,17 +550,6 @@ class DirectedEdge { return static_cast(use_); } - /** - * Evaluates a basic set of conditions to determine if this directed edge is a valid potential - * member of a shortcut. This is used while forming and resolving shortcuts. - * @return true if the edge is not a shortcut, not related to transit and not under construction - */ - bool can_form_shortcut() const { - return !is_shortcut() && !bss_connection() && use() != Use::kTransitConnection && - use() != Use::kEgressConnection && use() != Use::kPlatformConnection && - use() != Use::kConstruction; - } - /** * Sets the specialized use type of this edge. * @param use Use of this edge. @@ -1087,29 +1062,6 @@ class DirectedEdge { return superseded_; } -#ifdef _WIN32 - // TODO: Workaround for missing strings.h on Windows. Replace with platform independent - // std::countr_zero in C++20 (see https://en.cppreference.com/w/cpp/numeric/countr_zero). - int ffs(int mask) const { - if (0 == mask) - return 0; - - int idx; - for (idx = 1; !(mask & 1); ++idx) - mask >>= 1; - return idx; - } -#endif - - /** - * Unlike superseded(), this does not return the raw mask but the shortcut index - * that was originally passed to set_superseded(). - * @return Returns the index of the set bit in the superseded mask. - */ - uint32_t superseded_idx() const { - return ffs(superseded_); - } - /** * Set the mask for whether this edge is superseded by a shortcut edge. * Superseded edges can be skipped unless downward transitions are allowed. @@ -1159,20 +1111,6 @@ class DirectedEdge { return bss_connection_; } - /** - * Set the flag indicating whether the edge is lit - * @param lit the edge's lit state - */ - void set_lit(const bool lit); - - /** - * Is the edge lit? - * @return Returns the edge's lit state - */ - bool lit() const { - return lit_; - } - /** * Create a json object representing this edge * @return Returns the json object @@ -1239,9 +1177,7 @@ class DirectedEdge { uint64_t stop_sign_ : 1; // Stop sign at end of the directed edge uint64_t yield_sign_ : 1; // Yield/give way sign at end of the directed edge uint64_t hov_type_ : 1; // if (is_hov_only()==true), this means (HOV2=0, HOV3=1) - uint64_t indoor_ : 1; // Is this edge indoor - uint64_t lit_ : 1; // Is the edge lit? - uint64_t spare4_ : 4; + uint64_t spare4_ : 6; // 5th 8-byte word uint64_t turntype_ : 24; // Turn type (see graphconstants.h) diff --git a/include/common/valhalla/baldr/double_bucket_queue.h b/include/common/valhalla/baldr/double_bucket_queue.h index 8975430..a6f6a64 100644 --- a/include/common/valhalla/baldr/double_bucket_queue.h +++ b/include/common/valhalla/baldr/double_bucket_queue.h @@ -200,9 +200,10 @@ template class DoubleBucketQueue final { * @return Returns the bucket that the cost lies within. */ bucket_t& get_bucket(const float cost) { - return (cost < currentcost_) ? *currentbucket_ - : (cost < maxcost_) ? buckets_[static_cast((cost - mincost_) * inv_)] - : overflowbucket_; + return (cost < currentcost_) + ? *currentbucket_ + : (cost < maxcost_) ? buckets_[static_cast((cost - mincost_) * inv_)] + : overflowbucket_; } /** diff --git a/include/common/valhalla/baldr/edgeinfo.h b/include/common/valhalla/baldr/edgeinfo.h index 8cdd19f..ed1506f 100644 --- a/include/common/valhalla/baldr/edgeinfo.h +++ b/include/common/valhalla/baldr/edgeinfo.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include @@ -152,16 +151,6 @@ class EdgeInfo { */ std::vector GetNames() const; - /** Convenience method to get the names and route number flags for an edge. - * - * This one does not calculate the types - * Like GetNamesAndTypes but without using memory for the types - * - * @param include_tagged_values Bool indicating whether or not to return the tagged values too - * @return Returns a list (vector) (name, route number flag) pairs - */ - std::vector> GetNames(bool include_tagged_values) const; - /** * Convenience method to get the names for an edge * @param only_pronunciations Bool indicating whether or not to return only the pronunciations @@ -171,13 +160,13 @@ class EdgeInfo { std::vector GetTaggedValues(bool only_pronunciations = false) const; /** - * Convenience method to get the names, route number flags and tag value type for an edge. + * Convenience method to get the names and route number flags for an edge. * @param include_tagged_values Bool indicating whether or not to return the tagged values too * - * @return Returns a list (vector) of name/route number flags/types tuples. + * @return Returns a list (vector) of name/route number pairs. */ - std::vector> - GetNamesAndTypes(bool include_tagged_names = false) const; + std::vector> GetNamesAndTypes(std::vector& types, + bool include_tagged_names = false) const; /** * Convenience method to get tags of the edge. @@ -223,20 +212,6 @@ class EdgeInfo { */ int8_t layer() const; - /** - * Get level of the edge. - * @see https://wiki.openstreetmap.org/wiki/Key:level - * @return layer index of the edge - */ - - std::string level() const; - /** - * Get layer:ref of the edge. - * @see https://wiki.openstreetmap.org/wiki/Key:level:ref - * @return layer index of the edge - */ - std::string level_ref() const; - /** * Returns json representing this object * @return json object diff --git a/include/common/valhalla/baldr/graphconstants.h b/include/common/valhalla/baldr/graphconstants.h index 6108a8a..9d82554 100644 --- a/include/common/valhalla/baldr/graphconstants.h +++ b/include/common/valhalla/baldr/graphconstants.h @@ -44,7 +44,7 @@ constexpr uint16_t kMotorcycleAccess = 1024; constexpr uint16_t kAllAccess = 4095; // Constant representing vehicular access types -constexpr uint16_t kVehicularAccess = kAutoAccess | kTruckAccess | kMopedAccess | kMotorcycleAccess | +constexpr uint32_t kVehicularAccess = kAutoAccess | kTruckAccess | kMopedAccess | kMotorcycleAccess | kTaxiAccess | kBusAccess | kHOVAccess; // Maximum number of transit records per tile and other max. transit @@ -103,11 +103,6 @@ constexpr uint32_t kMaxSpeedKph = std::max(kMaxTrafficSpeed, kMaxAssumedSpeed); // stretch, its unlikely to be good signal below this value constexpr uint32_t kMinSpeedKph = 5; // ~3 MPH -// Default Fixed Speed. This is the default fixed speed that is assumed. -// Unless otherwised specified no fixed speed will be assumed and speed will be -// calculated from costing algorithm. -constexpr uint32_t kDisableFixedSpeed = 0; // ~0 MPH - inline bool valid_speed(float speed) { return speed > kMinSpeedKph && speed < kMaxAssumedSpeed; } @@ -203,8 +198,7 @@ constexpr uint32_t kMaxCurvatureFactor = 15; constexpr uint32_t kMaxAddedTime = 255; // Elevation constants -// this is the minimum we support, i.e. -500 m would result in "no elevation" -constexpr float kNoElevationData = -500.0f; +constexpr float kNoElevationData = 32768.0f; // Node types. enum class NodeType : uint8_t { @@ -221,9 +215,7 @@ enum class NodeType : uint8_t { kMotorWayJunction = 9, // Highway = motorway_junction kBorderControl = 10, // Border control kTollGantry = 11, // Toll gantry - kSumpBuster = 12, // Sump Buster - kBuildingEntrance = 13, // Building entrance - kElevator = 14, // Elevator + kSumpBuster = 12 // Sump Buster }; inline std::string to_string(NodeType n) { static const std::unordered_map NodeTypeStrings = @@ -239,9 +231,7 @@ inline std::string to_string(NodeType n) { {static_cast(NodeType::kMotorWayJunction), "motor_way_junction"}, {static_cast(NodeType::kBorderControl), "border_control"}, {static_cast(NodeType::kTollGantry), "toll_gantry"}, - {static_cast(NodeType::kSumpBuster), "sump_buster"}, - {static_cast(NodeType::kBuildingEntrance), "building_entrance"}, - {static_cast(NodeType::kElevator), "elevator"}}; + {static_cast(NodeType::kSumpBuster), "sump_buster"}}; auto i = NodeTypeStrings.find(static_cast(n)); if (i == NodeTypeStrings.cend()) { @@ -306,29 +296,25 @@ enum class Use : uint8_t { kPedestrian = 28, kBridleway = 29, kPedestrianCrossing = 32, // cross walks - kElevator = 33, - kEscalator = 34, - kPlatform = 35, // Rest/Service Areas kRestArea = 30, kServiceArea = 31, - // Other... currently, either BSS Connection or unspecified service road + // Other... kOther = 40, // Ferry and rail ferry kFerry = 41, kRailFerry = 42, - kConstruction = 43, // Road under construction - // Transit specific uses. Must be last in the list kRail = 50, // Rail line kBus = 51, // Bus line - kEgressConnection = 52, // Connection egress <-> station - kPlatformConnection = 53, // Connection station <-> platform - kTransitConnection = 54, // Connection osm <-> egress + kEgressConnection = 52, // Connection to a egress node + kPlatformConnection = 53, // Connection to a platform node + kTransitConnection = 54, // Connection to multi-use transit stop + }; inline std::string to_string(Use u) { static const std::unordered_map UseStrings = { @@ -348,9 +334,7 @@ inline std::string to_string(Use u) { {static_cast(Use::kMountainBike), "mountain_bike"}, {static_cast(Use::kSidewalk), "sidewalk"}, {static_cast(Use::kFootway), "footway"}, - {static_cast(Use::kElevator), "elevator"}, {static_cast(Use::kSteps), "steps"}, - {static_cast(Use::kEscalator), "escalator"}, {static_cast(Use::kPath), "path"}, {static_cast(Use::kPedestrian), "pedestrian"}, {static_cast(Use::kBridleway), "bridleway"}, @@ -365,7 +349,6 @@ inline std::string to_string(Use u) { {static_cast(Use::kEgressConnection), "egress_connection"}, {static_cast(Use::kPlatformConnection), "platform_connnection"}, {static_cast(Use::kTransitConnection), "transit_connection"}, - {static_cast(Use::kConstruction), "construction"}, }; auto i = UseStrings.find(static_cast(u)); @@ -379,8 +362,6 @@ enum class TaggedValue : uint8_t { // must start at 1 due to nulls kLayer = 1, kPronunciation = 2, kBssInfo = 3, - kLevel = 4, - kLevelRef = 5, // we used to have bug when we encoded 1 and 2 as their ASCII codes, but not actual 1 and 2 values // see https://github.com/valhalla/valhalla/issues/3262 kTunnel = static_cast('1'), @@ -588,8 +569,7 @@ enum class AccessType : uint8_t { kMaxAxleLoad = 5, kTimedAllowed = 6, kTimedDenied = 7, - kDestinationAllowed = 8, - kMaxAxles = 9 + kDestinationAllowed = 8 }; // Minimum meters offset from start/end of shape for finding heading @@ -653,8 +633,7 @@ constexpr uint8_t kDefaultFlowMask = kFreeFlowMask | kConstrainedFlowMask | kPredictedFlowMask | kCurrentFlowMask; constexpr uint32_t kFreeFlowSecondOfDay = 60 * 60 * 0; // midnight constexpr uint32_t kConstrainedFlowSecondOfDay = 60 * 60 * 12; // noon -constexpr uint64_t kInvalidSecondsOfWeek = - 1048575; // invalid (20 bits - 1), Sunday 23:59:59 is 604799 +constexpr uint32_t kInvalidSecondsOfWeek = -1; // invalid // There is only 1 bit to store these values, do not exceed the value 1. enum class HOVEdgeType : uint8_t { kHOV2 = 0, kHOV3 = 1 }; diff --git a/include/common/valhalla/baldr/graphid.h b/include/common/valhalla/baldr/graphid.h index 7d0ff42..74b8724 100644 --- a/include/common/valhalla/baldr/graphid.h +++ b/include/common/valhalla/baldr/graphid.h @@ -71,15 +71,6 @@ struct GraphId { * @param value all the various bits rolled into one */ explicit GraphId(const uint64_t value) : value(value) { - if (tileid() > kMaxGraphTileId) { - throw std::logic_error("Tile id out of valid range"); - } - if (level() > kMaxGraphHierarchy) { - throw std::logic_error("Level out of valid range"); - } - if (id() > kMaxGraphId) { - throw std::logic_error("Id out of valid range"); - } } /** @@ -103,7 +94,7 @@ struct GraphId { * Gets the tile Id. * @return Returns the tile Id. */ - inline uint32_t tileid() const { + uint32_t tileid() const { return (value & 0x1fffff8) >> 3; } @@ -111,7 +102,7 @@ struct GraphId { * Gets the hierarchy level. * @return Returns the level. */ - inline uint32_t level() const { + uint32_t level() const { return (value & 0x7); } @@ -119,7 +110,7 @@ struct GraphId { * Gets the identifier within the hierarchy level. * @return Returns the unique identifier within the level. */ - inline uint32_t id() const { + uint32_t id() const { return (value & 0x3ffffe000000) >> 25; } @@ -148,7 +139,6 @@ struct GraphId { * @return boolean true if the id is valid */ bool Is_Valid() const { - // TODO: make this strict it should check the tile hierarchy not bit field widths return value != kInvalidGraphId; } @@ -165,7 +155,7 @@ struct GraphId { * Returns a value indicating the tile (level and tile id) of the graph Id. * @return Returns a 32 bit value. */ - inline uint32_t tile_value() const { + uint32_t tile_value() const { return (value & 0x1ffffff); } diff --git a/include/common/valhalla/baldr/graphreader.h b/include/common/valhalla/baldr/graphreader.h index c82526d..ac081bc 100644 --- a/include/common/valhalla/baldr/graphreader.h +++ b/include/common/valhalla/baldr/graphreader.h @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -158,8 +157,7 @@ class FlatTileCache : public TileCache { } inline uint32_t get_index(const GraphId& graphid) const { auto offset = get_offset(graphid); - // using max value to indicate invalid - return offset < cache_indices_.size() ? cache_indices_[offset] : midgard::invalid(); + return offset < cache_indices_.size() ? cache_indices_[offset] : -1; } // The actual cached GraphTile objects @@ -441,12 +439,9 @@ class GraphReader { * @param pt Property tree listing the configuration for the tile storage * @param tile_getter Object responsible for getting tiles by url. If nullptr default implementation * is in use. - * @param traffic_readonly Flag to indicate if memory-mapped traffic extract should be writeable or - * read-only (default). */ explicit GraphReader(const boost::property_tree::ptree& pt, - std::unique_ptr&& tile_getter = nullptr, - bool traffic_readonly = true); + std::unique_ptr&& tile_getter = nullptr); virtual ~GraphReader() = default; @@ -699,6 +694,22 @@ class GraphReader { */ std::vector RecoverShortcut(const GraphId& shortcutid); + /** + * Returns overall speeds for all relevant shortcuts, i.e. the ones + * containing traffic matched edge_ids + *@return Returns a map of shortcut IDs to recovered edge IDs + */ + std::unordered_map> GetAllShortcuts(); + + /** + * Returns the speed for an edge not covered by live speed + * NOTE: will not give live speed results, since we initialize the Actor without + * to be able to map-match properly + * @return Speed of an edge not covered by live speed + */ + + uint32_t GetEdgeSpeed(const uint64_t edge_id); + /** * Convenience method to get the relative edge density (from the * begin node of an edge). @@ -945,7 +956,7 @@ class GraphReader { protected: // (Tar) extract of tiles - the contents are empty if not being used struct tile_extract_t { - tile_extract_t(const boost::property_tree::ptree& pt, bool traffic_readonly = true); + tile_extract_t(const boost::property_tree::ptree& pt); // TODO: dont remove constness, and actually make graphtile read only? std::unordered_map> tiles; std::unordered_map> traffic_tiles; diff --git a/include/common/valhalla/baldr/graphtile.h b/include/common/valhalla/baldr/graphtile.h index e93c054..cda0782 100644 --- a/include/common/valhalla/baldr/graphtile.h +++ b/include/common/valhalla/baldr/graphtile.h @@ -111,17 +111,14 @@ class GraphTile { /** * Gets the directory like filename suffix given the graphId - * @param graphid Graph Id to construct filename. - * @param gzipped Modifies the suffix if you expect gzipped file names + * @param graphid Graph Id to construct filename. + * @param gzipped Modifies the suffix if you expect gzipped file names * @param is_file_path Determines the 1000 separator to be used for file or URL access - * @param tiles Allows passing a custom tile definition rather than pulling from static - * hierarchy, which is useful for testing * @return Returns a filename including directory path as a suffix to be appended to another uri */ static std::string FileSuffix(const GraphId& graphid, const std::string& suffix = valhalla::baldr::SUFFIX_NON_COMPRESSED, - bool is_file_path = true, - const TileLevel* tiles = nullptr); + bool is_file_path = true); /** * Get the tile Id given the full path to the file. @@ -224,43 +221,6 @@ class GraphTile { " directededgecount= " + std::to_string(header_->directededgecount())); } - /** - * Get a pointer to an edge extension . - * @param edge GraphId of the directed edge. - * @return Returns a pointer to the edge extension. - */ - const DirectedEdgeExt* ext_directededge(const GraphId& edge) const { - assert(edge.Tile_Base() == header_->graphid().Tile_Base()); - - // Testing against directededgecount since the number of directed edges - // should be the same as the number of directed edge extensions - if (edge.id() < header_->directededgecount()) { - return &ext_directededges_[edge.id()]; - } - throw std::runtime_error("GraphTile DirectedEdgeExt index out of bounds: " + - std::to_string(header_->graphid().tileid()) + "," + - std::to_string(header_->graphid().level()) + "," + - std::to_string(edge.id()) + - " directededgecount= " + std::to_string(header_->directededgecount())); - } - - /** - * Get a pointer to an edge extension. - * @param idx Index of the directed edge within the current tile. - * @return Returns a pointer to the edge. - */ - const DirectedEdgeExt* ext_directededge(const size_t idx) const { - // Testing against directededgecount since the number of directed edges - // should be the same as the number of directed edge extensions - if (idx < header_->directededgecount()) { - return &ext_directededges_[idx]; - } - throw std::runtime_error("GraphTile DirectedEdgeExt index out of bounds: " + - std::to_string(header_->graphid().tileid()) + "," + - std::to_string(header_->graphid().level()) + "," + std::to_string(idx) + - " directededgecount= " + std::to_string(header_->directededgecount())); - } - /** * Get an iterable set of directed edges from a node in this tile * @param node Node from which the edges leave @@ -285,30 +245,6 @@ class GraphTile { */ midgard::iterable_t GetDirectedEdges(const size_t idx) const; - /** - * Get an iterable set of directed edges extensions from a node in this tile - * @param node Node from which the edges leave - * @return returns an iterable collection of directed edges extensions - */ - midgard::iterable_t GetDirectedEdgeExts(const NodeInfo* node) const; - - /** - * Get an iterable set of directed edges extensions from a node in this tile - * @param node GraphId of the node from which the edges leave - * @return returns an iterable collection of directed edges extensions - */ - midgard::iterable_t GetDirectedEdgeExts(const GraphId& node) const; - - /** - * Get an iterable set of directed edges extensions from a node in this tile - * WARNING: this only returns edge extensions in this tile, edges at this node on another level - * will not be returned by this method, node transitions must be used - * - * @param idx Index of the node within the current tile - * @return returns an iterable collection of directed edges extensions - */ - midgard::iterable_t GetDirectedEdgeExts(const size_t idx) const; - /** * Convenience method to get opposing edge Id given a directed edge. * The end node of the directed edge must be in this tile. @@ -382,15 +318,6 @@ class GraphTile { return midgard::iterable_t{directededges_, header_->directededgecount()}; } - /** - * Get an iterable set of edge extensions in this tile - * @return returns an iterable collection of edge extensions - */ - midgard::iterable_t GetDirectedEdgeExts() const { - return midgard::iterable_t{ext_directededges_, - header_->directededgecount()}; - } - /** * Get a pointer to edge info. * @return Returns edge info. @@ -418,16 +345,6 @@ class GraphTile { const DirectedEdge* GetDirectedEdges(const uint32_t node_index, uint32_t& count, uint32_t& edge_index) const; - /** - * Convenience method to get the directed edge extensions originating at a node. - * @param node_index Node Id within this tile. - * @param count (OUT) Number of outbound edges - * @param edge_index (OUT) Index of the first outbound edge. - * @return Returns a pointer to the first outbound directed edge extension. - */ - const DirectedEdgeExt* - GetDirectedEdgeExts(const uint32_t node_index, uint32_t& count, uint32_t& edge_index) const; - /** * Convenience method to get the names for an edge * @param edge Directed edge @@ -627,7 +544,7 @@ class GraphTile { */ inline uint32_t GetSpeed(const DirectedEdge* de, uint8_t flow_mask = kConstrainedFlowMask, - uint64_t seconds = kInvalidSecondsOfWeek, + uint32_t seconds = kInvalidSecondsOfWeek, bool is_truck = false, uint8_t* flow_sources = nullptr, const uint64_t seconds_from_now = 0) const { @@ -703,7 +620,6 @@ class GraphTile { // fallback to constrained if time of week is within 7am to 7pm (or if no time was passed in) and // if the edge has constrained speed - // kInvalidSecondsOfWeek %= midgard::kSecondsPerDay = 12.1 seconds %= midgard::kSecondsPerDay; auto is_daytime = (25200 < seconds && seconds < 68400); if ((invalid_time || is_daytime) && (flow_mask & kConstrainedFlowMask) && diff --git a/include/common/valhalla/baldr/graphtileheader.h b/include/common/valhalla/baldr/graphtileheader.h index 41de45f..7789cea 100644 --- a/include/common/valhalla/baldr/graphtileheader.h +++ b/include/common/valhalla/baldr/graphtileheader.h @@ -1,7 +1,6 @@ #ifndef VALHALLA_BALDR_GRAPHTILEHEADER_H_ #define VALHALLA_BALDR_GRAPHTILEHEADER_H_ -#include #include #include #include @@ -188,7 +187,7 @@ class GraphTileHeader { * @return Returns the version of this tile. */ std::string version() const { - return version_.data(); + return version_; } /** @@ -591,7 +590,6 @@ class GraphTileHeader { } protected: - // TODO when c++20 bitfields can be initialized here // GraphId (tileid and level) of this tile. Data quality metrics. uint64_t graphid_ : 46; uint64_t density_ : 4; @@ -603,13 +601,13 @@ class GraphTileHeader { // TODO: in v4, don't store this its superfluous information, the graphid has all we need // Base lon, lat of the tile - std::pair base_ll_ = {0, 0}; + std::pair base_ll_; // baldr version. - std::array version_ = {}; + char version_[kMaxVersionSize]; // Dataset Id - uint64_t dataset_id_ = 0; + uint64_t dataset_id_; // Record counts (for fixed size records). Node and directed edge have a max of // kMaxGraphId which is 21 bits. @@ -665,36 +663,36 @@ class GraphTileHeader { // the GraphTileHeader structure and order of data within the structure does not change // this should be backwards compatible. Make sure use of bits from spareword* does not // exceed 128 bits. - uint64_t spareword0_ = 0; - uint64_t spareword1_ = 0; + uint64_t spareword0_; + uint64_t spareword1_; // Offsets to beginning of data (for variable size records) - uint32_t complex_restriction_forward_offset_ = 0; // Offset to complex restriction list - uint32_t complex_restriction_reverse_offset_ = 0; // Offset to complex restriction list - uint32_t edgeinfo_offset_ = 0; // Offset to edge info - uint32_t textlist_offset_ = 0; // Offset to text list + uint32_t complex_restriction_forward_offset_; // Offset to complex restriction list + uint32_t complex_restriction_reverse_offset_; // Offset to complex restriction list + uint32_t edgeinfo_offset_; // Offset to edge info + uint32_t textlist_offset_; // Offset to text list // Date the tile was created. Days since pivot date. - uint32_t date_created_ = 0; + uint32_t date_created_; // Offsets for each bin of the 5x5 grid (for search/lookup) - std::array bin_offsets_ = {}; + uint32_t bin_offsets_[kBinCount]; // Offset to beginning of the lane connectivity data - uint32_t lane_connectivity_offset_ = 0; + uint32_t lane_connectivity_offset_; // Offset to the beginning of the predicted speed data - uint32_t predictedspeeds_offset_ = 0; + uint32_t predictedspeeds_offset_; // GraphTile data size in bytes - uint32_t tile_size_ = 0; + uint32_t tile_size_; // Marks the end of this version of the tile with the rest of the slots // being available for growth. If you want to use one of the empty slots, // simply add a uint32_t some_offset_; just above empty_slots_ and decrease // kEmptySlots by 1. Note that you can ONLY add an offset here and NOT a // bitfield or union or anything like that - std::array empty_slots_ = {}; + uint32_t empty_slots_[kEmptySlots]; }; } // namespace baldr diff --git a/include/common/valhalla/baldr/json.h b/include/common/valhalla/baldr/json.h index 903aea0..ad59dee 100644 --- a/include/common/valhalla/baldr/json.h +++ b/include/common/valhalla/baldr/json.h @@ -2,7 +2,6 @@ #define VALHALLA_BALDR_JSON_H_ #include -#include #include #include #include @@ -111,7 +110,7 @@ class OstreamVisitor : public boost::static_visitor { ostream_ << "\\t"; break; default: - if (iscntrl(c)) { + if (c >= 0 && c < 32) { // format changes for json hex ostream_.setf(std::ios::hex, std::ios::basefield); ostream_.setf(std::ios::uppercase); diff --git a/include/common/valhalla/baldr/location.h b/include/common/valhalla/baldr/location.h index 2e1f566..e754f2c 100644 --- a/include/common/valhalla/baldr/location.h +++ b/include/common/valhalla/baldr/location.h @@ -2,12 +2,11 @@ #define VALHALLA_BALDR_LOCATION_H_ #include -#include #include #include #include -#include +#include namespace valhalla { namespace baldr { @@ -72,7 +71,7 @@ struct Location { unsigned long radius = 0, const PreferredSide& side = PreferredSide::EITHER, const SearchFilter& search_filter = SearchFilter(), - std::optional preferred_layer = {}); + boost::optional preferred_layer = {}); /** * equality. @@ -89,9 +88,14 @@ struct Location { // address of the location, probably should be its own more broken up structure std::string name_; std::string street_; + std::string city_; + std::string state_; + std::string zip_; + std::string country_; - std::optional date_time_; - std::optional heading_; + boost::optional date_time_; + boost::optional heading_; + boost::optional way_id_; // try to find candidates who are reachable from/to this many or more nodes // if a given candidate edge is reachable to/from less than this number of nodes its considered to @@ -112,9 +116,9 @@ struct Location { SearchFilter search_filter_; // coordinates of the location as used for altering the side of street - std::optional display_latlng_; + boost::optional display_latlng_; - std::optional preferred_layer_; + boost::optional preferred_layer_; protected: }; diff --git a/include/common/valhalla/baldr/nodeinfo.h b/include/common/valhalla/baldr/nodeinfo.h index 15c5fbb..fce922a 100644 --- a/include/common/valhalla/baldr/nodeinfo.h +++ b/include/common/valhalla/baldr/nodeinfo.h @@ -199,16 +199,6 @@ class NodeInfo { return static_cast(type_); } - /** - * Evaluates a basic set of conditions to determine if this node is eligible for contraction. - * @return true if the node has at least 2 edges and does not represent a fork, gate or toll booth. - */ - bool can_contract() const { - return edge_count() >= 2 && intersection() != IntersectionType::kFork && - type() != NodeType::kGate && type() != NodeType::kTollBooth && - type() != NodeType::kTollGantry && type() != NodeType::kSumpBuster; - } - /** * Set the node type. * @param type node type. @@ -368,13 +358,11 @@ class NodeInfo { /** * Get the connecting way id for a transit stop (stored in headings_ while transit data - * is connected to the road network). Returns 0 if unset or if used for lon lat + * is connected to the road network. * @return Returns the connecting way id for a transit stop. */ uint64_t connecting_wayid() const { - // if the last bit is unset this is a wayid (or unset or headings) for transit in/egress. we - // return 0 for the way id if a connection point (lon, lat) was encoded here instead - return headings_ >> 63 ? 0 : headings_; + return headings_; } /** @@ -383,23 +371,6 @@ class NodeInfo { */ void set_connecting_wayid(const uint64_t wayid); - /** - * Get the connection point location to be used for associating this transit station to the road - * network or an invalid point if it is unset - * @return the connection point or an invalid lon lat - */ - midgard::PointLL connecting_point() const { - // if the last bit is set this is a connection point for transit in/egress - return headings_ >> 63 ? midgard::PointLL(headings_) : midgard::PointLL(); - } - - /** - * Sets the connection point location to be used for associating this transit in/egress to the road - * network - * @param p the location where the in/egress should connect to the road network - */ - void set_connecting_point(const midgard::PointLL& p); - /** * Get the heading of the local edge given its local index. Supports * up to 8 local edges. Headings are stored rounded off to 2 degree @@ -501,12 +472,9 @@ class NodeInfo { uint64_t cash_only_toll_ : 1; // Is this toll cash only? uint64_t spare2_ : 17; - // For not transit levels its the headings of up to kMaxLocalEdgeIndex+1 local edges (rounded to - // nearest 2 degrees)for all other levels. - // Sadly we need to keep this for now because its used in map matching, otherwise we could remove it - // Also for transit levels (while building data only) it can be used for either the connecting way - // id for matching the connection point of the station to the edge or an encoded lon lat pair for - // the exact connection point. If the highest bit is set its a lon lat otherwise its a way id + // Headings of up to kMaxLocalEdgeIndex+1 local edges (rounded to nearest 2 degrees) + // for all other levels. Connecting way Id (for transit level) while data build occurs. + // Need to keep this in NodeInfo since it is used in map-matching. uint64_t headings_; }; diff --git a/include/common/valhalla/baldr/pathlocation.h b/include/common/valhalla/baldr/pathlocation.h index 4969fdd..c3b41ff 100644 --- a/include/common/valhalla/baldr/pathlocation.h +++ b/include/common/valhalla/baldr/pathlocation.h @@ -108,6 +108,18 @@ struct PathLocation : public Location { if (!pl.street_.empty()) { l->set_street(pl.street_); } + if (!pl.city_.empty()) { + l->set_city(pl.city_); + } + if (!pl.state_.empty()) { + l->set_state(pl.state_); + } + if (!pl.zip_.empty()) { + l->set_postal_code(pl.zip_); + } + if (!pl.country_.empty()) { + l->set_country(pl.country_); + } if (pl.date_time_) { l->set_date_time(*pl.date_time_); } @@ -119,6 +131,9 @@ struct PathLocation : public Location { if (pl.preferred_layer_) { l->set_preferred_layer(*pl.preferred_layer_); } + if (pl.way_id_) { + l->set_way_id(*pl.way_id_); + } l->set_minimum_reachability(std::max(pl.min_outbound_reach_, pl.min_inbound_reach_)); l->set_radius(pl.radius_); l->set_search_cutoff(pl.radius_ > pl.search_cutoff_ ? pl.radius_ : pl.search_cutoff_); @@ -131,7 +146,7 @@ struct PathLocation : public Location { l->mutable_search_filter()->set_exclude_ramp(pl.search_filter_.exclude_ramp_); l->mutable_search_filter()->set_exclude_closures(pl.search_filter_.exclude_closures_); - auto* path_edges = l->mutable_correlation()->mutable_edges(); + auto* path_edges = l->mutable_path_edges(); for (const auto& e : pl.edges) { auto* edge = path_edges->Add(); edge->set_graph_id(e.id); @@ -153,7 +168,7 @@ struct PathLocation : public Location { edge->set_heading(e.projected_heading); } - auto* filtered_edges = l->mutable_correlation()->mutable_filtered_edges(); + auto* filtered_edges = l->mutable_filtered_edges(); for (const auto& e : pl.filtered_edges) { auto* edge = filtered_edges->Add(); edge->set_graph_id(e.id); @@ -194,10 +209,25 @@ struct PathLocation : public Location { Location l({loc.ll().lng(), loc.ll().lat()}, fromPBF(loc.type()), loc.minimum_reachability(), loc.minimum_reachability(), loc.radius(), side, search_filter); - l.name_ = loc.name(); - l.street_ = loc.street(); - - if (!loc.date_time().empty()) { + if (loc.has_name_case()) { + l.name_ = loc.name(); + } + if (loc.has_street_case()) { + l.street_ = loc.street(); + } + if (loc.has_city_case()) { + l.city_ = loc.city(); + } + if (loc.has_state_case()) { + l.state_ = loc.state(); + } + if (loc.has_postal_code_case()) { + l.zip_ = loc.postal_code(); + } + if (loc.has_country_case()) { + l.country_ = loc.country(); + } + if (loc.has_date_time_case()) { l.date_time_ = loc.date_time(); } if (loc.has_heading_case()) { @@ -209,6 +239,9 @@ struct PathLocation : public Location { if (loc.has_node_snap_tolerance_case()) { l.node_snap_tolerance_ = loc.node_snap_tolerance(); } + if (loc.has_way_id_case()) { + l.way_id_ = loc.way_id(); + } if (loc.has_search_cutoff_case()) { l.search_cutoff_ = loc.search_cutoff(); } diff --git a/include/common/valhalla/baldr/streetname.h b/include/common/valhalla/baldr/streetname.h index 5266117..57421dc 100644 --- a/include/common/valhalla/baldr/streetname.h +++ b/include/common/valhalla/baldr/streetname.h @@ -2,10 +2,11 @@ #define VALHALLA_BALDR_STREETNAME_H_ #include -#include #include -#include +#include + +#include namespace valhalla { namespace baldr { @@ -25,7 +26,7 @@ class StreetName { */ StreetName(const std::string& value, const bool is_route_number, - const std::optional& pronunciation = std::nullopt); + const boost::optional& pronunciation = boost::none); virtual ~StreetName(); @@ -41,7 +42,7 @@ class StreetName { * Returns the pronunciation of this street name. * @return the pronunciation of this street name. */ - const std::optional& pronunciation() const; + const boost::optional& pronunciation() const; bool operator==(const StreetName& rhs) const; @@ -62,7 +63,7 @@ class StreetName { protected: std::string value_; bool is_route_number_; - std::optional pronunciation_; + boost::optional pronunciation_; }; } // namespace baldr diff --git a/include/common/valhalla/baldr/streetname_us.h b/include/common/valhalla/baldr/streetname_us.h index 5272940..0105663 100644 --- a/include/common/valhalla/baldr/streetname_us.h +++ b/include/common/valhalla/baldr/streetname_us.h @@ -2,10 +2,11 @@ #define VALHALLA_BALDR_STREETNAME_US_H_ #include -#include #include #include +#include + #include namespace valhalla { @@ -21,7 +22,7 @@ class StreetNameUs : public StreetName { */ StreetNameUs(const std::string& value, const bool is_route_number, - const std::optional& pronunciation = std::nullopt); + const boost::optional& pronunciation = boost::none); std::string GetPreDir() const override; diff --git a/include/common/valhalla/baldr/streetnames.h b/include/common/valhalla/baldr/streetnames.h index ee426f5..b94c02e 100644 --- a/include/common/valhalla/baldr/streetnames.h +++ b/include/common/valhalla/baldr/streetnames.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace valhalla { namespace baldr { diff --git a/include/common/valhalla/baldr/streetnames_factory.h b/include/common/valhalla/baldr/streetnames_factory.h index c47f3c0..f183c51 100644 --- a/include/common/valhalla/baldr/streetnames_factory.h +++ b/include/common/valhalla/baldr/streetnames_factory.h @@ -6,7 +6,7 @@ #include #include -#include +#include namespace valhalla { namespace baldr { diff --git a/include/common/valhalla/baldr/streetnames_us.h b/include/common/valhalla/baldr/streetnames_us.h index 4b01863..e7fe175 100644 --- a/include/common/valhalla/baldr/streetnames_us.h +++ b/include/common/valhalla/baldr/streetnames_us.h @@ -6,7 +6,7 @@ #include #include -#include +#include namespace valhalla { namespace baldr { diff --git a/include/common/valhalla/baldr/tilehierarchy.h b/include/common/valhalla/baldr/tilehierarchy.h index c18fcfb..9be7126 100644 --- a/include/common/valhalla/baldr/tilehierarchy.h +++ b/include/common/valhalla/baldr/tilehierarchy.h @@ -95,14 +95,6 @@ class TileHierarchy { * @return Returns a const reference to the tiling system for this level. */ static const midgard::Tiles& get_tiling(const uint8_t level); - - /** - * Returns the parent (containing tile with lower tile level) of a given tile id - * @param child_tile_id the child tiles graph id - * @return the tile id of the parent tile for the given child tiles id or invalid if already at the - * lowest level - */ - static GraphId parent(const GraphId& child_tile_id); }; } // namespace baldr diff --git a/include/common/valhalla/baldr/time_info.h b/include/common/valhalla/baldr/time_info.h index 20c11d2..b9bf55a 100644 --- a/include/common/valhalla/baldr/time_info.h +++ b/include/common/valhalla/baldr/time_info.h @@ -29,6 +29,7 @@ struct TimeInfo { // the ordinal second from the beginning of the week (starting monday at 00:00) // used to look up historical traffic as the route progresses + // this defaults to mondays at noon if no time is provided (for constrained flow lookup) uint64_t second_of_week : 20; // the distance in seconds from now @@ -45,7 +46,7 @@ struct TimeInfo { * @return TimeInfo structure */ static inline TimeInfo invalid() { - return {false, 0, 0, kInvalidSecondsOfWeek, 0, false, nullptr}; + return {false, 0, 0, kConstrainedFlowSecondOfDay, 0, false, nullptr}; } /** @@ -68,12 +69,12 @@ struct TimeInfo { baldr::DateTime::tz_sys_info_cache_t* tz_cache = nullptr, int default_timezone_index = baldr::DateTime::get_tz_db().to_index("Etc/UTC")) { // No time to to track - if (location.date_time().empty()) + if (!location.has_date_time_case()) return TimeInfo::invalid(); // Find the first edge whose end node has a valid timezone index and keep it int timezone_index = 0; - for (const auto& pe : location.correlation().edges()) { + for (const auto& pe : location.path_edges()) { graph_tile_ptr tile; const auto* edge = reader.directededge(baldr::GraphId(pe.graph_id()), tile); timezone_index = reader.GetTimezone(edge->endnode(), tile); @@ -137,7 +138,7 @@ struct TimeInfo { parsed_date = dt::get_formatted_date(date_time, true); } catch (...) { LOG_ERROR("Could not parse provided date_time: " + date_time); - return {false, 0, 0, kInvalidSecondsOfWeek, 0, false, nullptr}; + return {false, 0, 0, kConstrainedFlowSecondOfDay, 0, false, nullptr}; } const auto then_date = date::make_zoned(tz, parsed_date, date::choose::latest); uint64_t local_time = date::to_utc_time(then_date.get_sys_time()).time_since_epoch().count(); @@ -257,10 +258,6 @@ struct TimeInfo { return DateTime::seconds_to_date(local_time, dt::get_tz_db().from_index(timezone_index), false); } - uint32_t day_seconds() const { - return static_cast(second_of_week) % midgard::kSecondsPerDay; - } - // for unit tests bool operator==(const TimeInfo& ti) const { return valid == ti.valid && timezone_index == ti.timezone_index && local_time == ti.local_time && diff --git a/include/common/valhalla/baldr/transitdeparture.h b/include/common/valhalla/baldr/transitdeparture.h index 0e7ff88..106eedc 100644 --- a/include/common/valhalla/baldr/transitdeparture.h +++ b/include/common/valhalla/baldr/transitdeparture.h @@ -35,7 +35,7 @@ class TransitDeparture { * Constructor for a fixed departure time. * @param lineid Unique line Id within the tile * @param tripid Unique trip Id (spans tiles) - * @param routeindex Route index within the tile. + * @param routeid Route index within the tile. * @param blockid Block Id. * @param headsign_offset Offset to headsign within the text/name table. * @param departure_time Departure time (seconds from midnight) @@ -46,7 +46,7 @@ class TransitDeparture { */ TransitDeparture(const uint32_t lineid, const uint32_t tripid, - const uint32_t routeindex, + const uint32_t routeid, const uint32_t blockid, const uint32_t headsign_offset, const uint32_t departure_time, @@ -59,10 +59,10 @@ class TransitDeparture { * Constructor for a frequency based departure. * @param lineid Unique line Id within the tile * @param tripid Unique trip Id (spans tiles) - * @param routeindex Route index within the tile. + * @param routeid Route index within the tile. * @param blockid Block Id. * @param headsign_offset Offset to headsign within the text/name table. - * @param departure_time Start time for the frequency (seconds from midnight) + * @param start_time Departure time (seconds from midnight) * @param end_time End time for departures (seconds from midnight) * @param frequency Seconds between successive departures. * @param elapsed_time Elapsed time to next stop @@ -72,10 +72,10 @@ class TransitDeparture { */ TransitDeparture(const uint32_t lineid, const uint32_t tripid, - const uint32_t routeindex, + const uint32_t routeid, const uint32_t blockid, const uint32_t headsign_offset, - const uint32_t departure_time, + const uint32_t start_time, const uint32_t end_time, const uint32_t frequency, const uint32_t elapsed_time, @@ -110,10 +110,10 @@ class TransitDeparture { /** * Get the route index for this departure. - * @return Returns the internal route Index. + * @return Returns the internal route Id. */ - uint32_t routeindex() const { - return routeindex_; + uint32_t routeid() const { + return routeid_; } /** @@ -199,11 +199,11 @@ class TransitDeparture { bool operator<(const TransitDeparture& other) const; protected: - uint64_t lineid_ : 20; // Line Id - lookup departures by unique line - // Id (which indicates a unique departure / - // arrival stop pair. - uint64_t routeindex_ : 12; // Route index. - uint64_t tripid_ : 32; // TripId (internal). + uint64_t lineid_ : 20; // Line Id - lookup departures by unique line + // Id (which indicates a unique departure / + // arrival stop pair. + uint64_t routeid_ : 12; // Route index. + uint64_t tripid_ : 32; // TripId (internal). uint64_t blockid_ : 20; // Block Id uint64_t schedule_index_ : 12; // Schedule validity index diff --git a/include/common/valhalla/baldr/transitroute.h b/include/common/valhalla/baldr/transitroute.h index bab5f37..b3e114a 100644 --- a/include/common/valhalla/baldr/transitroute.h +++ b/include/common/valhalla/baldr/transitroute.h @@ -35,32 +35,32 @@ class TransitRoute { } /** - * Get the one stop Id offset for this route. - * @return Returns the one-stop Id offset. + * Get the TransitLand one stop Id offset for this route. + * @return Returns the TransitLand one-stop Id offset. */ uint32_t one_stop_offset() const { return one_stop_offset_; } /** - * Get the operator one stop Id offset for this route. - * @return Returns the operator one-stop Id offset. + * Get the TransitLand operator one stop Id offset for this route. + * @return Returns the TransitLand operator one-stop Id offset. */ uint32_t op_by_onestop_id_offset() const { return op_by_onestop_id_offset_; } /** - * Get the operator name offset for this route. - * @return Returns the operator name offset. + * Get the TransitLand operator name offset for this route. + * @return Returns the TransitLand operator name offset. */ uint32_t op_by_name_offset() const { return op_by_name_offset_; } /** - * Get the operator website offset for this route. - * @return Returns the operator website offset. + * Get the TransitLand operator website offset for this route. + * @return Returns the TransitLand operator website offset. */ uint32_t op_by_website_offset() const { return op_by_website_offset_; @@ -119,14 +119,14 @@ class TransitRoute { // Offsets in the text/name list uint64_t route_type_ : 8; // Internal route type - uint64_t one_stop_offset_ : 24; // onestop Id for this route. + uint64_t one_stop_offset_ : 24; // TransitLand onestop Id for this route. uint64_t spare1_ : 32; - uint64_t op_by_onestop_id_offset_ : 24; // operated by onestop id. - uint64_t op_by_name_offset_ : 24; // operated by name. + uint64_t op_by_onestop_id_offset_ : 24; // TransitLand operated by onestop id. + uint64_t op_by_name_offset_ : 24; // TransitLand operated by name. uint64_t spare2_ : 16; - uint64_t op_by_website_offset_ : 24; // operated by website. + uint64_t op_by_website_offset_ : 24; // TransitLand operated by website. uint64_t short_name_offset_ : 24; // Short route name. uint64_t spare3_ : 16; diff --git a/include/common/valhalla/baldr/transitstop.h b/include/common/valhalla/baldr/transitstop.h index ea2cfb7..60911c2 100644 --- a/include/common/valhalla/baldr/transitstop.h +++ b/include/common/valhalla/baldr/transitstop.h @@ -33,8 +33,8 @@ class TransitStop { } /** - * Get the one stop Id offset for the stop. - * @return Returns the one stop Id offset. + * Get the TransitLand one stop Id offset for the stop. + * @return Returns the TransitLand one stop Id offset. */ uint32_t one_stop_offset() const { return one_stop_offset_; @@ -69,7 +69,7 @@ class TransitStop { } protected: - uint64_t one_stop_offset_ : 24; // one stop Id offset. + uint64_t one_stop_offset_ : 24; // TransitLand one stop Id offset. uint64_t name_offset_ : 24; // Stop name offset in the text/name list. uint64_t generated_ : 1; uint64_t traversability_ : 2; diff --git a/include/common/valhalla/baldr/verbal_text_formatter.h b/include/common/valhalla/baldr/verbal_text_formatter.h index 1ec3319..b1f4eae 100644 --- a/include/common/valhalla/baldr/verbal_text_formatter.h +++ b/include/common/valhalla/baldr/verbal_text_formatter.h @@ -4,6 +4,8 @@ #include #include +#include + #include #include diff --git a/include/common/valhalla/baldr/verbal_text_formatter_us.h b/include/common/valhalla/baldr/verbal_text_formatter_us.h index b70bf1c..ef2ea4a 100644 --- a/include/common/valhalla/baldr/verbal_text_formatter_us.h +++ b/include/common/valhalla/baldr/verbal_text_formatter_us.h @@ -6,6 +6,8 @@ #include #include +#include + #include namespace valhalla { diff --git a/include/common/valhalla/baldr/verbal_text_formatter_us_tx.h b/include/common/valhalla/baldr/verbal_text_formatter_us_tx.h index b3f3781..3785b44 100644 --- a/include/common/valhalla/baldr/verbal_text_formatter_us_tx.h +++ b/include/common/valhalla/baldr/verbal_text_formatter_us_tx.h @@ -5,6 +5,8 @@ #include #include +#include + #include namespace valhalla { diff --git a/include/common/valhalla/config.h b/include/common/valhalla/config.h index c7b145f..73deef1 100644 --- a/include/common/valhalla/config.h +++ b/include/common/valhalla/config.h @@ -6,10 +6,7 @@ #define VALHALLA_STRINGIZE(A) VALHALLA_STRINGIZE_NX(A) /* Version number of package */ - -// clang-format off #define VALHALLA_VERSION VALHALLA_STRINGIZE(VALHALLA_VERSION_MAJOR) "." VALHALLA_STRINGIZE(VALHALLA_VERSION_MINOR) "." VALHALLA_STRINGIZE(VALHALLA_VERSION_PATCH) -// clang-format on /* Name of package */ #define PACKAGE "valhalla-" VALHALLA_VERSION @@ -31,3 +28,5 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION VALHALLA_VERSION + + diff --git a/include/common/valhalla/filesystem.h b/include/common/valhalla/filesystem.h index 605e02e..3b29773 100644 --- a/include/common/valhalla/filesystem.h +++ b/include/common/valhalla/filesystem.h @@ -11,14 +11,11 @@ #include #include #include -#include #include #include -#include #include #include #include -#include #include #ifdef _WIN32 @@ -494,76 +491,4 @@ inline std::chrono::time_point last_write_time(const return std::chrono::system_clock::from_time_t(FS_MTIME(s)); } -struct has_data_impl { - template ().data())> - static std::true_type test(int); - template static std::false_type test(...); -}; - -template struct has_data : decltype(has_data_impl::test(0)) {}; - -/** - * @brief Saves data to the path. - * @attention Will replace the contents in case if fpath already exists. Will create - * new directory if directory did not exist before hand. - * */ -template -typename std::enable_if::value, bool>::type inline save( - const std::string& fpath, - const Container& data = {}) { - if (fpath.empty()) - return false; - - auto dir = filesystem::path(fpath); - dir.replace_filename(""); - - filesystem::path tmp_location; - if (!filesystem::exists(dir) && !filesystem::create_directories(dir)) - return false; - - auto generate_tmp_suffix = []() -> std::string { - std::stringstream ss; - ss << ".tmp_" << std::this_thread::get_id() << "_" - << std::chrono::high_resolution_clock::now().time_since_epoch().count(); - return ss.str(); - }; - - // Technically this is a race condition but its super unlikely (famous last words) - while (tmp_location.string().empty() || filesystem::exists(tmp_location)) - tmp_location = fpath + generate_tmp_suffix(); - - std::ofstream file(tmp_location.string(), std::ios::out | std::ios::binary | std::ios::ate); - file.write(data.data(), data.size()); - file.close(); - - if (file.fail()) { - filesystem::remove(tmp_location); - return false; - } - - if (std::rename(tmp_location.c_str(), fpath.c_str())) { - filesystem::remove(tmp_location); - return false; - } - - return true; -} - -/** - * @brief Returns all regular files from the directory. - * @param[in] root_dir Directory to search files in. - * @attention Files returned in absolute path form. - * @return - * - in case of errors or invalid parameters empty container will be returned. - * */ -inline std::vector get_files(const std::string& root_dir) { - std::vector files; - for (filesystem::recursive_directory_iterator i(root_dir), end; i != end; ++i) { - if (i->is_regular_file() || i->is_symlink()) - files.push_back(i->path().string()); - } - - return files; -} - } // namespace filesystem diff --git a/include/common/valhalla/loki/polygon_search.h b/include/common/valhalla/loki/polygon_search.h index 0168a9c..b873b58 100644 --- a/include/common/valhalla/loki/polygon_search.h +++ b/include/common/valhalla/loki/polygon_search.h @@ -16,7 +16,7 @@ namespace loki { * */ std::unordered_set -edges_in_rings(const google::protobuf::RepeatedPtrField& rings, +edges_in_rings(const google::protobuf::RepeatedPtrField& rings, baldr::GraphReader& reader, const std::shared_ptr& costing, float max_length); diff --git a/include/common/valhalla/loki/worker.h b/include/common/valhalla/loki/worker.h index c1b24f2..8494d8c 100644 --- a/include/common/valhalla/loki/worker.h +++ b/include/common/valhalla/loki/worker.h @@ -48,13 +48,12 @@ class loki_worker_t : public service_worker_t { void set_interrupt(const std::function* interrupt) override; protected: - void parse_locations(google::protobuf::RepeatedPtrField* locations, - std::optional required_exception = valhalla_exception_t{ - 110}); + void parse_locations( + google::protobuf::RepeatedPtrField* locations, + boost::optional required_exception = valhalla_exception_t{110}); void parse_trace(Api& request); void parse_costing(Api& request, bool allow_none = false); void locations_from_shape(Api& request); - void check_hierarchy_distance(Api& request); void init_locate(Api& request); void init_route(Api& request); @@ -74,7 +73,6 @@ class loki_worker_t : public service_worker_t { std::unordered_map max_locations; std::unordered_map max_distance; std::unordered_map max_matrix_distance; - size_t max_timedep_dist_matrix; std::unordered_map max_matrix_locations; size_t max_exclude_locations; float max_exclude_polygons_length; @@ -105,9 +103,6 @@ class loki_worker_t : public service_worker_t { unsigned int max_alternates; bool allow_verbose; - // add max_distance_disable_hierarchy_culling - float max_distance_disable_hierarchy_culling; - private: std::string service_name() const override { return "loki"; diff --git a/include/common/valhalla/meili/map_matcher_factory.h b/include/common/valhalla/meili/map_matcher_factory.h index c5025f6..fa685f5 100644 --- a/include/common/valhalla/meili/map_matcher_factory.h +++ b/include/common/valhalla/meili/map_matcher_factory.h @@ -35,9 +35,9 @@ class MapMatcherFactory final { MapMatcher* Create(const Options& options); - MapMatcher* Create(const Costing::Type costing_type) { + MapMatcher* Create(const Costing costing) { Options options; - options.set_costing_type(costing_type); + options.set_costing(costing); return Create(options); } diff --git a/include/common/valhalla/meili/routing.h b/include/common/valhalla/meili/routing.h index a9a7495..9226776 100644 --- a/include/common/valhalla/meili/routing.h +++ b/include/common/valhalla/meili/routing.h @@ -305,14 +305,8 @@ find_shortest_path(baldr::GraphReader& reader, const float max_time); // Route path iterator. Methods to assist recovering route paths from Labels. -class RoutePathIterator { +class RoutePathIterator : public std::iterator { public: - using iterator_category = std::forward_iterator_tag; - using value_type = const Label; - using difference_type = std::ptrdiff_t; - using pointer = const Label*; - using reference = const Label&; - // Construct a route path iterator. RoutePathIterator(const LabelSet* labelset, const uint32_t label_idx) : labelset_(labelset), label_idx_(label_idx) { diff --git a/include/common/valhalla/meili/state.h b/include/common/valhalla/meili/state.h index 054110c..86fc80f 100644 --- a/include/common/valhalla/meili/state.h +++ b/include/common/valhalla/meili/state.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace valhalla { namespace meili { diff --git a/include/common/valhalla/meili/viterbi_search.h b/include/common/valhalla/meili/viterbi_search.h index 240994e..4fb481a 100644 --- a/include/common/valhalla/meili/viterbi_search.h +++ b/include/common/valhalla/meili/viterbi_search.h @@ -46,13 +46,8 @@ class StateLabel { class IViterbiSearch; // TODO test it -class StateIdIterator { +class StateIdIterator : public std::iterator { public: - using iterator_category = std::forward_iterator_tag; - using value_type = StateId; - using difference_type = std::ptrdiff_t; - using pointer = StateId*; - using reference = StateId&; StateIdIterator(IViterbiSearch& vs, StateId::Time time, const StateId& stateid, diff --git a/include/common/valhalla/midgard/aabb2.h b/include/common/valhalla/midgard/aabb2.h index 6bac119..7cbf028 100644 --- a/include/common/valhalla/midgard/aabb2.h +++ b/include/common/valhalla/midgard/aabb2.h @@ -232,6 +232,16 @@ template class AABB2 { */ uint32_t Clip(std::vector& pts, const bool closed) const; + /** + * Intersects the segment formed by u,v with the bounding box + * + * @param u the first point in the segment + * @param v the second point in the segment + * @return Returns true if the segment actually intersected the bounding box + * and moves u and v to actually reflect the intersection points + */ + bool Intersect(coord_t& u, coord_t& v) const; + /** * Expands (if necessary) the bounding box to include the specified * bounding box. diff --git a/include/common/valhalla/midgard/constants.h b/include/common/valhalla/midgard/constants.h index a734ca3..2ec38ad 100644 --- a/include/common/valhalla/midgard/constants.h +++ b/include/common/valhalla/midgard/constants.h @@ -26,7 +26,6 @@ constexpr float kFeetPerMeter = 3.2808399f; constexpr float kMetersPerKm = 1000.0f; constexpr float kKmPerMeter = 0.001f; constexpr float kMilePerKm = 0.621371f; -constexpr float kMilePerMeter = kMilePerKm / 1000; constexpr float kKmPerMile = 1.609344f; constexpr float kRadEarthMeters = 6378160.187f; constexpr double kMetersPerDegreeLat = 110567.0f; diff --git a/include/common/valhalla/midgard/point2.h b/include/common/valhalla/midgard/point2.h index bee8138..8c7277d 100644 --- a/include/common/valhalla/midgard/point2.h +++ b/include/common/valhalla/midgard/point2.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -196,15 +195,6 @@ template class PointXY : public std::pairfirst) + "," + std::to_string(this->second); - } }; using Point2 = PointXY; diff --git a/include/common/valhalla/midgard/pointll.h b/include/common/valhalla/midgard/pointll.h index 80ea089..af39afc 100644 --- a/include/common/valhalla/midgard/pointll.h +++ b/include/common/valhalla/midgard/pointll.h @@ -13,6 +13,8 @@ namespace midgard { namespace { constexpr double RAD_PER_METER = 1.0 / 6378160.187; +constexpr double RAD_PER_DEG = valhalla::midgard::kPiDouble / 180.0; +constexpr double DEG_PER_RAD = 180.0 / valhalla::midgard::kPiDouble; } // namespace constexpr double INVALID_LL = (double)0xBADBADBAD; /** @@ -37,39 +39,13 @@ template class GeoPoint : public PointXY { */ GeoPoint() : PointXY(INVALID_LL, INVALID_LL) { } - /** - * You can encode lon, lat (with 7 digit precision) into 64 bits with the lowest 31 bits for lat and - * upper 32 for lon and 1 extra unused bit for whatever you need.. this constructor throws if the - * values are out of valid lon and lat ranges - * @param encoded - */ - explicit GeoPoint(uint64_t encoded) - : PointXY(static_cast( - (int64_t((encoded >> 31) & ((1ull << 32) - 1)) - 180 * 1e7) * 1e-7), - static_cast( - (int64_t(encoded & ((1ull << 31) - 1)) - 90 * 1e7) * 1e-7)) { - } - /** - * Parent constructor. Forwards to parent. - */ - GeoPoint(const PointXY& p) : PointXY(p) { - } - virtual ~GeoPoint() { } /** - * cast the lon lat to a 64bit value with 7 decimals places of precision the layout is: - * bitfield { - * lat 31; - * lon 32; - * spare 1; - * } - * @return + * Parent constructor. Forwards to parent. */ - explicit operator uint64_t() const { - return (((uint64_t(first * 1e7) + uint64_t(180 * 1e7)) & ((1ull << 32) - 1)) << 31) | - ((uint64_t(second * 1e7) + uint64_t(90 * 1e7)) & ((1ull << 31) - 1)); + GeoPoint(const PointXY& p) : PointXY(p) { } /** @@ -96,14 +72,6 @@ template class GeoPoint : public PointXY { return first != INVALID_LL && second != INVALID_LL; }; - /** - * Checks whether the lon and lat coordinates fall within -180/180 and -90/90 respectively - * @return - */ - bool InRange() const { - return -180 <= first && first <= 180 && -90 <= second && second <= 90; - } - /** * Sets the coordinates to an invalid state */ diff --git a/include/common/valhalla/midgard/sequence.h b/include/common/valhalla/midgard/sequence.h index 7d4a7c3..ce517b1 100644 --- a/include/common/valhalla/midgard/sequence.h +++ b/include/common/valhalla/midgard/sequence.h @@ -154,7 +154,7 @@ template class mem_map { // create a new file to map with a given size void create(const std::string& new_file_name, size_t new_count, int advice = POSIX_MADV_NORMAL) { - decltype(stat::st_size) target_size = new_count * sizeof(T); + auto target_size = new_count * sizeof(T); struct stat s; if (stat(new_file_name.c_str(), &s) || s.st_size != target_size) { // open, create and truncate the file @@ -669,7 +669,6 @@ struct tar { size_t corrupt_blocks; tar(const std::string& tar_file, - bool readonly = true, bool regular_files_only = true, const std::function& from_index = nullptr) @@ -682,10 +681,11 @@ struct tar { throw std::runtime_error(tar_file + "(stat): invalid archive size " + std::to_string(s.st_size) + " with header size " + std::to_string(sizeof(header_t))); + return; } // map the file - mm.map(tar_file, s.st_size, POSIX_MADV_NORMAL, readonly); + mm.map_readonly(tar_file, s.st_size); // determine opposite of preferred path separator (needed to update OS-specific path separator) const char opp_sep = filesystem::path::preferred_separator == '/' ? '\\' : '/'; diff --git a/include/common/valhalla/midgard/tiles.h b/include/common/valhalla/midgard/tiles.h index 38ed910..54ecfc2 100644 --- a/include/common/valhalla/midgard/tiles.h +++ b/include/common/valhalla/midgard/tiles.h @@ -289,9 +289,9 @@ template class Tiles { * @return Returns the tile Id of the tile to the right/east. */ int32_t RightNeighbor(const int32_t tileid) const { - return (tileid - ((tileid / ncolumns_) * ncolumns_) < ncolumns_ - 1) ? tileid + 1 - : wrapx_ ? tileid - ncolumns_ + 1 - : tileid; + return (tileid - ((tileid / ncolumns_) * ncolumns_) < ncolumns_ - 1) + ? tileid + 1 + : wrapx_ ? tileid - ncolumns_ + 1 : tileid; } /** @@ -301,8 +301,7 @@ template class Tiles { */ int32_t LeftNeighbor(const int32_t tileid) const { return tileid - ((tileid / ncolumns_) * ncolumns_) > 0 ? tileid - 1 - : wrapx_ ? tileid + ncolumns_ - 1 - : tileid; + : wrapx_ ? tileid + ncolumns_ - 1 : tileid; } /** diff --git a/include/common/valhalla/midgard/util.h b/include/common/valhalla/midgard/util.h index a566515..81752e5 100644 --- a/include/common/valhalla/midgard/util.h +++ b/include/common/valhalla/midgard/util.h @@ -468,6 +468,27 @@ template struct iterable_t { template bool intersect(const coord_t& u, const coord_t& v, const coord_t& a, const coord_t& b, coord_t& i); +/** + * Return the intercept of the line passing through uv with the horizontal line defined by y + * @param u first point on line + * @param v second point on line + * @param y y component of horizontal line + * @return x component (or NaN if parallel) of the intercept of uv with the horizontal line + */ +template +typename coord_t::first_type +y_intercept(const coord_t& u, const coord_t& v, const typename coord_t::second_type y = 0); +/** + * Return the intercept of the line passing through uv with the vertical line defined by x + * @param u first point on line + * @param v second point on line + * @param x x component of vertical line + * @return y component (or NaN if parallel) of the intercept of uv with the vertical line + */ +template +typename coord_t::first_type +x_intercept(const coord_t& u, const coord_t& v, const typename coord_t::second_type x = 0); + /** * Compute the area of a polygon. If your polygon is not twisted or self intersecting * this will return a positive value for counterclockwise wound polygons and negative otherwise. @@ -697,29 +718,5 @@ unaligned_read(const void* ptr) { return r; } -/** - * For some variables, an ivalid value needs to be set as: the maximum value it's type can get - * @returns the invalid value of the type - */ -template numeric_t invalid() { - return std::numeric_limits::max(); -} - -/** - * For some variables, an ivalid value needs to be set as: the maximum value it's type can get - * @returns true when the value is invalid - */ -template bool is_invalid(numeric_t value) { - return value == invalid(); -} - -/** - * For some variables, an ivalid value needs to be set as: the maximum value it's type can get - * @returns true when the value is valid - */ -template bool is_valid(numeric_t value) { - return value != invalid(); -} - } // namespace midgard } // namespace valhalla diff --git a/include/common/valhalla/mjolnir/adminbuilder.h b/include/common/valhalla/mjolnir/adminbuilder.h index c63c179..425dd19 100644 --- a/include/common/valhalla/mjolnir/adminbuilder.h +++ b/include/common/valhalla/mjolnir/adminbuilder.h @@ -11,7 +11,7 @@ namespace valhalla { namespace mjolnir { -bool BuildAdminFromPBF(const boost::property_tree::ptree& pt, +void BuildAdminFromPBF(const boost::property_tree::ptree& pt, const std::vector& input_files); } } // namespace valhalla diff --git a/include/common/valhalla/mjolnir/adminconstants.h b/include/common/valhalla/mjolnir/adminconstants.h index add8004..bf60626 100644 --- a/include/common/valhalla/mjolnir/adminconstants.h +++ b/include/common/valhalla/mjolnir/adminconstants.h @@ -54,10 +54,10 @@ const std::unordered_map> (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, {"Brazil", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, - -1, -1}}, - {"China", - {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1, + {-1, -1, -1, + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1, + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, {"Denmark", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | @@ -66,9 +66,6 @@ const std::unordered_map> kMotorcycleAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"England", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, {"France", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), @@ -79,45 +76,23 @@ const std::unordered_map> {"Finland", {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - // Germany - no overrides - {"Greece", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, {"Hungary", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), -1, -1, -1, -1, -1, -1, -1}}, - {"Iceland", - {-1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"Ireland", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"Italy", - {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1, - -1, -1}}, - // Netherlands allows bicycle access on trunk and trunk link without motorroad = - // yes {"Netherlands", - {-1, -1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), + {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | + kMotorcycleAccess), + (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | + kMotorcycleAccess), + -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, {"Norway", {-1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"Northern Ireland", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"Oman", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, - {"Philippines", - {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, {"Poland", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), @@ -126,47 +101,39 @@ const std::unordered_map> -1, -1, -1, -1, -1, -1, -1}}, {"Romania", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | - kMotorcycleAccess | kBicycleAccess), + kMotorcycleAccess), (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | - kMotorcycleAccess | kBicycleAccess), + kMotorcycleAccess), -1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, {"Russia", {-1, -1, -1, -1, -1, -1, (kMopedAccess | kBicycleAccess), -1, -1}}, - {"Alba / Scotland", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, {"Slovakia", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), -1, -1, -1, -1, -1, -1, -1}}, - // Spain allows bicycle access on trunk and trunk link without motorroad = yes {"Spain", {-1, -1, -1, -1, -1, -1, -1, - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, - {"Sweden", - {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1, - -1}}, + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), + (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | + kMotorcycleAccess | kBicycleAccess)}}, {"Switzerland", {(kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), (kAutoAccess | kTruckAccess | kBusAccess | kHOVAccess | kTaxiAccess | kMotorcycleAccess), -1, -1, -1, -1, (kBicycleAccess | kMopedAccess), -1, -1}}, - {"Türkiye", + {"Turkey", {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess), -1, -1, -1}}, - // Ukraine - no overrides + {"United Kingdom", + {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}, {"United States", {-1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}, - {"Cymru / Wales", - {-1, -1, -1, -1, -1, (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), - (kPedestrianAccess | kWheelchairAccess | kBicycleAccess), -1, -1}}}; + (kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess), -1}}}; } // namespace mjolnir } // namespace valhalla #endif // VALHALLA_MJOLNIR_ADMINCONSTANTS_H_ diff --git a/include/common/valhalla/mjolnir/convert_transit.h b/include/common/valhalla/mjolnir/convert_transit.h deleted file mode 100644 index aeb2540..0000000 --- a/include/common/valhalla/mjolnir/convert_transit.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include -#include - -#include - -namespace valhalla { -namespace mjolnir { - -/** - * @brief Grabs protobufs written in ingest_transit and converts them into transit level tiles - * Non-transit graph tiles are also required to find locations where to connect the - * transit subgraph (nodes where we can add transit connect edges) - * @param pt Property tree containing the hierarchy configuration - * and other configuration needed to build transit. - * @return std::unordered_set all tiles created - */ -std::unordered_set convert_transit(const boost::property_tree::ptree& pt); -} // namespace mjolnir -} // namespace valhalla \ No newline at end of file diff --git a/include/common/valhalla/mjolnir/elevationbuilder.h b/include/common/valhalla/mjolnir/elevationbuilder.h index c3aff14..f0d7912 100644 --- a/include/common/valhalla/mjolnir/elevationbuilder.h +++ b/include/common/valhalla/mjolnir/elevationbuilder.h @@ -1,11 +1,8 @@ #ifndef VALHALLA_MJOLNIR_ELEVATIONBUILDER_H #define VALHALLA_MJOLNIR_ELEVATIONBUILDER_H -#include - #include - -#include "baldr/graphid.h" +#include namespace valhalla { namespace mjolnir { @@ -16,13 +13,9 @@ namespace mjolnir { class ElevationBuilder { public: /** - * @brief Add elevation information to the graph tiles. - * param[in] config Config file to set ElevationBuilder properties - * param[in] tile_ids Sequence of valhalla tile ids to build elevation tiles for. - * @attention It is considered that tiles are from the directory specified in config file. + * Add elevation information to the graph tiles. */ - static void Build(const boost::property_tree::ptree& config, - std::deque tile_ids = {}); + static void Build(const boost::property_tree::ptree& pt); }; } // namespace mjolnir diff --git a/include/common/valhalla/mjolnir/graphtilebuilder.h b/include/common/valhalla/mjolnir/graphtilebuilder.h index 74bdecc..c9d636f 100644 --- a/include/common/valhalla/mjolnir/graphtilebuilder.h +++ b/include/common/valhalla/mjolnir/graphtilebuilder.h @@ -87,12 +87,6 @@ class GraphTileBuilder : public baldr::GraphTile { */ std::vector& directededges(); - /** - * Gets the current list of directed edge extension (builders). - * @return Returns the directed edge extension builders. - */ - std::vector& directededges_ext(); - /** * Gets the current list of node transition (builders). * @return Returns a reference to node transition builders. @@ -339,13 +333,6 @@ class GraphTileBuilder : public baldr::GraphTile { */ DirectedEdge& directededge(const size_t idx); - /** - * Gets a directed edge extension from existing tile data. - * @param idx Index of the directed edge extension within the tile. - * @return Returns a reference to the directed edge extension. - */ - DirectedEdgeExt& directededge_ext(const size_t idx); - /** * Gets a pointer to directed edges within the list being built. * @param idx Index of the directed edge within the tile. @@ -354,14 +341,6 @@ class GraphTileBuilder : public baldr::GraphTile { */ const DirectedEdge* directededges(const size_t idx) const; - /** - * Gets a pointer to directed edge extensions within the list being built. - * @param idx Index of the directed edge within the tile. - * @return Returns a pointer to the directed edge extension builder (allows - * accessing all directed edge extensions from a node). - */ - const DirectedEdgeExt* directededges_ext(const size_t idx) const; - /** * Get the directed edge builder at the specified index. * @param idx Index of the directed edge builder. @@ -369,12 +348,8 @@ class GraphTileBuilder : public baldr::GraphTile { */ DirectedEdge& directededge_builder(const size_t idx); - /** - * Get the directed edge extension builder at the specified index. - * @param idx Index of the directed edge extension builder. - * @return Returns a reference to the directed edge extension builder. - */ - DirectedEdgeExt& directededge_ext_builder(const size_t idx); + // TODO - add access method to directededge_ext_builder if extended directed edge + // attributes are needed. /** * Gets a non-const access restriction from existing tile data. diff --git a/include/common/valhalla/mjolnir/ingest_transit.h b/include/common/valhalla/mjolnir/ingest_transit.h deleted file mode 100644 index 6fa3f98..0000000 --- a/include/common/valhalla/mjolnir/ingest_transit.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace valhalla { -namespace mjolnir { - -/** - * @brief Processes the data from 'select_transit_tiles' into GraphTiles, adding the data into the - * valhalla graph. - * - * @param pt Property tree containing the hierarchy configuration - * and other configuration needed to build transit. - * @return std::list dangling tiles that contain stop_pairs that go inter-tiles - */ -std::list ingest_transit(const boost::property_tree::ptree& pt); - -/** - * @brief Processes transit routes that go through multiple tiles and stitches the graphs that are - * connected. - * - * @param pt Property tree containing the hierarchy configuration - * and other configuration needed to build transit. - * @param dangling_tiles tiles where routes go past its boundaries - */ -void stitch_transit(const boost::property_tree::ptree& pt, std::list& dangling_tiles); - -/** - * @brief Get a protobuf file and create a Valhalla Transit tile according to its data - * - * @param file_name the path where target protobuf is located - * @param lock (optional) lock for threading - * @return Transit tile that is read from the protobuf data - */ -Transit read_pbf(const std::string& file_name, std::mutex& lock); -Transit read_pbf(const std::string& file_name); - -/** - * @brief writes transit information inside the tile to a protobuf - * - * @param tile contains transit data - * @param transit_tile destination where the protobuf is written - */ -void write_pbf(const Transit& tile, const filesystem::path& transit_tile); - -} // namespace mjolnir -} // namespace valhalla \ No newline at end of file diff --git a/include/common/valhalla/mjolnir/node_expander.h b/include/common/valhalla/mjolnir/node_expander.h index 00fbc7f..c8ef8d0 100644 --- a/include/common/valhalla/mjolnir/node_expander.h +++ b/include/common/valhalla/mjolnir/node_expander.h @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -35,6 +34,8 @@ struct Edge { struct EdgeAttributes { uint64_t llcount : 16; uint64_t importance : 3; + uint64_t driveableforward : 1; + uint64_t driveablereverse : 1; uint64_t traffic_signal : 1; uint64_t forward_signal : 1; uint64_t backward_signal : 1; @@ -59,7 +60,7 @@ struct Edge { uint64_t turn_channel : 1; // Link edge should be a turn channel uint64_t way_begin : 1; // True if first edge of way uint64_t way_end : 1; // True if last edge of way - uint64_t spare : 25; + uint64_t spare : 23; }; EdgeAttributes attributes; @@ -69,10 +70,6 @@ struct Edge { // index of the target (end) node of the edge uint32_t targetnode_; - // to record the access of an edge - uint16_t fwd_access; - uint16_t rev_access; - /** * For now you cant be valid if you dont have any shape * @return true if the edge has at least 1 shape point @@ -92,18 +89,20 @@ struct Edge { const uint32_t llindex, const OSMWay& way, const bool infer_turn_channels) { - // TODO(nils): include a "motorvehicle_fwd/rev" in lua/OSMWay? - bool drive_fwd = way.auto_forward() || way.truck_forward() || way.bus_forward() || - way.moped_forward() || way.motorcycle_forward() || way.hov_forward() || - way.taxi_forward(); - bool drive_rev = way.auto_backward() || way.truck_backward() || way.bus_backward() || - way.moped_backward() || way.motorcycle_backward() || way.hov_backward() || - way.taxi_backward(); Edge e{wayindex, llindex}; e.attributes.llcount = 1; e.attributes.importance = static_cast(way.road_class()); + if (way.use() == baldr::Use::kEmergencyAccess) { + // Temporary until all access values are set + e.attributes.driveableforward = false; + e.attributes.driveablereverse = false; + } else { + e.attributes.driveableforward = way.auto_forward(); + e.attributes.driveablereverse = way.auto_backward(); + } e.attributes.link = way.link(); - e.attributes.driveable_ferry = (way.ferry() || way.rail()) && (drive_fwd || drive_rev); + e.attributes.driveable_ferry = + (way.ferry() || way.rail()) && (way.auto_forward() || way.auto_backward()); e.attributes.reclass_link = false; e.attributes.reclass_ferry = false; e.attributes.has_names = @@ -117,59 +116,6 @@ struct Edge { e.attributes.turn_channel = true; else e.attributes.turn_channel = false; - - // set the access masks - e.fwd_access = 0; - e.rev_access = 0; - - // don't set access for emergency uses - if (way.use() == baldr::Use::kEmergencyAccess) { - return e; - } - - if (way.auto_forward()) { - e.fwd_access |= baldr::kAutoAccess; - } - if (way.auto_backward()) { - e.rev_access |= baldr::kAutoAccess; - } - if (way.truck_forward()) { - e.fwd_access |= baldr::kTruckAccess; - } - if (way.truck_backward()) { - e.rev_access |= baldr::kTruckAccess; - } - if (way.bus_forward()) { - e.fwd_access |= baldr::kBusAccess; - } - if (way.bus_backward()) { - e.rev_access |= baldr::kBusAccess; - } - if (way.moped_forward()) { - e.fwd_access |= baldr::kMopedAccess; - } - if (way.moped_backward()) { - e.rev_access |= baldr::kMopedAccess; - } - if (way.motorcycle_forward()) { - e.fwd_access |= baldr::kMotorcycleAccess; - } - if (way.motorcycle_backward()) { - e.rev_access |= baldr::kMotorcycleAccess; - } - if (way.hov_forward()) { - e.fwd_access |= baldr::kHOVAccess; - } - if (way.hov_backward()) { - e.rev_access |= baldr::kHOVAccess; - } - if (way.taxi_forward()) { - e.fwd_access |= baldr::kTaxiAccess; - } - if (way.taxi_backward()) { - e.rev_access |= baldr::kTaxiAccess; - } - return e; } diff --git a/include/common/valhalla/mjolnir/osmadmin.h b/include/common/valhalla/mjolnir/osmadmin.h new file mode 100644 index 0000000..8ebbb69 --- /dev/null +++ b/include/common/valhalla/mjolnir/osmadmin.h @@ -0,0 +1,193 @@ +#ifndef VALHALLA_MJOLNIR_OSMADMIN_H +#define VALHALLA_MJOLNIR_OSMADMIN_H + +#include +#include +#include + +#include +#include + +using namespace valhalla::midgard; + +namespace valhalla { +namespace mjolnir { + +constexpr uint32_t kMaxMembersPerAdmin = 65535; + +// OSM Admin +struct OSMAdmin { + + /** + * Set admin id. + * @param id admin id + */ + void set_admin_id(const uint64_t id) { + osmrelationid_ = id; + } + + /** + * Get the admin id + * @return Returns admin id. + */ + uint64_t admin_id() const { + return osmrelationid_; + } + + /** + * Set the ways list. + * @param ways Ways for this admin. + */ + void set_ways(const std::list& ways) { + ways_ = ways; + } + + /** + * Get the ways for this admin. + * @return Returns the ways for this admin + */ + std::list ways() const { + return ways_; + } + + /** + * Set the number of members/ways for this admin. + * @param count Number of ways for this admin. + */ + void set_member_count(const uint32_t count) { + memberid_count_ = count; + } + + /** + * Get the number of members/ways for this admin. + */ + uint32_t member_count() const { + return memberid_count_; + } + + /** + * Sets the index for name + * @param idx Index for the name. + */ + void set_name_index(const uint32_t idx) { + name_index_ = idx; + } + + /** + * Get the name index. + * @return Returns the index for the name. + */ + uint32_t name_index() const { + return name_index_; + } + + /** + * Sets the index for name:en + * @param idx Index for the English name. + */ + void set_name_en_index(const uint32_t idx) { + name_en_index_ = idx; + } + + /** + * Get the name:en index. + * @return Returns the index for the English name. + */ + uint32_t name_en_index() const { + return name_en_index_; + } + + /** + * Sets the index for iso code + * @param idx Index for the iso code. + */ + void set_iso_code_index(const uint32_t idx) { + iso_code_index_ = idx; + } + + /** + * Get the iso code index. + * @return Returns the index for the iso code. + */ + uint32_t iso_code_index() const { + return iso_code_index_; + } + + /** + * Set admin level. + * @param level admin level + */ + void set_admin_level(const uint32_t level) { + admin_level_ = level; + } + + /** + * Get the admin level + * @return Returns admin level. + */ + uint32_t admin_level() const { + return admin_level_; + } + + /** + * Set drive on right. + * @param drive_on_right + */ + void set_drive_on_right(const bool drive_on_right) { + drive_on_right_ = drive_on_right; + } + + /** + * Get the drive on right flag. + * @return Drive on right? + */ + bool drive_on_right() const { + return drive_on_right_; + } + + /** + * Set allow intersection names + * @param allow_intersection_names + */ + void set_allow_intersection_names(const bool allow_intersection_names) { + allow_intersection_names_ = allow_intersection_names; + } + + /** + * Get the allow intersection names flag. + * @return allow intersection names? + */ + bool allow_intersection_names() const { + return allow_intersection_names_; + } + + // OSM admin/relation id + uint64_t osmrelationid_; + + // List of ways/member ids + std::list ways_; + + // Names of country or state/prov + uint32_t name_index_; + uint32_t name_en_index_; + + // ISO code + uint32_t iso_code_index_; + + // Count of members. + uint16_t memberid_count_; + + // Admin level. 2 = country; 4 = state. + uint8_t admin_level_; + + // drive on right side of the road in this country? + bool drive_on_right_; + + // do we call out intersection names at intersections? + bool allow_intersection_names_; +}; + +} // namespace mjolnir +} // namespace valhalla + +#endif // VALHALLA_MJOLNIR_OSMADMIN_H diff --git a/include/common/valhalla/mjolnir/osmadmindata.h b/include/common/valhalla/mjolnir/osmadmindata.h index 41f2189..c3221f4 100644 --- a/include/common/valhalla/mjolnir/osmadmindata.h +++ b/include/common/valhalla/mjolnir/osmadmindata.h @@ -1,43 +1,19 @@ -#pragma once +#ifndef VALHALLA_MJOLNIR_OSMADMINDATA_H +#define VALHALLA_MJOLNIR_OSMADMINDATA_H #include #include #include #include -#include +#include #include namespace valhalla { namespace mjolnir { -// OSM Admin -struct OSMAdmin { - // The relations id - uint64_t id; - - // List of ways/member ids - std::vector ways; - - // Parallel list of way roles (outer==true or inner==false) - std::vector roles; - - // Names of country or state/prov - uint32_t name_index; - uint32_t name_en_index; - - // ISO code - uint32_t iso_code_index; - - // Admin level. 2 = country; 4 = state. - uint8_t admin_level; - - // drive on right side of the road in this country? - bool drive_on_right; - - // do we call out intersection names at intersections? - bool allow_intersection_names; -}; +using OSMWayMap = std::unordered_map>; +using OSMShapeMap = std::unordered_map; /** * Simple container for OSM data used by admin processing. @@ -52,15 +28,17 @@ struct OSMAdminData { // Unique names used by admin areas UniqueNames name_offset_map; - // Map of member way id to node id - std::unordered_map> way_map; + // Map used in admins to store the shape of the nodes. + OSMShapeMap shape_map; - // Map of node id to shape point - std::unordered_map shape_map; + // Map used in admins to store the ways. + OSMWayMap way_map; // Vector of admins. - std::vector admins; + std::vector admins_; }; } // namespace mjolnir -} // namespace valhalla \ No newline at end of file +} // namespace valhalla + +#endif // VALHALLA_MJOLNIR_OSMADMINDATA_H diff --git a/include/common/valhalla/mjolnir/osmway.h b/include/common/valhalla/mjolnir/osmway.h index ab60575..efa3a51 100644 --- a/include/common/valhalla/mjolnir/osmway.h +++ b/include/common/valhalla/mjolnir/osmway.h @@ -1289,22 +1289,6 @@ struct OSMWay { return bridge_; } - /** - * Sets the indoor flag. - * @param indoor True if the edge is indoor, false if not (outdoor). - */ - void set_indoor(const bool indoor) { - indoor_ = indoor; - } - - /** - * Get the indoor flag. - * @return Returns indoor flag. - */ - bool indoor() const { - return indoor_; - } - /** * Sets the HOV Type. * @param hov_type @@ -1650,56 +1634,6 @@ struct OSMWay { return layer_; } - /** - * Sets the index for level - * @param idx Index for the level. - */ - void set_level_index(const uint32_t idx) { - level_index_ = idx; - } - - /** - * Get the level index. - * @return Returns the index for the level. - */ - uint32_t level_index() const { - return level_index_; - } - - /** - * Sets the index for level_ref - * @param idx Index for the level_ref - */ - void set_level_ref_index(const uint32_t idx) { - level_ref_index_ = idx; - } - - /** - * Get the level_ref index. - * @return Returns the index for the level_ref. - */ - uint32_t level_ref_index() const { - return level_ref_index_; - } - - /** - * Sets the lit state - * - * @param lit whether the way is lit. - */ - void set_lit(const bool lit) { - lit_ = lit; - } - - /** - * Get the lit state. - * - * @return bool - */ - bool lit() const { - return lit_; - } - /** * Get the names for the edge info based on the road class. * @param ref updated refs from relations. @@ -1757,10 +1691,6 @@ struct OSMWay { uint32_t destination_street_to_index_; uint32_t junction_ref_index_; - // level and level:ref of the way - uint32_t level_index_; - uint32_t level_ref_index_; - // Bike network information. TODO - these are not yet used. // uint32_t bike_national_ref_index_; // uint32_t bike_regional_ref_index_; @@ -1806,11 +1736,12 @@ struct OSMWay { uint32_t turn_channel_ : 1; // *link tag - turn channel (no ramp) uint32_t wheelchair_ : 1; uint32_t wheelchair_tag_ : 1; + uint32_t spare0_ : 1; uint32_t has_user_tags_ : 1; uint32_t has_pronunciation_tags_ : 1; uint32_t internal_ : 1; uint32_t hov_type_ : 1; - uint32_t indoor_ : 1; + uint32_t spare1_ : 1; uint32_t pedestrian_forward_ : 1; uint32_t pedestrian_backward_ : 1; @@ -1843,8 +1774,7 @@ struct OSMWay { uint16_t use_sidepath_ : 1; uint16_t bike_forward_ : 1; uint16_t bike_backward_ : 1; - bool lit_ : 1; - uint16_t spare2_ : 3; + uint16_t spare2_ : 4; uint16_t nodecount_; diff --git a/include/common/valhalla/mjolnir/transitbuilder.h b/include/common/valhalla/mjolnir/transitbuilder.h index ec15958..5c9d4c6 100644 --- a/include/common/valhalla/mjolnir/transitbuilder.h +++ b/include/common/valhalla/mjolnir/transitbuilder.h @@ -13,18 +13,7 @@ namespace mjolnir { class TransitBuilder { public: /** - * Add transit information to the graph tiles. At present this is called during the larger tileset - * build. This somewhat simplifies the updates that need to be done on the existing tiles to make - * the connection between the two graphs. Mainly because there are no hierarchies, no spatial - * index, no restrictions. - * - * TODO: rework the tile update methods to be sensitive to hierarchy (transitions), binned edges and - * restrictions. All of these refer to edge or node ids directly, so adding the transit connections - * means we have to update these as well. The easiest approach would be to move the nodes and edges - * to the ends of their respective arrays and update the stuff that references them. This will - * produce small unused/unreferenced holes in those arrays but avoids the problem of having to - * offset all the ids. We could also avoid wasting space by offsetting all the things, we'll have - * to see which is easier than the other + * Add transit information to the graph tiles. * @param pt Property tree containing the hierarchy configuration * and other configuration needed to build transit. */ diff --git a/include/common/valhalla/mjolnir/transitpbf.h b/include/common/valhalla/mjolnir/transitpbf.h new file mode 100644 index 0000000..a2c8d53 --- /dev/null +++ b/include/common/valhalla/mjolnir/transitpbf.h @@ -0,0 +1,173 @@ +#ifndef VALHALLA_MJOLNIR_TRANSITPBF_H +#define VALHALLA_MJOLNIR_TRANSITPBF_H + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace valhalla::baldr; +using namespace valhalla::midgard; + +namespace valhalla { +namespace mjolnir { + +// Shape +struct Shape { + uint32_t begins; + uint32_t ends; + std::vector shape; +}; + +struct Departure { + GraphId orig_pbf_graphid; // GraphId in pbf tiles + GraphId dest_pbf_graphid; // GraphId in pbf tiles + uint32_t trip; + uint32_t route; + uint32_t blockid; + uint32_t shapeid; + uint32_t headsign_offset; + uint32_t dep_time; + uint32_t schedule_index; + uint32_t frequency_end_time; + uint16_t elapsed_time; + uint16_t frequency; + float orig_dist_traveled; + float dest_dist_traveled; + bool wheelchair_accessible; + bool bicycle_accessible; +}; + +// Unique route and stop +struct TransitLine { + uint32_t lineid; + uint32_t routeid; + GraphId dest_pbf_graphid; // GraphId (from pbf) of the destination stop + uint32_t shapeid; + float orig_dist_traveled; + float dest_dist_traveled; +}; + +struct StopEdges { + GraphId origin_pbf_graphid; // GraphId (from pbf) of the origin stop + std::vector intrastation; // List of intra-station connections + std::vector lines; // Set of unique route/stop pairs +}; + +Transit read_pbf(const std::string& file_name, std::mutex& lock) { + lock.lock(); + std::fstream file(file_name, std::ios::in | std::ios::binary); + if (!file) { + throw std::runtime_error("Couldn't load " + file_name); + lock.unlock(); + } + std::string buffer((std::istreambuf_iterator(file)), std::istreambuf_iterator()); + lock.unlock(); + google::protobuf::io::ArrayInputStream as(static_cast(buffer.c_str()), buffer.size()); + google::protobuf::io::CodedInputStream cs( + static_cast(&as)); + auto limit = std::max(static_cast(1), buffer.size() * 2); +#if GOOGLE_PROTOBUF_VERSION >= 3006000 + cs.SetTotalBytesLimit(limit); +#else + cs.SetTotalBytesLimit(limit, limit); +#endif + Transit transit; + if (!transit.ParseFromCodedStream(&cs)) { + throw std::runtime_error("Couldn't load " + file_name); + } + return transit; +} + +Transit read_pbf(const std::string& file_name) { + std::fstream file(file_name, std::ios::in | std::ios::binary); + if (!file) { + throw std::runtime_error("Couldn't load " + file_name); + } + std::string buffer((std::istreambuf_iterator(file)), std::istreambuf_iterator()); + google::protobuf::io::ArrayInputStream as(static_cast(buffer.c_str()), buffer.size()); + google::protobuf::io::CodedInputStream cs( + static_cast(&as)); + auto limit = std::max(static_cast(1), buffer.size() * 2); +#if GOOGLE_PROTOBUF_VERSION >= 3006000 + cs.SetTotalBytesLimit(limit); +#else + cs.SetTotalBytesLimit(limit, limit); +#endif + Transit transit; + if (!transit.ParseFromCodedStream(&cs)) { + throw std::runtime_error("Couldn't load " + file_name); + } + return transit; +} + +// Get PBF transit data given a GraphId / tile +Transit read_pbf(const GraphId& id, const std::string& transit_dir, std::string& file_name) { + std::string fname = GraphTile::FileSuffix(id); + fname = fname.substr(0, fname.size() - 3) + "pbf"; + file_name = transit_dir + '/' + fname; + Transit transit; + transit = read_pbf(file_name); + return transit; +} + +void write_pbf(const Transit& tile, const filesystem::path& transit_tile) { + // check for empty stop pairs and routes. + if (tile.stop_pairs_size() == 0 && tile.routes_size() == 0 && tile.shapes_size() == 0) { + LOG_WARN(transit_tile.string() + " had no data and will not be stored"); + return; + } + + // write pbf to file + if (!filesystem::exists(transit_tile.parent_path())) { + filesystem::create_directories(transit_tile.parent_path()); + } +#if GOOGLE_PROTOBUF_VERSION >= 3001000 + auto size = tile.ByteSizeLong(); +#else + auto size = tile.ByteSize(); +#endif + valhalla::midgard::mem_map buffer; + buffer.create(transit_tile.string(), size); + if (!tile.SerializeToArray(buffer.get(), size)) { + LOG_ERROR("Couldn't write: " + transit_tile.string() + " it would have been " + + std::to_string(size)); + } + + if (tile.routes_size() && tile.nodes_size() && tile.stop_pairs_size() && tile.shapes_size()) { + LOG_INFO(transit_tile.string() + " had " + std::to_string(tile.nodes_size()) + " nodes " + + std::to_string(tile.routes_size()) + " routes " + std::to_string(tile.shapes_size()) + + " shapes " + std::to_string(tile.stop_pairs_size()) + " stop pairs"); + } else { + LOG_INFO(transit_tile.string() + " had " + std::to_string(tile.stop_pairs_size()) + + " stop pairs"); + } +} + +// Converts a stop's pbf graph Id to a Valhalla graph Id by adding the +// tile's node count. Returns an Invalid GraphId if the tile is not found +// in the list of Valhalla tiles +GraphId GetGraphId(const GraphId& nodeid, const std::unordered_set& all_tiles) { + auto t = all_tiles.find(nodeid.Tile_Base()); + if (t == all_tiles.end()) { + return GraphId(); // Invalid graph Id + } else { + return {nodeid.tileid(), nodeid.level() + 1, nodeid.id()}; + } +} +} // namespace mjolnir +} // namespace valhalla +#endif // VALHALLA_MJOLNIR_TRANSITPBF_H diff --git a/include/common/valhalla/mjolnir/util.h b/include/common/valhalla/mjolnir/util.h index 5601efc..6c37f04 100644 --- a/include/common/valhalla/mjolnir/util.h +++ b/include/common/valhalla/mjolnir/util.h @@ -9,8 +9,6 @@ #include #include -// needs to be after sqlite include -#include #include #include @@ -128,12 +126,11 @@ bool shapes_match(const std::vector& shape1, uint32_t compute_curvature(const std::list& shape); /** - * Will allocate a spatialite connection - * - * @param handle The sqlite database handle - * @return a shared pointer to the connection which cleans up after itself when destructed + * Loads spatialite extension for sqlite + * @param db_handle the handle to the open sqlite database + * @return returns true if the module was successfully loaded */ -std::shared_ptr make_spatialite_cache(sqlite3* handle); +bool load_spatialite(sqlite3* db_handle); /** * Build an entire valhalla tileset give a config file and some input pbfs. The diff --git a/include/common/valhalla/mjolnir/valhalla_add_elevation_utils.h b/include/common/valhalla/mjolnir/valhalla_add_elevation_utils.h deleted file mode 100644 index 4810dcf..0000000 --- a/include/common/valhalla/mjolnir/valhalla_add_elevation_utils.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include -#include -#include - -#include - -#include "baldr/graphid.h" -#include "baldr/graphreader.h" -#include "baldr/graphtile.h" -#include "filesystem.h" -#include "midgard/logging.h" - -namespace valhalla { -namespace mjolnir { - -std::deque get_tile_ids(const boost::property_tree::ptree& pt, - const std::unordered_set& tiles) { - if (tiles.empty()) - return {}; - - auto tile_dir = pt.get_optional("mjolnir.tile_dir"); - if (!tile_dir || !filesystem::exists(*tile_dir)) { - LOG_WARN("Tile storage directory does not exist"); - return {}; - } - - std::deque tilequeue; - baldr::GraphReader reader(pt.get_child("mjolnir")); - std::for_each(std::begin(tiles), std::end(tiles), [&](const auto& tile) { - auto tile_id = baldr::GraphTile::GetTileId(*tile_dir + tile); - baldr::GraphId local_tile_id(tile_id.tileid(), tile_id.level(), tile_id.id()); - if (!reader.DoesTileExist(local_tile_id)) { - LOG_WARN("Provided tile doesn't belong to the tile directory from config file"); - return; - } - - tilequeue.push_back(tile_id); - }); - - return tilequeue; -} - -} // namespace mjolnir -} // namespace valhalla diff --git a/include/common/valhalla/odin/enhancedtrippath.h b/include/common/valhalla/odin/enhancedtrippath.h index 9be27de..2b4d03a 100644 --- a/include/common/valhalla/odin/enhancedtrippath.h +++ b/include/common/valhalla/odin/enhancedtrippath.h @@ -4,12 +4,13 @@ #include #include #include -#include #include #include #include #include +#include + #include #include #include @@ -185,7 +186,7 @@ class EnhancedTripLeg_Edge { } bool has_vehicle_type() const { - return mutable_edge_->travel_mode() == kDrive; + return mutable_edge_->has_vehicle_type_case(); } ::valhalla::VehicleType vehicle_type() const { @@ -193,7 +194,7 @@ class EnhancedTripLeg_Edge { } bool has_pedestrian_type() const { - return mutable_edge_->travel_mode() == kPedestrian; + return mutable_edge_->has_pedestrian_type_case(); } ::valhalla::PedestrianType pedestrian_type() const { @@ -201,7 +202,7 @@ class EnhancedTripLeg_Edge { } bool has_bicycle_type() const { - return mutable_edge_->travel_mode() == kBicycle; + return mutable_edge_->has_bicycle_type_case(); } ::valhalla::BicycleType bicycle_type() const { @@ -209,7 +210,7 @@ class EnhancedTripLeg_Edge { } bool has_transit_type() const { - return mutable_edge_->travel_mode() == kTransit; + return mutable_edge_->has_transit_type_case(); } ::valhalla::TransitType transit_type() const { @@ -260,6 +261,10 @@ class EnhancedTripLeg_Edge { return mutable_edge_->sign(); } + bool has_travel_mode() const { + return mutable_edge_->has_travel_mode_case(); + } + ::valhalla::TravelMode travel_mode() const { return mutable_edge_->travel_mode(); } @@ -348,12 +353,12 @@ class EnhancedTripLeg_Edge { return mutable_edge_->destination_only(); } - bool is_urban() const { - return mutable_edge_->is_urban(); + bool has_is_urban() const { + return mutable_edge_->has_is_urban_case(); } - bool indoor() const { - return mutable_edge_->indoor(); + bool is_urban() const { + return mutable_edge_->is_urban(); } bool IsUnnamed() const; @@ -373,9 +378,7 @@ class EnhancedTripLeg_Edge { bool IsMountainBikeUse() const; bool IsSidewalkUse() const; bool IsFootwayUse() const; - bool IsElevatorUse() const; bool IsStepsUse() const; - bool IsEscalatorUse() const; bool IsPathUse() const; bool IsPedestrianUse() const; bool IsBridlewayUse() const; @@ -390,7 +393,6 @@ class EnhancedTripLeg_Edge { bool IsEgressConnectionUse() const; bool IsPlatformConnectionUse() const; bool IsTransitConnectionUse() const; - bool IsConstructionUse() const; bool IsTransitConnection() const; @@ -414,8 +416,6 @@ class EnhancedTripLeg_Edge { std::vector> GetNameList() const; - std::string GetLevelRef() const; - float GetLength(const Options::Units& units); // Turn Lanes @@ -487,6 +487,10 @@ class EnhancedTripLeg_IntersectingEdge { return mutable_intersecting_edge_->walkability(); } + bool has_use() const { + return mutable_intersecting_edge_->has_use_case(); + } + ::valhalla::TripLeg_Use use() const { return mutable_intersecting_edge_->use(); } @@ -602,6 +606,10 @@ class EnhancedTripLeg_Node { return mutable_node_->cost().elapsed_cost().seconds(); } + bool has_admin_index() const { + return mutable_node_->has_admin_index_case(); + } + uint32_t admin_index() const { return mutable_node_->admin_index(); } @@ -712,7 +720,7 @@ class EnhancedTripLeg_Node { uint32_t GetStraightestTraversableIntersectingEdgeTurnDegree(uint32_t from_heading, const TravelMode travel_mode, - std::optional* use = nullptr); + boost::optional* use = nullptr); bool IsStraightestTraversableIntersectingEdgeReversed(uint32_t from_heading, const TravelMode travel_mode); @@ -737,8 +745,6 @@ class EnhancedTripLeg_Node { bool IsBorderControl() const; bool IsTollGantry() const; bool IsSumpBuster() const; - bool IsBuildingEntrance() const; - bool IsElevator() const; std::string ToString() const; diff --git a/include/common/valhalla/odin/maneuver.h b/include/common/valhalla/odin/maneuver.h index c80ca49..6317611 100644 --- a/include/common/valhalla/odin/maneuver.h +++ b/include/common/valhalla/odin/maneuver.h @@ -12,10 +12,10 @@ #include #include -#include #include #include #include +#include using namespace valhalla::baldr; @@ -378,24 +378,6 @@ class Maneuver { const BikeShareStationInfo& bss_info() const; void set_bss_info(const BikeShareStationInfo& bss_info); - bool elevator() const; - void set_elevator(bool elevator); - - bool indoor_steps() const; - void set_indoor_steps(bool indoor_steps); - - bool escalator() const; - void set_escalator(bool escalator); - - bool building_enter() const; - void set_building_enter(bool building_enter); - - bool building_exit() const; - void set_building_exit(bool building_exit); - - std::string end_level_ref() const; - void set_end_level_ref(std::string end_level_ref); - #ifdef LOGGING_LEVEL_TRACE std::string ToString() const; @@ -471,14 +453,6 @@ class Maneuver { // Bss support BikeShareStationInfo bss_info_; - // Indoor elements - bool elevator_; - bool indoor_steps_; - bool escalator_; - bool building_enter_; - bool building_exit_; - std::string end_level_ref_; - //////////////////////////////////////////////////////////////////////////// // Transit support diff --git a/include/common/valhalla/odin/markup_formatter.h b/include/common/valhalla/odin/markup_formatter.h index a3fc478..0a7ec06 100644 --- a/include/common/valhalla/odin/markup_formatter.h +++ b/include/common/valhalla/odin/markup_formatter.h @@ -1,8 +1,8 @@ #pragma once -#include #include +#include #include #include @@ -37,7 +37,7 @@ class MarkupFormatter { * @param street_name the street name record to format. * @return the street name with phoneme markup if it exists. */ - std::optional + boost::optional FormatPhonemeElement(const std::unique_ptr& street_name) const; /** @@ -46,7 +46,7 @@ class MarkupFormatter { * @param sign the sign record to format. * @return the sign with phoneme markup if it exists. */ - std::optional FormatPhonemeElement(const Sign& sign) const; + boost::optional FormatPhonemeElement(const Sign& sign) const; protected: /** @@ -60,7 +60,7 @@ class MarkupFormatter { void FormatQuotes(std::string& markup_string, valhalla::Pronunciation_Alphabet alphabet) const; std::string FormatPhonemeElement(const std::string& textual_string, - const std::optional& pronunciation) const; + const boost::optional& pronunciation) const; bool markup_enabled_; std::string phoneme_format_; diff --git a/include/common/valhalla/odin/narrative_dictionary.h b/include/common/valhalla/odin/narrative_dictionary.h index ac7b58e..335e01f 100644 --- a/include/common/valhalla/odin/narrative_dictionary.h +++ b/include/common/valhalla/odin/narrative_dictionary.h @@ -76,11 +76,6 @@ constexpr auto kPostTransitionVerbalKey = "instructions.post_transition_verbal"; constexpr auto kPostTransitTransitionVerbalKey = "instructions.post_transition_transit_verbal"; constexpr auto kVerbalMultiCueKey = "instructions.verbal_multi_cue"; constexpr auto kApproachVerbalAlertKey = "instructions.approach_verbal_alert"; -constexpr auto kElevatorKey = "instructions.elevator"; -constexpr auto kStepsKey = "instructions.steps"; -constexpr auto kEscalatorKey = "instructions.escalator"; -constexpr auto kEnterBuildingKey = "instructions.enter_building"; -constexpr auto kExitBuildingKey = "instructions.exit_building"; constexpr auto kPosixLocaleKey = "posix_locale"; // Variable keys @@ -156,7 +151,6 @@ constexpr auto kTransitNameTag = ""; constexpr auto kTransitHeadSignTag = ""; constexpr auto kTransitPlatformCountTag = ""; constexpr auto kTransitPlatformCountLabelTag = ""; -constexpr auto kLevelTag = ""; } // namespace @@ -245,14 +239,6 @@ struct ApproachVerbalAlertSubset : PhraseSet { std::vector us_customary_lengths; }; -struct EnterBuildingSubset : PhraseSet { - std::vector empty_street_name_labels; -}; - -struct ExitBuildingSubset : PhraseSet { - std::vector empty_street_name_labels; -}; - /** * A class that stores the localized narrative instructions. */ @@ -376,21 +362,6 @@ class NarrativeDictionary { // Approach verbal alert ApproachVerbalAlertSubset approach_verbal_alert_subset; - // Elevator - PhraseSet elevator_subset; - - // Steps - PhraseSet steps_subset; - - // Escalator - PhraseSet escalator_subset; - - // Enter Building - EnterBuildingSubset enter_building_subset; - - // Exit Building - ExitBuildingSubset exit_building_subset; - // Posix locale std::string posix_locale; @@ -594,26 +565,6 @@ class NarrativeDictionary { void Load(ApproachVerbalAlertSubset& approach_verbal_alert_handle, const boost::property_tree::ptree& approach_verbal_alert_subset_pt); - /** - * Loads the specified 'enter_building' instruction subset with the localized - * narrative instructions contained in the specified property tree. - * - * @param enter_building_handle The 'enter_building' structure to populate. - * @param enter_building_subset_pt The 'enter_building' property tree. - */ - void Load(EnterBuildingSubset& enter_building_handle, - const boost::property_tree::ptree& enter_building_subset_pt); - - /** - * Loads the specified 'exit_building' instruction subset with the localized - * narrative instructions contained in the specified property tree. - * - * @param exit_building_handle The 'exit_building' structure to populate. - * @param exit_building_subset_pt The 'exit_building' property tree. - */ - void Load(ExitBuildingSubset& exit_building_handle, - const boost::property_tree::ptree& exit_building_subset_pt); - // Locale std::locale locale; diff --git a/include/common/valhalla/odin/narrativebuilder.h b/include/common/valhalla/odin/narrativebuilder.h index ce7b881..0392a19 100644 --- a/include/common/valhalla/odin/narrativebuilder.h +++ b/include/common/valhalla/odin/narrativebuilder.h @@ -410,17 +410,6 @@ class NarrativeBuilder { uint32_t element_max_count = kVerbalPreElementMaxCount, const std::string& delim = kVerbalDelim); - ///////////////////////////////////////////////////////////////////////////// - std::string FormElevatorInstruction(Maneuver& maneuver); - - std::string FormStepsInstruction(Maneuver& maneuver); - - std::string FormEscalatorInstruction(Maneuver& maneuver); - - std::string FormEnterBuildingInstruction(Maneuver& maneuver); - - std::string FormExitBuildingInstruction(Maneuver& maneuver); - ///////////////////////////////////////////////////////////////////////////// /** * Returns the transit stop count label based on the value of the specified diff --git a/include/common/valhalla/odin/sign.h b/include/common/valhalla/odin/sign.h index 5b1dfd6..b984c7c 100644 --- a/include/common/valhalla/odin/sign.h +++ b/include/common/valhalla/odin/sign.h @@ -2,9 +2,10 @@ #define VALHALLA_ODIN_SIGN_H_ #include -#include #include +#include + #include namespace valhalla { @@ -20,7 +21,7 @@ class Sign { */ Sign(const std::string& text, const bool is_route_number, - const std::optional& pronunciation = std::nullopt); + const boost::optional& pronunciation = boost::none); /** * Returns the sign text. @@ -50,7 +51,7 @@ class Sign { * Returns the pronunciation of this sign. * @return the pronunciation of this sign. */ - const std::optional& pronunciation() const; + const boost::optional& pronunciation() const; #ifdef LOGGING_LEVEL_TRACE std::string ToParameterString() const; @@ -62,7 +63,7 @@ class Sign { std::string text_; bool is_route_number_; uint32_t consecutive_count_; - std::optional pronunciation_; + boost::optional pronunciation_; }; } // namespace odin diff --git a/include/common/valhalla/odin/transitrouteinfo.h b/include/common/valhalla/odin/transitrouteinfo.h index fcb6e74..ebc6205 100644 --- a/include/common/valhalla/odin/transitrouteinfo.h +++ b/include/common/valhalla/odin/transitrouteinfo.h @@ -4,8 +4,8 @@ #include #include -#include #include +#include namespace valhalla { namespace odin { diff --git a/include/common/valhalla/odin/util.h b/include/common/valhalla/odin/util.h index 13c428e..97c28be 100644 --- a/include/common/valhalla/odin/util.h +++ b/include/common/valhalla/odin/util.h @@ -23,27 +23,6 @@ constexpr uint32_t kVerbalPreElementMaxCount = 2; constexpr uint32_t kVerbalPostElementMaxCount = 2; const std::string kVerbalDelim = ", "; -struct Bcp47Locale { - std::string langtag; - std::string language; - std::string script; - std::string region; - std::string privateuse; - - std::string get_lang_script() { - std::string lang_script = language; - if (!script.empty()) { - lang_script += "-"; - lang_script += script; - } - return lang_script; - } - - bool valid() { - return !langtag.empty(); - } -}; - /** * Returns the specified item surrounded with quotes. * @param item specified text to surround with quotes @@ -89,8 +68,6 @@ const locales_singleton_t& get_locales(); */ const std::unordered_map& get_locales_json(); -Bcp47Locale parse_string_into_locale(const std::string& locale_string); - /** * Returns the string representation for a turn lane direction. * diff --git a/include/common/valhalla/proto_conversions.h b/include/common/valhalla/proto_conversions.h index 65cecb4..f462902 100644 --- a/include/common/valhalla/proto_conversions.h +++ b/include/common/valhalla/proto_conversions.h @@ -118,10 +118,6 @@ inline TripLeg_Node_Type GetTripLegNodeType(const baldr::NodeType node_type) { return TripLeg_Node_Type_kTollGantry; case baldr::NodeType::kSumpBuster: return TripLeg_Node_Type_kSumpBuster; - case baldr::NodeType::kBuildingEntrance: - return TripLeg_Node_Type_kBuildingEntrance; - case baldr::NodeType::kElevator: - return TripLeg_Node_Type_kElevator; } auto num = static_cast(node_type); throw std::runtime_error(std::string(__FILE__) + ":" + std::to_string(__LINE__) + @@ -192,8 +188,6 @@ inline TripLeg_Use GetTripLegUse(const baldr::Use use) { return TripLeg_Use_kCuldesacUse; case baldr::Use::kLivingStreet: return TripLeg_Use_kLivingStreetUse; - case baldr::Use::kServiceRoad: - return TripLeg_Use_kServiceRoadUse; case baldr::Use::kCycleway: return TripLeg_Use_kCyclewayUse; case baldr::Use::kMountainBike: @@ -203,12 +197,8 @@ inline TripLeg_Use GetTripLegUse(const baldr::Use use) { return TripLeg_Use_kFootwayUse; // TODO: update when odin has been updated case baldr::Use::kFootway: return TripLeg_Use_kFootwayUse; - case baldr::Use::kElevator: - return TripLeg_Use_kElevatorUse; case baldr::Use::kSteps: return TripLeg_Use_kStepsUse; - case baldr::Use::kEscalator: - return TripLeg_Use_kEscalatorUse; case baldr::Use::kPath: return TripLeg_Use_kPathUse; case baldr::Use::kPedestrian: @@ -227,8 +217,6 @@ inline TripLeg_Use GetTripLegUse(const baldr::Use use) { return TripLeg_Use_kFerryUse; case baldr::Use::kRailFerry: return TripLeg_Use_kRailFerryUse; - case baldr::Use::kConstruction: - return TripLeg_Use_kConstructionUse; case baldr::Use::kRail: return TripLeg_Use_kRailUse; case baldr::Use::kBus: @@ -259,8 +247,8 @@ const std::string& GuidanceViewTypeToString(const valhalla::DirectionsLeg_Guidan // which would allow us to delete this completely would be to target a newer protobuf version bool Options_Action_Enum_Parse(const std::string& action, Options::Action* a); const std::string& Options_Action_Enum_Name(const Options::Action action); -bool Costing_Enum_Parse(const std::string& costing, Costing::Type* c); -const std::string& Costing_Enum_Name(const Costing::Type costing); +bool Costing_Enum_Parse(const std::string& costing, Costing* c); +const std::string& Costing_Enum_Name(const Costing costing); bool ShapeMatch_Enum_Parse(const std::string& match, ShapeMatch* s); const std::string& ShapeMatch_Enum_Name(const ShapeMatch match); bool Options_Format_Enum_Parse(const std::string& format, Options::Format* f); @@ -284,10 +272,6 @@ inline midgard::PointLL to_ll(const LatLng& ll) { return midgard::PointLL{ll.lng(), ll.lat()}; } -inline midgard::PointLL to_ll(const valhalla::Location& l) { - return midgard::PointLL{l.ll().lng(), l.ll().lat()}; -} - inline void from_ll(valhalla::Location* l, const midgard::PointLL& p) { l->mutable_ll()->set_lat(p.lat()); l->mutable_ll()->set_lng(p.lng()); diff --git a/include/common/valhalla/sif/autocost.h b/include/common/valhalla/sif/autocost.h index 7654520..f412b42 100644 --- a/include/common/valhalla/sif/autocost.h +++ b/include/common/valhalla/sif/autocost.h @@ -20,14 +20,53 @@ namespace sif { */ void ParseAutoCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create an auto route cost method. This is generally shortest time but uses * hierarchies and can avoid "shortcuts" through residential areas. - * @param costing pbf with request options. + * @param options pbf with request options. */ -cost_ptr_t CreateAutoCost(const Costing& costing); +cost_ptr_t CreateAutoCost(const CostingOptions& options); + +/** + * Parses the auto_shorter cost options from json and stores values in pbf. + * @param doc The json request represented as a DOM tree. + * @param costing_options_key A string representing the location in the DOM tree where the costing + * options are stored. + * @param pbf_costing_options A mutable protocol buffer where the parsed json values will be stored. + */ +void ParseAutoShorterCostOptions(const rapidjson::Document& doc, + const std::string& costing_options_key, + CostingOptions* pbf_costing_options); + +/** + * Create an auto shorter cost method. This is derived from auto costing and + * uses the same rules except the edge cost uses an adjusted speed that + * (non-linearly) reduces the importance of edge speed. + * @param options pbf with request options. + */ +cost_ptr_t CreateAutoShorterCost(const CostingOptions& options); + +/** + * Parses the auto_data_fix cost options from json and stores values in pbf. + * @param doc The json request represented as a DOM tree. + * @param costing_options_key A string representing the location in the DOM tree where the costing + * options are stored. + * @param pbf_costing_options A mutable protocol buffer where the parsed json values will be stored. + */ +void ParseAutoDataFixCostOptions(const rapidjson::Document& doc, + const std::string& costing_options_key, + CostingOptions* pbf_costing_options); + +/** + * Create an auto costing method for data fixing. This is derived from auto + * costing but overrides Allowed rules to allow driving against oneway and + * it ignores turn restrictions. his can be useful for map-matching traces + * when trying data that may have incorrect restrictions or oneway information. + * @param options pbf with request options. + */ +cost_ptr_t CreateAutoDataFixCost(const CostingOptions& options); /** * Parses the bus cost options from json and stores values in pbf. @@ -38,33 +77,33 @@ cost_ptr_t CreateAutoCost(const Costing& costing); */ void ParseBusCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* pbf_costing_options); /** * Create a bus cost method. This is derived from auto costing and * uses the same rules except for using the bus access flag instead * of the auto access flag. - * @param costing pbf with request options. + * @param options pbf with request options. */ -cost_ptr_t CreateBusCost(const Costing& costing); +cost_ptr_t CreateBusCost(const CostingOptions& options); /** * Parses the taxi cost options from json and stores values in pbf. * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param pbf_costing_options A mutable protocol buffer where the parsed json values will be stored. */ void ParseTaxiCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* pbf_costing_options); /** * Create a taxi cost method. This is derived from auto costing and * uses the same rules except for favoring taxi roads - * @param costing pbf with request options. + * @param options pbf with request options. */ -cost_ptr_t CreateTaxiCost(const Costing& costing); +cost_ptr_t CreateTaxiCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/bicyclecost.h b/include/common/valhalla/sif/bicyclecost.h index 1448a49..be78c5d 100644 --- a/include/common/valhalla/sif/bicyclecost.h +++ b/include/common/valhalla/sif/bicyclecost.h @@ -14,17 +14,17 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParseBicycleCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create a bicyclecost - * @param costing pbf with request options. + * @param options pbf with request options. */ -cost_ptr_t CreateBicycleCost(const Costing& optcostingions); +cost_ptr_t CreateBicycleCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/costfactory.h b/include/common/valhalla/sif/costfactory.h index 3702d78..4439544 100644 --- a/include/common/valhalla/sif/costfactory.h +++ b/include/common/valhalla/sif/costfactory.h @@ -26,7 +26,7 @@ namespace sif { */ class CostFactory { public: - using factory_function_t = std::function; + using factory_function_t = std::function; /** * Constructor @@ -53,7 +53,7 @@ class CostFactory { * @param costing the cost type that the function creates * @param function the function pointer to call to actually create the cost object */ - void Register(const Costing::Type costing, factory_function_t function) { + void Register(const Costing costing, factory_function_t function) { factory_funcs_.erase(costing); factory_funcs_.emplace(costing, function); } @@ -63,9 +63,14 @@ class CostFactory { * @param options pbf with costing type and costing options */ cost_ptr_t Create(const Options& options) const { + // you cant get a costing without a costing type + if (!options.has_costing_case()) + throw std::runtime_error("No costing provided to cost factory"); + // create the cost using the creation function - auto found = options.costings().find(options.costing_type()); - if (found != options.costings().end()) { + auto costing_index = static_cast(options.costing()); + auto found = options.costing_options().find(costing_index); + if (found != options.costing_options().end()) { return Create(found->second); } // if we didnt have costing options we need to use some default ones else { @@ -75,12 +80,12 @@ class CostFactory { /** * Make a default cost from its specified type - * @param costing_type which costing to create + * @param costing which costing to create */ - cost_ptr_t Create(Costing::Type costing_type) const { - Costing default_costing; - default_costing.set_type(costing_type); - return Create(default_costing); + cost_ptr_t Create(Costing costing) const { + CostingOptions default_options; + default_options.set_costing(costing); + return Create(default_options); } /** @@ -88,27 +93,31 @@ class CostFactory { * @param costing the type of cost to create * @param options pbf with request options */ - cost_ptr_t Create(const Costing& costing) const { - auto itr = factory_funcs_.find(costing.type()); + cost_ptr_t Create(const CostingOptions& options) const { + // you cant get a costing without a costing type + if (!options.has_costing_case()) + throw std::runtime_error("No costing provided to cost factory"); + + auto itr = factory_funcs_.find(options.costing()); if (itr == factory_funcs_.end()) { - auto costing_str = Costing_Enum_Name(costing.type()); + auto costing_str = Costing_Enum_Name(options.costing()); throw std::runtime_error("No costing method found for '" + costing_str + "'"); } // create the cost using the function pointer - return itr->second(costing); + return itr->second(options); } mode_costing_t CreateModeCosting(const Options& options, TravelMode& mode) { mode_costing_t mode_costing; // Set travel mode and construct costing - if (options.costing_type() == Costing::multimodal || options.costing_type() == Costing::transit || - options.costing_type() == Costing::bikeshare) { + if (options.costing() == Costing::multimodal || options.costing() == Costing::transit || + options.costing() == Costing::bikeshare) { // For multi-modal we construct costing for all modes and set the // initial mode to pedestrian. (TODO - allow other initial modes) - mode_costing[0] = Create(options.costings().find(Costing::auto_)->second); - mode_costing[1] = Create(options.costings().find(Costing::pedestrian)->second); - mode_costing[2] = Create(options.costings().find(Costing::bicycle)->second); - mode_costing[3] = Create(options.costings().find(Costing::transit)->second); + mode_costing[0] = Create(options.costing_options().find(Costing::auto_)->second); + mode_costing[1] = Create(options.costing_options().find(Costing::pedestrian)->second); + mode_costing[2] = Create(options.costing_options().find(Costing::bicycle)->second); + mode_costing[3] = Create(options.costing_options().find(Costing::transit)->second); mode = valhalla::sif::TravelMode::kPedestrian; } else { valhalla::sif::cost_ptr_t cost = Create(options); @@ -119,7 +128,7 @@ class CostFactory { } private: - std::map factory_funcs_; + std::map factory_funcs_; }; } // namespace sif diff --git a/include/common/valhalla/sif/dynamiccost.h b/include/common/valhalla/sif/dynamiccost.h index d93fb1c..c5ef81e 100644 --- a/include/common/valhalla/sif/dynamiccost.h +++ b/include/common/valhalla/sif/dynamiccost.h @@ -47,25 +47,6 @@ : range.def))); \ } -/** - * same as above, but for costing options without pbf's awful oneof - * - * @param costing_options pointer to protobuf costing options object - * @param range ranged_default_t object which will check any provided values are in range - * @param json rapidjson value object which should contain user provided costing options - * @param json_key the json key to use to pull a user provided value out of the jsonn - * @param option_name the name of the option will be set on the costing options object - */ - -#define JSON_PBF_RANGED_DEFAULT_V2(costing_options, range, json, json_key, option_name) \ - { \ - costing_options->set_##option_name( \ - range(rapidjson::get(json, json_key, \ - costing_options->option_name() \ - ? costing_options->option_name() \ - : range.def))); \ - } - /** * this macro takes a default value and uses it when no user provided values exist (in json or in pbf) * to set the option on the costing options object @@ -109,9 +90,6 @@ constexpr float kMaxFerryPenalty = 6.0f * midgard::kSecPerHour; // 6 hours constexpr float kTCUnfavorablePencilPointUturn = 15.f; constexpr float kTCUnfavorableUturn = 600.f; -// Maximum highway avoidance bias (modulates the highway factors based on road class) -constexpr float kMaxHighwayBiasFactor = 8.0f; - /** * Mask values used in the allowed function by loki::reach to control how conservative * the decision should be. By default allowed methods will not disallow start/end/simple @@ -146,7 +124,7 @@ class DynamicCost { * @param access_mask Access mask * @param penalize_uturns Should we penalize uturns? */ - DynamicCost(const Costing& options, + DynamicCost(const CostingOptions& options, const TravelMode mode, uint32_t access_mask, bool penalize_uturns = false); @@ -194,6 +172,15 @@ class DynamicCost { */ virtual float GetModeFactor(); + /** + * This method overrides the max_distance with the max_distance_mm per segment + * distance. An example is a pure walking route may have a max distance of + * 10000 meters (10km) but for a multi-modal route a lower limit of 5000 + * meters per segment (e.g. from origin to a transit stop or from the last + * transit stop to the destination). + */ + virtual void UseMaxMultiModalDistance(); + /** * Get the access mode used by this costing method. * @return Returns access mode. @@ -289,7 +276,7 @@ class DynamicCost { ((disallow_mask & kDisallowEndRestriction) && edge->end_restriction()) || ((disallow_mask & kDisallowSimpleRestriction) && edge->restrictions()) || ((disallow_mask & kDisallowShortcut) && edge->is_shortcut()); - return accessible && !assumed_restricted && (edge->use() != baldr::Use::kConstruction); + return accessible && !assumed_restricted; } /** @@ -303,10 +290,9 @@ class DynamicCost { // you have forward access for the mode you care about // you dont care about what mode has access so long as its forward // you dont care about the direction the mode has access to - return ((edge->forwardaccess() & access_mask_) || - (ignore_access_ && (edge->forwardaccess() & baldr::kAllAccess)) || - (ignore_oneways_ && (edge->reverseaccess() & access_mask_))) && - (edge->use() != baldr::Use::kConstruction); + return (edge->forwardaccess() & access_mask_) || + (ignore_access_ && (edge->forwardaccess() & baldr::kAllAccess)) || + (ignore_oneways_ && (edge->reverseaccess() & access_mask_)); } inline virtual bool ModeSpecificAllowed(const baldr::AccessRestriction&) const { @@ -421,7 +407,7 @@ class DynamicCost { return next_pred; }; auto reset_edge_status = - [&edgestatus](const std::vector& edge_ids_in_complex_restriction) { + [&edgestatus, &forward](const std::vector& edge_ids_in_complex_restriction) { // A complex restriction spans multiple edges, e.g. from A to C via B. // // At the point of triggering a complex restriction, all edges leading up to C @@ -909,12 +895,6 @@ class DynamicCost { */ virtual void set_use_living_streets(float use_living_streets); - /** - * Calculate `lit` costs based on lit preference. - * @param use_lit value of lit preference in range [0; 1] - */ - virtual void set_use_lit(float use_lit); - // Algorithm pass uint32_t pass_; @@ -946,7 +926,6 @@ class DynamicCost { float living_street_factor_; // Avoid living streets factor. float service_factor_; // Avoid service roads factor. float closure_factor_; // Avoid closed edges factor. - float unlit_factor_; // Avoid unlit edges factor. // Transition costs sif::Cost country_crossing_cost_; @@ -980,7 +959,6 @@ class DynamicCost { bool ignore_access_{false}; bool ignore_closures_{false}; uint32_t top_speed_; - uint32_t fixed_speed_; // if ignore_closures_ is set to true by the user request, filter_closures_ is forced to false bool filter_closures_{true}; @@ -1000,8 +978,7 @@ class DynamicCost { * Get the base transition costs (and ferry factor) from the costing options. * @param costing_options Protocol buffer of costing options. */ - void get_base_costs(const Costing& costing) { - const auto& costing_options = costing.options(); + void get_base_costs(const CostingOptions& costing_options) { // Cost only (no time) penalties alley_penalty_ = costing_options.alley_penalty(); destination_only_penalty_ = costing_options.destination_only_penalty(); @@ -1070,9 +1047,6 @@ class DynamicCost { // Get living street factor from costing options. set_use_living_streets(costing_options.use_living_streets()); - // Calculate lit factor from costing options. - set_use_lit(costing_options.use_lit()); - // Penalty and factor to use service roads service_penalty_ = costing_options.service_penalty(); service_factor_ = costing_options.service_factor(); @@ -1081,11 +1055,8 @@ class DynamicCost { // Set the speed mask to determine which speed data types are allowed flow_mask_ = costing_options.flow_mask(); - // Set the fixed speed a vehicle can go - fixed_speed_ = costing_options.fixed_speed(); // Set the top speed a vehicle wants to go - top_speed_ = - fixed_speed_ == baldr::kDisableFixedSpeed ? costing_options.top_speed() : fixed_speed_; + top_speed_ = costing_options.top_speed(); exclude_unpaved_ = costing_options.exclude_unpaved(); @@ -1191,7 +1162,6 @@ struct BaseCostingOptionsConfig { ranged_default_t use_tracks_; ranged_default_t use_living_streets_; - ranged_default_t use_lit_; ranged_default_t closure_factor_; @@ -1213,18 +1183,18 @@ struct BaseCostingOptionsConfig { * @param cfg Default values with enable/disable parsing indicators for costing options. */ void ParseBaseCostOptions(const rapidjson::Value& json, - Costing* co, + CostingOptions* co, const BaseCostingOptionsConfig& cfg); /** * Parses all the costing options for all supported costings * @param doc json document * @param costing_options_key the key in the json document where the options are located - * @param options where to store the parsed costing + * @param options where to store the parsed costing options */ -void ParseCosting(const rapidjson::Document& doc, - const std::string& costing_options_key, - Options& options); +void ParseCostingOptions(const rapidjson::Document& doc, + const std::string& costing_options_key, + Options& options); /** * Parses the costing options for the costing specified within the json object. If the @@ -1235,10 +1205,10 @@ void ParseCosting(const rapidjson::Document& doc, * @param costing_options where to store the parsed options * @param costing specify the costing you want to parse or let it check the json */ -void ParseCosting(const rapidjson::Document& doc, - const std::string& key, - Costing* costing, - Costing::Type costing_type = static_cast(Costing::Type_ARRAYSIZE)); +void ParseCostingOptions(const rapidjson::Document& doc, + const std::string& key, + CostingOptions* costing_options, + Costing costing = static_cast(Costing_ARRAYSIZE)); } // namespace sif diff --git a/include/common/valhalla/sif/edgelabel.h b/include/common/valhalla/sif/edgelabel.h index 7281f17..a2a6610 100644 --- a/include/common/valhalla/sif/edgelabel.h +++ b/include/common/valhalla/sif/edgelabel.h @@ -12,11 +12,6 @@ namespace valhalla { namespace sif { -constexpr uint32_t kInitialEdgeLabelCountAstar = 2000000; -constexpr uint32_t kInitialEdgeLabelCountBidirAstar = 1000000; -constexpr uint32_t kInitialEdgeLabelCountDijkstras = 4000000; -constexpr uint32_t kInitialEdgeLabelCountBidirDijkstra = 2000000; - /** * Labeling information for shortest path algorithm. Contains cost, * predecessor, current time, and assorted information required during @@ -35,10 +30,9 @@ class EdgeLabel { : predecessor_(baldr::kInvalidLabel), path_distance_(0), restrictions_(0), edgeid_(baldr::kInvalidGraphId), opp_index_(0), opp_local_idx_(0), mode_(0), endnode_(baldr::kInvalidGraphId), use_(0), classification_(0), shortcut_(0), dest_only_(0), - origin_(0), destination_(0), toll_(0), not_thru_(0), deadend_(0), on_complex_rest_(0), - closure_pruning_(0), has_measured_speed_(0), path_id_(0), restriction_idx_(0), - internal_turn_(0), unpaved_(0), cost_(0, 0), sortcost_(0), distance_(0), - transition_cost_(0, 0) { + origin_(0), toll_(0), not_thru_(0), deadend_(0), on_complex_rest_(0), closure_pruning_(0), + has_measured_speed_(0), path_id_(0), restriction_idx_(0), internal_turn_(0), unpaved_(0), + cost_(0, 0), sortcost_(0), distance_(0), transition_cost_(0, 0) { assert(path_id_ <= baldr::kMaxMultiPathId); } @@ -81,8 +75,8 @@ class EdgeLabel { mode_(static_cast(mode)), endnode_(edge->endnode()), use_(static_cast(edge->use())), classification_(static_cast(edge->classification())), shortcut_(edge->shortcut()), - dest_only_(edge->destonly()), origin_(0), destination_(0), toll_(edge->toll()), - not_thru_(edge->not_thru()), deadend_(edge->deadend()), + dest_only_(edge->destonly()), origin_(0), toll_(edge->toll()), not_thru_(edge->not_thru()), + deadend_(edge->deadend()), on_complex_rest_(edge->part_of_complex_restriction() || edge->start_restriction() || edge->end_restriction()), closure_pruning_(closure_pruning), has_measured_speed_(has_measured_speed), path_id_(path_id), @@ -276,21 +270,6 @@ class EdgeLabel { void set_origin() { origin_ = true; } - - /** - * Is this edge a destination edge? - * @return Returns true if this edge is a destination edge. - */ - bool destination() const { - return destination_; - } - - /** - * Sets this edge as a destination. - */ - void set_destination() { - destination_ = true; - } /** * Get the restriction idx, 255 means no restriction */ @@ -462,7 +441,6 @@ class EdgeLabel { uint64_t shortcut_ : 1; uint64_t dest_only_ : 1; uint64_t origin_ : 1; - uint64_t destination_ : 1; uint64_t toll_ : 1; uint64_t not_thru_ : 1; uint64_t deadend_ : 1; @@ -478,7 +456,7 @@ class EdgeLabel { uint32_t internal_turn_ : 2; // Flag indicating edge is an unpaved road. uint32_t unpaved_ : 1; - uint32_t spare : 13; + uint32_t spare : 14; Cost cost_; // Cost and elapsed time along the path. float sortcost_; // Sort cost - includes A* heuristic. @@ -743,7 +721,6 @@ class MMEdgeLabel : public EdgeLabel { * @param dist Distance meters to the destination * @param mode Mode of travel along this edge. * @param path_distance Accumulated distance. - * @param walking_distance Accumulated walking distance. Used to prune the expansion. * @param tripid Trip Id for a transit edge. * @param prior_stopid Prior transit stop Id. * @param blockid Transit trip block Id. @@ -762,7 +739,6 @@ class MMEdgeLabel : public EdgeLabel { const float dist, const sif::TravelMode mode, const uint32_t path_distance, - const uint32_t walking_distance, const uint32_t tripid, const baldr::GraphId& prior_stopid, const uint32_t blockid, @@ -786,8 +762,7 @@ class MMEdgeLabel : public EdgeLabel { InternalTurn::kNoTurn, path_id), prior_stopid_(prior_stopid), tripid_(tripid), blockid_(blockid), - transit_operator_(transit_operator), has_transit_(has_transit), - walking_distance_(walking_distance) { + transit_operator_(transit_operator), has_transit_(has_transit) { } /** @@ -799,7 +774,6 @@ class MMEdgeLabel : public EdgeLabel { * @param cost True cost (and elapsed time in seconds) to the edge. * @param sortcost Cost for sorting (includes A* heuristic). * @param path_distance Accumulated path distance. - * @param walking_distance Accumulated walking distance. Used to prune the expansion. * @param tripid Trip Id for a transit edge. * @param blockid Transit trip block Id. * @param transition_cost Transition cost @@ -809,7 +783,6 @@ class MMEdgeLabel : public EdgeLabel { const sif::Cost& cost, const float sortcost, const uint32_t path_distance, - const uint32_t walking_distance, const uint32_t tripid, const uint32_t blockid, const Cost& transition_cost, @@ -818,7 +791,6 @@ class MMEdgeLabel : public EdgeLabel { cost_ = cost; sortcost_ = sortcost; path_distance_ = path_distance; - walking_distance_ = walking_distance; tripid_ = tripid; blockid_ = blockid; transition_cost_ = transition_cost; @@ -865,13 +837,6 @@ class MMEdgeLabel : public EdgeLabel { return has_transit_; } - /** - * Return the current walking distance in meters. - */ - uint32_t walking_distance() const { - return walking_distance_; - } - protected: // GraphId of the predecessor transit stop. baldr::GraphId prior_stopid_; @@ -885,9 +850,6 @@ class MMEdgeLabel : public EdgeLabel { uint32_t blockid_ : 21; // Really only needs 20 bits uint32_t transit_operator_ : 10; uint32_t has_transit_ : 1; - - // Accumulated walking distance to prune the expansion - uint32_t walking_distance_; }; } // namespace sif diff --git a/include/common/valhalla/sif/motorcyclecost.h b/include/common/valhalla/sif/motorcyclecost.h index c5024e8..2aced52 100644 --- a/include/common/valhalla/sif/motorcyclecost.h +++ b/include/common/valhalla/sif/motorcyclecost.h @@ -16,19 +16,19 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParseMotorcycleCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create motorcycle cost method. This is derived from auto costing and * uses the same rules except for some different access restrictions * and the tendency to avoid hills - * @param costing pbf with request options. + * @param options pbf with request options. */ -cost_ptr_t CreateMotorcycleCost(const Costing& costing); +cost_ptr_t CreateMotorcycleCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/motorscootercost.h b/include/common/valhalla/sif/motorscootercost.h index 5146690..f8fcca6 100644 --- a/include/common/valhalla/sif/motorscootercost.h +++ b/include/common/valhalla/sif/motorscootercost.h @@ -16,11 +16,11 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParseMotorScooterCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create motor scooter cost method. This is derived from auto costing and @@ -28,7 +28,7 @@ void ParseMotorScooterCostOptions(const rapidjson::Document& doc, * and the tendency to avoid hills * @param options pbf with request options. */ -cost_ptr_t CreateMotorScooterCost(const Costing& costing); +cost_ptr_t CreateMotorScooterCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/nocost.h b/include/common/valhalla/sif/nocost.h index 97b0330..f10e64a 100644 --- a/include/common/valhalla/sif/nocost.h +++ b/include/common/valhalla/sif/nocost.h @@ -16,18 +16,18 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param pbf_costing_options A mutable protocol buffer where the parsed json values will be stored. */ void ParseNoCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* pbf_costing_options); /** * Create an route cost method. This is generally shortest time but uses * hierarchies and can avoid "shortcuts" through residential areas. * @param options pbf with request options. */ -cost_ptr_t CreateNoCost(const Costing& costing); +cost_ptr_t CreateNoCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/pedestriancost.h b/include/common/valhalla/sif/pedestriancost.h index d036d6a..ec15e5a 100644 --- a/include/common/valhalla/sif/pedestriancost.h +++ b/include/common/valhalla/sif/pedestriancost.h @@ -16,19 +16,19 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParsePedestrianCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create a pedestriancost * @param options pbf with request options. */ -cost_ptr_t CreatePedestrianCost(const Costing& costing); +cost_ptr_t CreatePedestrianCost(const CostingOptions& options); -cost_ptr_t CreateBikeShareCost(const Costing& costing); +cost_ptr_t CreateBikeShareCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/transitcost.h b/include/common/valhalla/sif/transitcost.h index f47f23a..a129720 100644 --- a/include/common/valhalla/sif/transitcost.h +++ b/include/common/valhalla/sif/transitcost.h @@ -14,17 +14,17 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParseTransitCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create a transit cost object. * @param options pbf with request options. */ -cost_ptr_t CreateTransitCost(const Costing& costing); +cost_ptr_t CreateTransitCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/sif/truckcost.h b/include/common/valhalla/sif/truckcost.h index e83a0e5..420cd00 100644 --- a/include/common/valhalla/sif/truckcost.h +++ b/include/common/valhalla/sif/truckcost.h @@ -14,17 +14,17 @@ namespace sif { * @param doc The json request represented as a DOM tree. * @param costing_options_key A string representing the location in the DOM tree where the costing * options are stored. - * @param pbf_costing A mutable protocol buffer where the parsed json values will be stored. + * @param co A mutable protocol buffer where the parsed json values will be stored. */ void ParseTruckCostOptions(const rapidjson::Document& doc, const std::string& costing_options_key, - Costing* pbf_costing); + CostingOptions* co); /** * Create a truckcost * @param options pbf with request options. */ -cost_ptr_t CreateTruckCost(const Costing& costing); +cost_ptr_t CreateTruckCost(const CostingOptions& options); } // namespace sif } // namespace valhalla diff --git a/include/common/valhalla/skadi/sample.h b/include/common/valhalla/skadi/sample.h index f544491..1ba9827 100644 --- a/include/common/valhalla/skadi/sample.h +++ b/include/common/valhalla/skadi/sample.h @@ -1,16 +1,9 @@ #ifndef __VALHALLA_SAMPLE_H__ #define __VALHALLA_SAMPLE_H__ -#include -#include #include -#include #include -#include - -#include "valhalla/baldr/tilegetter.h" - namespace valhalla { namespace skadi { @@ -27,32 +20,29 @@ class sample { sample& operator=(const sample&) = delete; /** - * @brief Constructor - * @param[in] config Configuration settings - */ - sample(const boost::property_tree::ptree& config); - - /// TODO(neyromancer): combine both constructors in one with config as an input parameter - /// when valhalla_benchmark_skadi start using config instead of folder - /** - * @brief Constructor - * @param[in] data_source directory name of the datasource from which to sample + * Constructor + * @param data_source directory name of the datasource from which to sample */ sample(const std::string& data_source); ~sample(); /** - * @brief Get a single sample from the datasource + * Get a single sample from the datasource * @param coord the single posting at which to sample the datasource */ template double get(const coord_t& coord); /** - * @brief Get multiple samples from the datasource + * Get multiple samples from the datasource * @param coords the list of postings at which to sample the datasource */ template std::vector get_all(const coords_t& coords); + /** + * @return the no data value for this data source + */ + static double get_no_data_value(); + protected: /** * Get a single sample from the datasource @@ -70,54 +60,20 @@ class sample { template static uint16_t get_tile_index(const coord_t& coord); /** - * @brief Adds single tile in cache. Used only in tests - * @param path path to the tile - */ - void add_single_tile(const std::string& path); - - /** - * @brief Get a single sample from a remote source - * @param[in] index tile index - * @return - * true - in success case - * false - in fail case + * @return The file name of a tile for a given index */ - bool fetch(uint16_t index); + static std::string get_hgt_file_name(uint16_t index); /** - * @brief Add tile to cache and store it in local filesystem. - * @param[in] path path to the tile - * @param[in] raw_data Data to store. + * Adds single tile in cache. Used only in tests + * @param path path to the tile */ - bool store(const std::string& path, const std::vector& raw_data); + void add_single_tile(const std::string& path); + cache_t* cache_; friend cache_t; - std::unique_ptr cache_; - -private: - /** - * @brief used to warm cache - * @param[in] source_path File local storage directory. - */ - void cache_initialisation(const std::string& source_path); - - std::mutex cache_lck; - std::string url_; - std::unique_ptr remote_loader_; - // This parameter is used only in tests - std::string remote_path_; }; -/** - * @return The file name of a tile for a given index - */ -std::string get_hgt_file_name(uint16_t index); - -/** - * @return the no data value for this data source - */ -double get_no_data_value(); - } // namespace skadi } // namespace valhalla diff --git a/include/common/valhalla/baldr/attributes_controller.h b/include/common/valhalla/thor/attributes_controller.h similarity index 93% rename from include/common/valhalla/baldr/attributes_controller.h rename to include/common/valhalla/thor/attributes_controller.h index 8e87243..ec51e24 100644 --- a/include/common/valhalla/baldr/attributes_controller.h +++ b/include/common/valhalla/thor/attributes_controller.h @@ -1,11 +1,11 @@ -#pragma once +#ifndef VALHALLA_THOR_ATTRIBUTES_CONTROLLER_H_ +#define VALHALLA_THOR_ATTRIBUTES_CONTROLLER_H_ + #include #include -#include - namespace valhalla { -namespace baldr { +namespace thor { // Edge keys const std::string kEdgeNames = "edge.names"; @@ -74,7 +74,6 @@ const std::string kEdgeDefaultSpeed = "edge.default_speed"; const std::string kEdgeDestinationOnly = "edge.destination_only"; const std::string kEdgeIsUrban = "edge.is_urban"; const std::string kEdgeTaggedValues = "edge.tagged_values"; -const std::string kEdgeIndoor = "edge.indoor"; // Node keys const std::string kNodeIntersectingEdgeBeginHeading = "node.intersecting_edge.begin_heading"; @@ -154,23 +153,16 @@ const std::string kShapeAttributesCategory = "shape_attributes."; */ struct AttributesController { - // Attributes that are required by the route action to make guidance instructions. + /* + * Attributes that are required by the route action to make guidance instructions. + */ static const std::unordered_map kDefaultAttributes; - /** + /* * Constructor that will use the default values for all of the attributes. */ AttributesController(); - /** - * Apply attribute filters from the request to the AttributesController. These filters - * allow including or excluding specific attributes from the response in route, - * trace_route, and trace_attributes actions. - * @param options request options - * @param is_strict_filter whether or not the include/exclude option is strict - */ - AttributesController(const Options& options, bool is_strict_filter = false); - /** * Disable all of the attributes. */ @@ -181,10 +173,10 @@ struct AttributesController { */ bool category_attribute_enabled(const std::string& category) const; - bool operator()(const std::string& key) const; - std::unordered_map attributes; }; -} // namespace baldr +} // namespace thor } // namespace valhalla + +#endif // VALHALLA_THOR_ATTRIBUTES_CONTROLLER_H_ diff --git a/include/common/valhalla/thor/costmatrix.h b/include/common/valhalla/thor/costmatrix.h index 4d1667f..72e8ce8 100644 --- a/include/common/valhalla/thor/costmatrix.h +++ b/include/common/valhalla/thor/costmatrix.h @@ -11,12 +11,10 @@ #include #include #include -#include +#include #include #include #include -#include -#include namespace valhalla { namespace thor { @@ -29,6 +27,19 @@ constexpr float kCostThresholdBicycleDivisor = 56.0f; // 200 km distance threshold will result in a cost threshold of ~3600 (1 hour) constexpr float kCostThresholdPedestrianDivisor = 28.0f; // 200 km distance threshold will result in a cost threshold of ~7200 (2 hours) +constexpr float kMaxCost = 99999999.9999f; + +// Time and Distance structure +struct TimeDistance { + uint32_t time; // Time in seconds + uint32_t dist; // Distance in meters + + TimeDistance() : time(0), dist(0) { + } + + TimeDistance(const uint32_t secs, const uint32_t meters) : time(secs), dist(meters) { + } +}; /** * Status of a location. Tracks remaining locations to be found @@ -80,8 +91,7 @@ class CostMatrix { * Default constructor. Most internal values are set when a query is made so * the constructor mainly just sets some internals to a default empty value. */ - CostMatrix(const boost::property_tree::ptree& config = {}); - + CostMatrix(); ~CostMatrix(); /** @@ -96,20 +106,18 @@ class CostMatrix { * @return time/distance from origin index to all other locations */ std::vector - SourceToTarget(google::protobuf::RepeatedPtrField& source_location_list, - google::protobuf::RepeatedPtrField& target_location_list, + SourceToTarget(const google::protobuf::RepeatedPtrField& source_location_list, + const google::protobuf::RepeatedPtrField& target_location_list, baldr::GraphReader& graphreader, const sif::mode_costing_t& mode_costing, - const sif::travel_mode_t mode, - const float max_matrix_distance, - const bool has_time = false, - const bool invariant = false); + const sif::TravelMode mode, + const float max_matrix_distance); /** * Clear the temporary information generated during time+distance * matrix construction. */ - void clear(); + void Clear(); protected: // Access mode used by the costing method @@ -121,8 +129,6 @@ class CostMatrix { // Current costing mode std::shared_ptr costing_; - uint32_t max_reserved_labels_count_; - // Number of source and target locations that can be expanded uint32_t source_count_; uint32_t remaining_sources_; @@ -139,23 +145,20 @@ class CostMatrix { // Adjacency lists, EdgeLabels, EdgeStatus, and hierarchy limits for each // source location (forward traversal) std::vector> source_hierarchy_limits_; - std::vector> source_adjacency_; + std::vector>> source_adjacency_; std::vector> source_edgelabel_; std::vector source_edgestatus_; // Adjacency lists, EdgeLabels, EdgeStatus, and hierarchy limits for each // target location (reverse traversal) std::vector> target_hierarchy_limits_; - std::vector> target_adjacency_; + std::vector>> target_adjacency_; std::vector> target_edgelabel_; std::vector target_edgestatus_; // List of best connections found so far std::vector best_connection_; - // when doing timezone differencing a timezone cache speeds up the computation - baldr::DateTime::tz_sys_info_cache_t tz_cache_; - /** * Get the cost threshold based on the current mode and the max arc-length distance * for that mode. @@ -178,11 +181,7 @@ class CostMatrix { * @param n Iteration counter. * @param graphreader Graph reader for accessing routing graph. */ - void ForwardSearch(const uint32_t index, - const uint32_t n, - baldr::GraphReader& graphreader, - const baldr::TimeInfo& time_info, - const bool invariant); + void ForwardSearch(const uint32_t index, const uint32_t n, baldr::GraphReader& graphreader); /** * Check if the edge on the forward search connects to a reached edge @@ -214,8 +213,7 @@ class CostMatrix { * @param sources List of source/origin locations. */ void SetSources(baldr::GraphReader& graphreader, - const google::protobuf::RepeatedPtrField& sources, - const std::vector& time_infos); + const google::protobuf::RepeatedPtrField& sources); /** * Set the target/destination locations. Search expands backwards from @@ -244,42 +242,6 @@ class CostMatrix { const sif::BDEdgeLabel& pred, const uint32_t predindex); - /** - * If time awareness was requested for the CostMatrix algorithm, we need - * to form the paths the sources & targets generated, and recost them to - * update the best connections, before returning the result. - * @param graphreader Graph tile reader - * @param origins The source locations - * @param targets The target locations - * @param time_infos The time info objects for the sources - * @param invariant Whether time is invariant - */ - void RecostPaths(baldr::GraphReader& graphreader, - google::protobuf::RepeatedPtrField& sources, - google::protobuf::RepeatedPtrField& targets, - const std::vector& time_infos, - bool invariant); - - /** - * Sets the date_time on the origin locations. - * - * @param origins the origins (sources or targets) - * @param reader the reader for looking up timezone information - * @returns time info for each location - */ - std::vector - SetOriginTimes(google::protobuf::RepeatedPtrField& origins, - baldr::GraphReader& reader) { - // loop over all locations setting the date time with timezone - std::vector infos; - infos.reserve(origins.size()); - for (auto& origin : origins) { - infos.emplace_back(baldr::TimeInfo::make(origin, reader, &tz_cache_)); - } - - return infos; - }; - /** * Form a time/distance matrix from the results. * @return Returns a time distance matrix among locations. diff --git a/include/common/valhalla/thor/dijkstras.h b/include/common/valhalla/thor/dijkstras.h index 5c82491..7034c75 100644 --- a/include/common/valhalla/thor/dijkstras.h +++ b/include/common/valhalla/thor/dijkstras.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -102,8 +102,7 @@ class Dijkstras { ComputeMultiModal(google::protobuf::RepeatedPtrField& origin_locations, baldr::GraphReader& graphreader, const sif::mode_costing_t& mode_costing, - const sif::TravelMode mode, - const valhalla::Options& options); + const sif::TravelMode mode); // A child-class must implement this to learn about what nodes were expanded virtual void ExpandingNode(baldr::GraphReader&, @@ -130,8 +129,8 @@ class Dijkstras { uint32_t dow_; uint32_t day_; uint32_t max_transfer_distance_; - uint32_t max_walking_dist_; std::string origin_date_time_; + uint32_t start_time_; std::unordered_map operators_; std::unordered_set processed_tiles_; diff --git a/include/common/valhalla/thor/isochrone.h b/include/common/valhalla/thor/isochrone.h index 5a62891..7f2d0d8 100644 --- a/include/common/valhalla/thor/isochrone.h +++ b/include/common/valhalla/thor/isochrone.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -60,17 +60,6 @@ class Isochrone : public Dijkstras { const sif::mode_costing_t& costings, const sif::TravelMode mode); - /** - * Set the child's expansion callback which will be swapped in and out - * if the requirements are met. - * - * @param callback the functor to call back when the Dijkstra makes progress - * on a given edge - */ - void SetInnerExpansionCallback(const expansion_callback_t callback) { - inner_expansion_callback_ = callback; - } - protected: // when we expand up to a node we color the cells of the grid that the edge that ends at the // node touches @@ -93,7 +82,6 @@ class Isochrone : public Dijkstras { float max_seconds_; float max_meters_; std::shared_ptr> isotile_; - expansion_callback_t inner_expansion_callback_; /** * Constructs the isotile - 2-D gridded data containing the time diff --git a/include/common/valhalla/thor/matrix_common.h b/include/common/valhalla/thor/matrix_common.h index e7ecf49..d0bdbca 100644 --- a/include/common/valhalla/thor/matrix_common.h +++ b/include/common/valhalla/thor/matrix_common.h @@ -15,126 +15,31 @@ #include #include #include +#include #include #include -#include namespace valhalla { namespace thor { -enum class MatrixType : bool { TimeDist, Cost }; - -// Default for time distance matrix is to find all locations -constexpr uint32_t kAllLocations = std::numeric_limits::max(); -constexpr float kMaxCost = 99999999.9999f; - // Structure to hold information about each destination. struct Destination { - // per-origin information bool settled; // Has the best time/distance to this destination // been found? sif::Cost best_cost; // Current best cost to this destination - // Set of still available correlated edges; - std::unordered_set dest_edges_available; + uint32_t distance; // Path distance for the best cost path + float threshold; // Threshold above current best cost where no longer + // need to search for this destination. - // global information which only needs to be set once or is reset for every origin in the algorithm - uint32_t distance; // Path distance for the best cost path - float threshold; // Threshold above current best cost where no longer - // need to search for this destination. - // partial distance of correlated edges - std::unordered_map dest_edges_percent_along; + // Potential edges for this destination (and their partial distance) + std::unordered_map dest_edges; // Constructor - set best_cost to an absurdly high value so any new cost // will be lower. Destination() : settled(false), best_cost{kMaxCost, kMaxCost}, distance(0), threshold(0.0f) { } - - // clears the per-origin information - void reset() { - settled = false; - best_cost = {kMaxCost, kMaxCost}; - dest_edges_available.clear(); - } -}; - -// Time and Distance structure -struct TimeDistance { - uint32_t time; // Time in seconds - uint32_t dist; // Distance in meters - std::string date_time; - - TimeDistance() : time(0), dist(0), date_time("") { - } - - TimeDistance(const uint32_t secs, const uint32_t meters) : time(secs), dist(meters), date_time("") { - } - - TimeDistance(const uint32_t secs, const uint32_t meters, std::string date_time) - : time(secs), dist(meters), date_time(date_time) { - } }; -// Will return a destination's date_time string -inline std::string get_date_time(const std::string& origin_dt, - const uint64_t& origin_tz, - const baldr::GraphId& pred_id, - baldr::GraphReader& reader, - const uint64_t& offset) { - if (origin_dt.empty()) { - return ""; - } else if (!offset) { - return origin_dt; - } - graph_tile_ptr tile = nullptr; - uint32_t dest_tz = 0; - if (pred_id.Is_Valid()) { - // get the timezone of the output location - auto out_nodes = reader.GetDirectedEdgeNodes(pred_id, tile); - dest_tz = reader.GetTimezone(out_nodes.first, tile) || reader.GetTimezone(out_nodes.second, tile); - } - - auto in_epoch = - baldr::DateTime::seconds_since_epoch(origin_dt, - baldr::DateTime::get_tz_db().from_index(origin_tz)); - uint64_t out_epoch = in_epoch + offset; - std::string out_dt = - baldr::DateTime::seconds_to_date(out_epoch, baldr::DateTime::get_tz_db().from_index(dest_tz), - false); - - return out_dt; -} - -// return true if any location had a valid time set -// return false if it doesn't make sense computationally and add warnings accordingly -inline bool check_matrix_time(Api& request, const MatrixType type) { - const auto& options = request.options(); - bool less_sources = options.sources().size() <= options.targets().size(); - - for (const auto& source : options.sources()) { - if (!source.date_time().empty()) { - if (!less_sources && type == MatrixType::TimeDist) { - add_warning(request, 201); - return false; - } - return true; - } - } - for (const auto& target : options.targets()) { - if (!target.date_time().empty()) { - if (less_sources && type == MatrixType::TimeDist) { - add_warning(request, 202); - return false; - } else if (type == MatrixType::Cost) { - add_warning(request, 206); - return false; - } - return true; - } - } - - return false; -} - } // namespace thor } // namespace valhalla diff --git a/include/common/valhalla/thor/multimodal.h b/include/common/valhalla/thor/multimodal.h index 365e948..fe32007 100644 --- a/include/common/valhalla/thor/multimodal.h +++ b/include/common/valhalla/thor/multimodal.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,7 +74,8 @@ class MultiModalPathAlgorithm : public PathAlgorithm { void Clear() override; protected: - uint32_t max_walking_dist_; + // Current walking distance. + uint32_t walking_distance_; uint32_t max_label_count_; // Max label count to allow sif::TravelMode mode_; // Current travel mode uint8_t travel_type_; // Current travel type diff --git a/include/common/valhalla/thor/pathalgorithm.h b/include/common/valhalla/thor/pathalgorithm.h index 0d1a5e9..1ed169e 100644 --- a/include/common/valhalla/thor/pathalgorithm.h +++ b/include/common/valhalla/thor/pathalgorithm.h @@ -162,9 +162,9 @@ class PathAlgorithm { virtual bool IsTrivial(const baldr::GraphId& edgeid, const valhalla::Location& origin, const valhalla::Location& destination) const { - for (const auto& destination_edge : destination.correlation().edges()) { + for (const auto& destination_edge : destination.path_edges()) { if (destination_edge.graph_id() == edgeid) { - for (const auto& origin_edge : origin.correlation().edges()) { + for (const auto& origin_edge : origin.path_edges()) { if (origin_edge.graph_id() == edgeid && origin_edge.percent_along() <= destination_edge.percent_along()) { return true; diff --git a/include/common/valhalla/thor/route_matcher.h b/include/common/valhalla/thor/route_matcher.h index f2e78d5..b93bbbf 100644 --- a/include/common/valhalla/thor/route_matcher.h +++ b/include/common/valhalla/thor/route_matcher.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/common/valhalla/thor/timedistancebssmatrix.h b/include/common/valhalla/thor/timedistancebssmatrix.h index 7add083..3ceb287 100644 --- a/include/common/valhalla/thor/timedistancebssmatrix.h +++ b/include/common/valhalla/thor/timedistancebssmatrix.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,65 @@ class TimeDistanceBSSMatrix { * Default constructor. Most internal values are set when a query is made so * the constructor mainly just sets some internals to a default empty value. */ - TimeDistanceBSSMatrix(const boost::property_tree::ptree& config = {}); + TimeDistanceBSSMatrix(); + + /** + * One to many time and distance cost matrix. Computes time and distance + * matrix from one origin location to many other locations. + * @param origin Location of the origin. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. Actually It doesn't make sense in matrix_bss, because + * the travel mode must be pedestrian and bicycle + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance from origin index to all other locations + */ + std::vector + OneToMany(const valhalla::Location& origin, + const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode /*mode*/, + const float max_matrix_distance); + + /** + * Many to one time and distance cost matrix. Computes time and distance + * matrix from many locations to one destination location. + * @param dest Location of the destination. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. Actually It doesn't make sense in matrix_bss, because + * the travel mode must be pedestrian and bicycle + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance to the destination index from all other locations + */ + std::vector + ManyToOne(const valhalla::Location& dest, + const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode /*mode*/, + const float max_matrix_distance); + + /** + * Many to many time and distance cost matrix. Computes time and distance + * matrix from many locations to many locations. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. Actually It doesn't make sense in matrix_bss, because + * the travel mode must be pedestrian and bicycle + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance between all pairs of locations + */ + std::vector + ManyToMany(const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode /*mode*/, + const float max_matrix_distance); /** * Forms a time distance matrix from the set of source locations @@ -41,52 +100,21 @@ class TimeDistanceBSSMatrix { * @param mode Travel mode to use. Actually It doesn't make sense in matrix_bss, * because the travel mode must be pedestrian and bicycle * @param max_matrix_distance Maximum arc-length distance for current mode. - * @param matrix_locations Number of matrix locations to satisfy a one to many or many to - * one request. This allows partial results: e.g. find time/distance - * to the closest 20 out of 50 locations). * @return time/distance from origin index to all other locations */ - inline std::vector + std::vector SourceToTarget(const google::protobuf::RepeatedPtrField& source_location_list, const google::protobuf::RepeatedPtrField& target_location_list, baldr::GraphReader& graphreader, const sif::mode_costing_t& mode_costing, - const sif::travel_mode_t /*mode*/, - const float max_matrix_distance, - const uint32_t matrix_locations = kAllLocations) { - - LOG_INFO("matrix::TimeDistanceBSSMatrix"); - - // Set the costings - pedestrian_costing_ = mode_costing[static_cast(sif::travel_mode_t::kPedestrian)]; - bicycle_costing_ = mode_costing[static_cast(sif::travel_mode_t::kBicycle)]; - - const bool forward_search = source_location_list.size() <= target_location_list.size(); - if (forward_search) { - return ComputeMatrix(source_location_list, target_location_list, - graphreader, max_matrix_distance, - matrix_locations); - } else { - return ComputeMatrix(source_location_list, target_location_list, - graphreader, max_matrix_distance, - matrix_locations); - } - }; + const sif::TravelMode /*mode*/, + const float max_matrix_distance); /** * Clear the temporary information generated during time+distance * matrix construction. */ - inline void clear() { - auto reservation = clear_reserved_memory_ ? 0 : max_reserved_labels_count_; - if (edgelabels_.size() > reservation) { - edgelabels_.resize(max_reserved_labels_count_); - edgelabels_.shrink_to_fit(); - } - reset(); - destinations_.clear(); - dest_edges_.clear(); - }; + void Clear(); protected: // Number of destinations that have been found and settled (least cost path @@ -96,9 +124,6 @@ class TimeDistanceBSSMatrix { // The cost threshold being used for the currently executing query float current_cost_threshold_; - uint32_t max_reserved_labels_count_; - bool clear_reserved_memory_; - // A* heuristic AStarHeuristic pedestrian_astarheuristic_; AStarHeuristic bicycle_astarheuristic_; @@ -125,43 +150,29 @@ class TimeDistanceBSSMatrix { std::unordered_map> dest_edges_; /** - * Reset all origin-specific information - */ - inline void reset() { - auto reservation = clear_reserved_memory_ ? 0 : max_reserved_labels_count_; - if (edgelabels_.size() > reservation) { - edgelabels_.resize(max_reserved_labels_count_); - edgelabels_.shrink_to_fit(); - } - edgelabels_.clear(); - // Clear the per-origin information - for (auto& dest : destinations_) { - dest.reset(); - } - - // Clear elements from the adjacency list - adjacencylist_.clear(); - - // Clear the edge status flags - pedestrian_edgestatus_.clear(); - bicycle_edgestatus_.clear(); - }; - - /** - * Computes the matrix after SourceToTarget decided which direction - * the algorithm should traverse. + * Expand from the node along the forward search path. Immediately expands + * from the end node of any transition edge (so no transition edges are added + * to the adjacency list or EdgeLabel list). Does not expand transition + * edges if from_transition is false. + * @param graphreader Graph tile reader. + * @param node Graph Id of the node being expanded. + * @param pred Predecessor edge label (for costing). + * @param pred_idx Predecessor index into the EdgeLabel list. + * @param from_transition True if this method is called from a transition + * edge. + * @param from_bss Is this Expansion done from a bike share station? + * @param mode the current travel mode */ - template - std::vector - ComputeMatrix(const google::protobuf::RepeatedPtrField& source_location_list, - const google::protobuf::RepeatedPtrField& target_location_list, - baldr::GraphReader& graphreader, - const float max_matrix_distance, - const uint32_t matrix_locations = kAllLocations); + void ExpandForward(baldr::GraphReader& graphreader, + const baldr::GraphId& node, + const sif::EdgeLabel& pred, + const uint32_t pred_idx, + const bool from_transition, + const bool from_bss, + const sif::TravelMode mode); /** - * Expand from the node along the forward search path. Immediately expands + * Expand from the node along the reverse search path. Immediately expands * from the end node of any transition edge (so no transition edges are added * to the adjacency list or EdgeLabel list). Does not expand transition * edges if from_transition is false. @@ -174,15 +185,13 @@ class TimeDistanceBSSMatrix { * @param from_bss Is this Expansion done from a bike share station? * @param mode the current travel mode */ - template - void Expand(baldr::GraphReader& graphreader, - const baldr::GraphId& node, - const sif::EdgeLabel& pred, - const uint32_t pred_idx, - const bool from_transition, - const bool from_bss, - const sif::TravelMode mode); + void ExpandReverse(baldr::GraphReader& graphreader, + const baldr::GraphId& node, + const sif::EdgeLabel& pred, + const uint32_t pred_idx, + const bool from_transition, + const bool from_bss, + const sif::TravelMode mode); /** * Get the cost threshold based on the current mode and the max arc-length distance @@ -196,32 +205,32 @@ class TimeDistanceBSSMatrix { * @param graphreader Graph reader for accessing routing graph. * @param origin Origin location information. */ - template - void SetOrigin(baldr::GraphReader& graphreader, const valhalla::Location& origin); + void SetOriginOneToMany(baldr::GraphReader& graphreader, const valhalla::Location& origin); /** - * Initalize destinations for all origins. + * Sets the origin for a many to one time+distance matrix computation. + * @param graphreader Graph reader for accessing routing graph. + * @param dest Destination + */ + void SetOriginManyToOne(baldr::GraphReader& graphreader, const valhalla::Location& dest); + + /** + * Add destinations. * @param graphreader Graph reader for accessing routing graph. * @param locations List of locations. */ - template - void InitDestinations(baldr::GraphReader& graphreader, - const google::protobuf::RepeatedPtrField& locations); + void + SetDestinationsOneToMany(baldr::GraphReader& graphreader, + const google::protobuf::RepeatedPtrField& locations); /** - * Set the available destination edges for each origin. - * @param locations List of destination locations. + * Set destinations for the many to one time+distance matrix computation. + * @param graphreader Graph reader for accessing routing graph. + * @param locations List of locations. */ - void SetDestinationEdges() { - // the percent_along is set once at the beginning - for (auto& dest : destinations_) { - for (const auto& idx : dest.dest_edges_percent_along) { - dest.dest_edges_available.emplace(idx.first); - } - } - }; + void + SetDestinationsManyToOne(baldr::GraphReader& graphreader, + const google::protobuf::RepeatedPtrField& locations); /** * Update destinations along an edge that has been settled (lowest cost path @@ -232,10 +241,6 @@ class TimeDistanceBSSMatrix { * @param edge Directed edge * @param pred Predecessor information in shortest path. * @param predindex Predecessor index in EdgeLabels vector. - * @param matrix_locations Count of locations that must be found. When provided it allows - * a partial result to be returned (e.g. best 20 out of 50 locations). - * When not supplied in the request this is set to max uint32_t value - * so that all supplied locations must be settled. * @return Returns true if all destinations have been settled. */ bool UpdateDestinations(const valhalla::Location& origin, @@ -243,8 +248,7 @@ class TimeDistanceBSSMatrix { std::vector& destinations, const baldr::DirectedEdge* edge, const graph_tile_ptr& tile, - const sif::EdgeLabel& pred, - const uint32_t matrix_locations); + const sif::EdgeLabel& pred); /** * Form a time/distance matrix from the results. diff --git a/include/common/valhalla/thor/timedistancematrix.h b/include/common/valhalla/thor/timedistancematrix.h index 63341cc..703c9dc 100644 --- a/include/common/valhalla/thor/timedistancematrix.h +++ b/include/common/valhalla/thor/timedistancematrix.h @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include #include @@ -27,7 +29,62 @@ class TimeDistanceMatrix { * Default constructor. Most internal values are set when a query is made so * the constructor mainly just sets some internals to a default empty value. */ - TimeDistanceMatrix(const boost::property_tree::ptree& config = {}); + TimeDistanceMatrix(); + + /** + * One to many time and distance cost matrix. Computes time and distance + * matrix from one origin location to many other locations. + * @param origin Location of the origin. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance from origin index to all other locations + */ + std::vector + OneToMany(const valhalla::Location& origin, + const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode mode, + const float max_matrix_distance); + + /** + * Many to one time and distance cost matrix. Computes time and distance + * matrix from many locations to one destination location. + * @param dest Location of the destination. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance to the destination index from all other locations + */ + std::vector + ManyToOne(const valhalla::Location& dest, + const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode mode, + const float max_matrix_distance); + + /** + * Many to many time and distance cost matrix. Computes time and distance + * matrix from many locations to many locations. + * @param locations List of locations. + * @param graphreader Graph reader for accessing routing graph. + * @param mode_costing Costing methods. + * @param mode Travel mode to use. + * @param max_matrix_distance Maximum arc-length distance for current mode. + * @return time/distance between all pairs of locations + */ + std::vector + ManyToMany(const google::protobuf::RepeatedPtrField& locations, + baldr::GraphReader& graphreader, + const sif::mode_costing_t& mode_costing, + const sif::TravelMode mode, + const float max_matrix_distance); /** * Forms a time distance matrix from the set of source locations @@ -38,56 +95,21 @@ class TimeDistanceMatrix { * @param mode_costing Costing methods. * @param mode Travel mode to use. * @param max_matrix_distance Maximum arc-length distance for current mode. - * @param matrix_locations Number of matrix locations to satisfy a one to many or many to - * one request. This allows partial results: e.g. find time/distance - * to the closest 20 out of 50 locations). - * @param has_time Whether the request had valid date_time. - * @param invariant Whether invariant time was requested. - * - * @return time/distance from all sources to all targets + * @return time/distance from origin index to all other locations */ - inline std::vector - SourceToTarget(google::protobuf::RepeatedPtrField& source_location_list, - google::protobuf::RepeatedPtrField& target_location_list, + std::vector + SourceToTarget(const google::protobuf::RepeatedPtrField& source_location_list, + const google::protobuf::RepeatedPtrField& target_location_list, baldr::GraphReader& graphreader, const sif::mode_costing_t& mode_costing, - const sif::travel_mode_t mode, - const float max_matrix_distance, - const uint32_t matrix_locations = kAllLocations, - const bool invariant = false) { - - LOG_INFO("matrix::TimeDistanceMatrix"); - - // Set the mode and costing - mode_ = mode; - costing_ = mode_costing[static_cast(mode_)]; - - const bool forward_search = source_location_list.size() <= target_location_list.size(); - if (forward_search) { - return ComputeMatrix(source_location_list, target_location_list, - graphreader, max_matrix_distance, matrix_locations, - invariant); - } else { - return ComputeMatrix(target_location_list, source_location_list, - graphreader, max_matrix_distance, matrix_locations, - invariant); - } - }; + const sif::TravelMode mode, + const float max_matrix_distance); /** * Clear the temporary information generated during time+distance * matrix construction. */ - inline void clear() { - auto reservation = clear_reserved_memory_ ? 0 : max_reserved_labels_count_; - if (edgelabels_.size() > reservation) { - edgelabels_.resize(max_reserved_labels_count_); - edgelabels_.shrink_to_fit(); - } - reset(); - destinations_.clear(); - dest_edges_.clear(); - }; + void Clear(); protected: // Number of destinations that have been found and settled (least cost path @@ -97,9 +119,6 @@ class TimeDistanceMatrix { // The cost threshold being used for the currently executing query float current_cost_threshold_; - uint32_t max_reserved_labels_count_; - bool clear_reserved_memory_; - // List of destinations std::vector destinations_; @@ -119,46 +138,30 @@ class TimeDistanceMatrix { // Edge status. Mark edges that are in adjacency list or settled. EdgeStatus edgestatus_; - sif::travel_mode_t mode_; + AStarHeuristic astarheuristic_; - // when doing timezone differencing a timezone cache speeds up the computation - baldr::DateTime::tz_sys_info_cache_t tz_cache_; + sif::TravelMode mode_; /** - * Reset all origin-specific information - */ - inline void reset() { - // Clear the per-origin information - for (auto& dest : destinations_) { - dest.reset(); - } - - // Clear the edge labels - edgelabels_.clear(); - - // Clear elements from the adjacency list - adjacencylist_.clear(); - - // Clear the edge status flags - edgestatus_.clear(); - }; - - /** - * Computes the matrix after SourceToTarget decided which direction - * the algorithm should traverse. + * Expand from the node along the forward search path. Immediately expands + * from the end node of any transition edge (so no transition edges are added + * to the adjacency list or EdgeLabel list). Does not expand transition + * edges if from_transition is false. + * @param graphreader Graph tile reader. + * @param node Graph Id of the node being expanded. + * @param pred Predecessor edge label (for costing). + * @param pred_idx Predecessor index into the EdgeLabel list. + * @param from_transition True if this method is called from a transition + * edge. */ - template - std::vector - ComputeMatrix(google::protobuf::RepeatedPtrField& source_location_list, - google::protobuf::RepeatedPtrField& target_location_list, - baldr::GraphReader& graphreader, - const float max_matrix_distance, - const uint32_t matrix_locations = kAllLocations, - const bool invariant = false); + void ExpandForward(baldr::GraphReader& graphreader, + const baldr::GraphId& node, + const sif::EdgeLabel& pred, + const uint32_t pred_idx, + const bool from_transition); /** - * Expand from the node along the forward search path. Immediately expands + * Expand from the node along the reverse search path. Immediately expands * from the end node of any transition edge (so no transition edges are added * to the adjacency list or EdgeLabel list). Does not expand transition * edges if from_transition is false. @@ -168,17 +171,12 @@ class TimeDistanceMatrix { * @param pred_idx Predecessor index into the EdgeLabel list. * @param from_transition True if this method is called from a transition * edge. - * @param invariant Whether invariant time was requested. */ - template - void Expand(baldr::GraphReader& graphreader, - const baldr::GraphId& node, - const sif::EdgeLabel& pred, - const uint32_t pred_idx, - const bool from_transition, - const baldr::TimeInfo& time_info, - const bool invariant = false); + void ExpandReverse(baldr::GraphReader& graphreader, + const baldr::GraphId& node, + const sif::EdgeLabel& pred, + const uint32_t pred_idx, + const bool from_transition); /** * Get the cost threshold based on the current mode and the max arc-length distance @@ -192,34 +190,31 @@ class TimeDistanceMatrix { * @param graphreader Graph reader for accessing routing graph. * @param origin Origin location information. */ - template - void SetOrigin(baldr::GraphReader& graphreader, - const valhalla::Location& origin, - const baldr::TimeInfo& time_info); + void SetOriginOneToMany(baldr::GraphReader& graphreader, const valhalla::Location& origin); + + /** + * Sets the origin for a many to one time+distance matrix computation. + * @param graphreader Graph reader for accessing routing graph. + * @param dest Destination + */ + void SetOriginManyToOne(baldr::GraphReader& graphreader, const valhalla::Location& dest); /** * Add destinations. * @param graphreader Graph reader for accessing routing graph. * @param locations List of locations. */ - template - void InitDestinations(baldr::GraphReader& graphreader, - const google::protobuf::RepeatedPtrField& locations); + void SetDestinations(baldr::GraphReader& graphreader, + const google::protobuf::RepeatedPtrField& locations); /** - * Set the available destination edges for each origin. - * @param locations List of destination locations. + * Set destinations for the many to one time+distance matrix computation. + * @param graphreader Graph reader for accessing routing graph. + * @param locations List of locations. */ - void SetDestinationEdges() { - // the percent_along is set once at the beginning - for (auto& dest : destinations_) { - for (const auto& idx : dest.dest_edges_percent_along) { - dest.dest_edges_available.emplace(idx.first); - } - } - }; + void + SetDestinationsManyToOne(baldr::GraphReader& graphreader, + const google::protobuf::RepeatedPtrField& locations); /** * Update destinations along an edge that has been settled (lowest cost path @@ -229,10 +224,6 @@ class TimeDistanceMatrix { * @param destinations Vector of destination indexes along this edge. * @param edge Directed edge * @param pred Predecessor information in shortest path. - * @param matrix_locations Count of locations that must be found. When provided it allows - * a partial result to be returned (e.g. best 20 out of 50 locations). - * When not supplied in the request this is set to max uint32_t value - * so that all supplied locations must be settled. * @return Returns true if all destinations have been settled. */ bool UpdateDestinations(const valhalla::Location& origin, @@ -240,43 +231,13 @@ class TimeDistanceMatrix { std::vector& destinations, const baldr::DirectedEdge* edge, const graph_tile_ptr& tile, - const sif::EdgeLabel& pred, - const baldr::TimeInfo& time_info, - const uint32_t matrix_locations); - - /** - * Sets the date_time on the origin locations. - * - * @param origins the origins (sources or targets) - * @param reader the reader for looking up timezone information - * @returns time info for each location - */ - std::vector - SetTime(google::protobuf::RepeatedPtrField& origins, - baldr::GraphReader& reader) { - // loop over all locations setting the date time with timezone - std::vector infos; - infos.reserve(origins.size()); - for (auto& origin : origins) { - infos.emplace_back(baldr::TimeInfo::make(origin, reader, &tz_cache_)); - } - - return infos; - }; + const sif::EdgeLabel& pred); /** * Form a time/distance matrix from the results. - * @param reader GraphReader instance - * @param origin_dt The origin's date_time string - * @param origin_tz The origin's timezone index - * @param pred_id The destination edge's GraphId - * * @return Returns a time distance matrix among locations. */ - std::vector FormTimeDistanceMatrix(baldr::GraphReader& reader, - const std::string& origin_dt, - const uint64_t& origin_tz, - const baldr::GraphId& pred_id); + std::vector FormTimeDistanceMatrix(); }; } // namespace thor diff --git a/include/common/valhalla/thor/triplegbuilder.h b/include/common/valhalla/thor/triplegbuilder.h index 567e787..b2d1eda 100644 --- a/include/common/valhalla/thor/triplegbuilder.h +++ b/include/common/valhalla/thor/triplegbuilder.h @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -14,6 +13,7 @@ #include #include #include +#include #include namespace valhalla { @@ -51,7 +51,7 @@ class TripLegBuilder { * @return */ static void Build(const valhalla::Options& options, - const baldr::AttributesController& controller, + const AttributesController& controller, baldr::GraphReader& graphreader, const sif::mode_costing_t& mode_costing, const std::vector::const_iterator path_begin, diff --git a/include/common/valhalla/thor/unidirectional_astar.h b/include/common/valhalla/thor/unidirectional_astar.h index a4a5526..76b0d92 100644 --- a/include/common/valhalla/thor/unidirectional_astar.h +++ b/include/common/valhalla/thor/unidirectional_astar.h @@ -185,9 +185,8 @@ class UnidirectionalAStar : public PathAlgorithm { // Edge status. Mark edges that are in adjacency list or settled. EdgeStatus edgestatus_; - // Mark if edge is a destination - std::unordered_multimap> - destinations_; + // Destinations, id and percent used along the edge + std::unordered_map destinations_percent_along_; // Access mode used by the costing method uint32_t access_mode_; diff --git a/include/common/valhalla/thor/worker.h b/include/common/valhalla/thor/worker.h index 3b31306..adef99f 100644 --- a/include/common/valhalla/thor/worker.h +++ b/include/common/valhalla/thor/worker.h @@ -7,7 +7,6 @@ #include -#include #include #include #include @@ -20,13 +19,11 @@ #include #include #include +#include #include #include -#include #include #include -#include -#include #include #include #include @@ -52,8 +49,6 @@ class thor_worker_t : public service_worker_t { #endif virtual void cleanup() override; - static void adjust_scores(valhalla::Options& options); - static std::string offset_date(baldr::GraphReader& reader, const std::string& in_dt, const baldr::GraphId& in_edge, @@ -95,8 +90,11 @@ class thor_worker_t : public service_worker_t { void path_arrive_by(Api& api, const std::string& costing); void path_depart_at(Api& api, const std::string& costing); + + void parse_locations(Api& request); void parse_measurements(const Api& request); std::string parse_costing(const Api& request); + void parse_filter_attributes(const Api& request, bool is_strict_filter = false); void build_route( const std::deque, std::vector>>& @@ -124,11 +122,6 @@ class thor_worker_t : public service_worker_t { TimeDepForward timedep_forward; TimeDepReverse timedep_reverse; - // Time distance matrix - CostMatrix costmatrix_; - TimeDistanceMatrix time_distance_matrix_; - TimeDistanceBSSMatrix time_distance_bss_matrix_; - Isochrone isochrone_gen; std::shared_ptr matcher; float max_timedep_distance; @@ -136,7 +129,7 @@ class thor_worker_t : public service_worker_t { SOURCE_TO_TARGET_ALGORITHM source_to_target_algorithm; std::shared_ptr reader; meili::MapMatcherFactory matcher_factory; - baldr::AttributesController controller; + AttributesController controller; Centroid centroid_gen; private: diff --git a/include/common/valhalla/tile_server.h b/include/common/valhalla/tile_server.h index 8cd402d..d0cab5b 100644 --- a/include/common/valhalla/tile_server.h +++ b/include/common/valhalla/tile_server.h @@ -8,13 +8,9 @@ struct context_t; namespace valhalla { class test_tile_server_t { - std::string m_url{"*:8004"}; - public: - void start(const std::string& tile_source_dir, zmq::context_t& context); - void set_url(const std::string& url) { - m_url = url; - } + static const std::string server_url; + static void start(const std::string& tile_source_dir, zmq::context_t& context); }; } // namespace valhalla \ No newline at end of file diff --git a/include/common/valhalla/tyr/actor.h b/include/common/valhalla/tyr/actor.h index 43ecb75..c78e111 100644 --- a/include/common/valhalla/tyr/actor.h +++ b/include/common/valhalla/tyr/actor.h @@ -213,6 +213,10 @@ class actor_t { const std::function* interrupt = nullptr, Api* api = nullptr); + std::string get_livespeed(const uint64_t value); + std::unordered_map> get_all_shortcuts(); + std::uint32_t get_edge_speed(const uint64_t value); + protected: struct pimpl_t; std::shared_ptr pimpl; diff --git a/include/common/valhalla/tyr/serializers.h b/include/common/valhalla/tyr/serializers.h index 30cd1b4..8f1e890 100644 --- a/include/common/valhalla/tyr/serializers.h +++ b/include/common/valhalla/tyr/serializers.h @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -16,7 +15,8 @@ #include #include #include -#include +#include +#include #include namespace valhalla { @@ -32,8 +32,7 @@ std::string serializeDirections(Api& request); */ std::string serializeMatrix(const Api& request, const std::vector& time_distances, - double distance_scale, - thor::MatrixType matrix_type); + double distance_scale); /** * Turn grid data contours into geojson @@ -92,8 +91,8 @@ std::string serializeTransitAvailable(const Api& request, * @param results The vector of trip paths and match results for each match found */ std::string serializeTraceAttributes( - Api& request, - const baldr::AttributesController& controller, + const Api& request, + const thor::AttributesController& controller, std::vector>>& results); /** @@ -101,7 +100,7 @@ std::string serializeTraceAttributes( * @param request the proto request with status info attached * @return json string */ -std::string serializeStatus(Api& request); +std::string serializeStatus(const Api& request); // Return a JSON array of OpenLR 1.5 line location references for each edge of a map matching // result. For the time being, result is only non-empty for auto costing requests. @@ -111,20 +110,6 @@ void route_references(baldr::json::MapPtr& route_json, void openlr(const valhalla::Api& api, int route_index, rapidjson::writer_wrapper_t& writer); -/** - * Turns the pbf into bytes omitting the fields specified in the request options pbf field selector - * @param request The protobuf object which will be serialized - * @return the bytes representing the protobuf object - */ -std::string serializePbf(Api& request); - -/** - * @brief Turns warnings into json - * @param request The protobuf warnings object - * @return json string - */ -void serializeWarnings(const valhalla::Api& api, rapidjson::writer_wrapper_t& writer); -baldr::json::ArrayPtr serializeWarnings(const valhalla::Api& api); } // namespace tyr } // namespace valhalla diff --git a/include/common/valhalla/valhalla.h b/include/common/valhalla/valhalla.h index 421459f..566d902 100644 --- a/include/common/valhalla/valhalla.h +++ b/include/common/valhalla/valhalla.h @@ -1,5 +1,6 @@ #pragma once #define VALHALLA_VERSION_MAJOR 3 -#define VALHALLA_VERSION_MINOR 4 -#define VALHALLA_VERSION_PATCH 0 +#define VALHALLA_VERSION_MINOR 1 +#define VALHALLA_VERSION_PATCH 4 + diff --git a/include/common/valhalla/worker.h b/include/common/valhalla/worker.h index 3332e49..777f277 100644 --- a/include/common/valhalla/worker.h +++ b/include/common/valhalla/worker.h @@ -74,10 +74,6 @@ void ParseApi(const prime_server::http_request_t& http_request, Api& api); #endif std::string serialize_error(const valhalla_exception_t& exception, Api& options); - -// function to add warnings to proto info object -void add_warning(valhalla::Api& api, unsigned code); - #ifdef HAVE_HTTP prime_server::worker_t::result_t serialize_error(const valhalla_exception_t& exception, prime_server::http_request_info_t& request_info, diff --git a/include/linux/valhalla/proto/directions.pb.cc b/include/linux/valhalla/proto/directions.pb.cc index e2993a1..1a5e7c9 100644 --- a/include/linux/valhalla/proto/directions.pb.cc +++ b/include/linux/valhalla/proto/directions.pb.cc @@ -21,13 +21,11 @@ namespace valhalla { PROTOBUF_CONSTEXPR DirectionsLeg_Summary::DirectionsLeg_Summary( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.bbox_)*/nullptr - , /*decltype(_impl_.time_)*/0 - , /*decltype(_impl_.length_)*/0 - , /*decltype(_impl_.has_time_restrictions_)*/false - , /*decltype(_impl_.has_toll_)*/false - , /*decltype(_impl_.has_ferry_)*/false - , /*decltype(_impl_.has_highway_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_length_)*/{} + , /*decltype(_impl_.has_time_)*/{} + , /*decltype(_impl_.has_has_time_restrictions_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct DirectionsLeg_SummaryDefaultTypeInternal { PROTOBUF_CONSTEXPR DirectionsLeg_SummaryDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -40,10 +38,11 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR DirectionsLeg_GuidanceView::DirectionsLeg_GuidanceView( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.overlay_ids_)*/{} - , /*decltype(_impl_.data_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.base_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_data_id_)*/{} + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_.has_base_id_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct DirectionsLeg_GuidanceViewDefaultTypeInternal { PROTOBUF_CONSTEXPR DirectionsLeg_GuidanceViewDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -59,43 +58,42 @@ PROTOBUF_CONSTEXPR DirectionsLeg_Maneuver::DirectionsLeg_Maneuver( , /*decltype(_impl_.begin_street_name_)*/{} , /*decltype(_impl_.roundabout_exit_street_names_)*/{} , /*decltype(_impl_.guidance_views_)*/{} - , /*decltype(_impl_.text_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_transition_alert_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_pre_transition_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_post_transition_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.depart_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_depart_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.arrive_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_arrive_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.verbal_succinct_transition_instruction_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.sign_)*/nullptr , /*decltype(_impl_.transit_info_)*/nullptr , /*decltype(_impl_.bss_info_)*/nullptr - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_.length_)*/0 - , /*decltype(_impl_.time_)*/0 - , /*decltype(_impl_.begin_cardinal_direction_)*/0 - , /*decltype(_impl_.begin_heading_)*/0u - , /*decltype(_impl_.begin_shape_index_)*/0u - , /*decltype(_impl_.end_shape_index_)*/0u - , /*decltype(_impl_.roundabout_exit_count_)*/0u - , /*decltype(_impl_.portions_toll_)*/false - , /*decltype(_impl_.portions_unpaved_)*/false - , /*decltype(_impl_.verbal_multi_cue_)*/false - , /*decltype(_impl_.to_stay_on_)*/false - , /*decltype(_impl_.travel_mode_)*/0 - , /*decltype(_impl_.vehicle_type_)*/0 - , /*decltype(_impl_.pedestrian_type_)*/0 - , /*decltype(_impl_.bicycle_type_)*/0 - , /*decltype(_impl_.transit_type_)*/0 - , /*decltype(_impl_.begin_path_index_)*/0u - , /*decltype(_impl_.end_path_index_)*/0u - , /*decltype(_impl_.turn_degree_)*/0u - , /*decltype(_impl_.bss_maneuver_type_)*/0 - , /*decltype(_impl_.has_time_restrictions_)*/false - , /*decltype(_impl_.portions_highway_)*/false - , /*decltype(_impl_.portions_ferry_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_.has_text_instruction_)*/{} + , /*decltype(_impl_.has_length_)*/{} + , /*decltype(_impl_.has_time_)*/{} + , /*decltype(_impl_.has_begin_cardinal_direction_)*/{} + , /*decltype(_impl_.has_begin_heading_)*/{} + , /*decltype(_impl_.has_begin_shape_index_)*/{} + , /*decltype(_impl_.has_end_shape_index_)*/{} + , /*decltype(_impl_.has_portions_toll_)*/{} + , /*decltype(_impl_.has_portions_unpaved_)*/{} + , /*decltype(_impl_.has_verbal_transition_alert_instruction_)*/{} + , /*decltype(_impl_.has_verbal_pre_transition_instruction_)*/{} + , /*decltype(_impl_.has_verbal_post_transition_instruction_)*/{} + , /*decltype(_impl_.has_roundabout_exit_count_)*/{} + , /*decltype(_impl_.has_depart_instruction_)*/{} + , /*decltype(_impl_.has_verbal_depart_instruction_)*/{} + , /*decltype(_impl_.has_arrive_instruction_)*/{} + , /*decltype(_impl_.has_verbal_arrive_instruction_)*/{} + , /*decltype(_impl_.has_verbal_multi_cue_)*/{} + , /*decltype(_impl_.has_travel_mode_)*/{} + , /*decltype(_impl_.has_vehicle_type_)*/{} + , /*decltype(_impl_.has_pedestrian_type_)*/{} + , /*decltype(_impl_.has_bicycle_type_)*/{} + , /*decltype(_impl_.has_transit_type_)*/{} + , /*decltype(_impl_.has_begin_path_index_)*/{} + , /*decltype(_impl_.has_end_path_index_)*/{} + , /*decltype(_impl_.has_to_stay_on_)*/{} + , /*decltype(_impl_.has_turn_degree_)*/{} + , /*decltype(_impl_.has_has_time_restrictions_)*/{} + , /*decltype(_impl_.has_bss_maneuver_type_)*/{} + , /*decltype(_impl_.has_verbal_succinct_transition_instruction_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct DirectionsLeg_ManeuverDefaultTypeInternal { PROTOBUF_CONSTEXPR DirectionsLeg_ManeuverDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -109,12 +107,13 @@ PROTOBUF_CONSTEXPR DirectionsLeg::DirectionsLeg( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.location_)*/{} , /*decltype(_impl_.maneuver_)*/{} - , /*decltype(_impl_.shape_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.summary_)*/nullptr - , /*decltype(_impl_.trip_id_)*/uint64_t{0u} - , /*decltype(_impl_.leg_id_)*/0u - , /*decltype(_impl_.leg_count_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_trip_id_)*/{} + , /*decltype(_impl_.has_leg_id_)*/{} + , /*decltype(_impl_.has_leg_count_)*/{} + , /*decltype(_impl_.has_shape_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct DirectionsLegDefaultTypeInternal { PROTOBUF_CONSTEXPR DirectionsLegDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -374,29 +373,20 @@ bool DirectionsLeg_Maneuver_Type_IsValid(int value) { case 36: case 37: case 38: - case 39: - case 40: - case 41: - case 42: - case 43: return true; default: return false; } } -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DirectionsLeg_Maneuver_Type_strings[44] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DirectionsLeg_Maneuver_Type_strings[39] = {}; static const char DirectionsLeg_Maneuver_Type_names[] = "kBecomes" - "kBuildingEnter" - "kBuildingExit" "kContinue" "kDestination" "kDestinationLeft" "kDestinationRight" - "kElevatorEnter" - "kEscalatorEnter" "kExitLeft" "kExitRight" "kFerryEnter" @@ -423,7 +413,6 @@ static const char DirectionsLeg_Maneuver_Type_names[] = "kStayLeft" "kStayRight" "kStayStraight" - "kStepsEnter" "kTransit" "kTransitConnectionDestination" "kTransitConnectionStart" @@ -435,96 +424,86 @@ static const char DirectionsLeg_Maneuver_Type_names[] = static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DirectionsLeg_Maneuver_Type_entries[] = { { {DirectionsLeg_Maneuver_Type_names + 0, 8}, 7 }, - { {DirectionsLeg_Maneuver_Type_names + 8, 14}, 42 }, - { {DirectionsLeg_Maneuver_Type_names + 22, 13}, 43 }, - { {DirectionsLeg_Maneuver_Type_names + 35, 9}, 8 }, - { {DirectionsLeg_Maneuver_Type_names + 44, 12}, 4 }, - { {DirectionsLeg_Maneuver_Type_names + 56, 16}, 6 }, - { {DirectionsLeg_Maneuver_Type_names + 72, 17}, 5 }, - { {DirectionsLeg_Maneuver_Type_names + 89, 14}, 39 }, - { {DirectionsLeg_Maneuver_Type_names + 103, 15}, 41 }, - { {DirectionsLeg_Maneuver_Type_names + 118, 9}, 21 }, - { {DirectionsLeg_Maneuver_Type_names + 127, 10}, 20 }, - { {DirectionsLeg_Maneuver_Type_names + 137, 11}, 28 }, - { {DirectionsLeg_Maneuver_Type_names + 148, 10}, 29 }, - { {DirectionsLeg_Maneuver_Type_names + 158, 5}, 15 }, - { {DirectionsLeg_Maneuver_Type_names + 163, 6}, 25 }, - { {DirectionsLeg_Maneuver_Type_names + 169, 10}, 38 }, - { {DirectionsLeg_Maneuver_Type_names + 179, 11}, 37 }, - { {DirectionsLeg_Maneuver_Type_names + 190, 5}, 0 }, - { {DirectionsLeg_Maneuver_Type_names + 195, 33}, 36 }, - { {DirectionsLeg_Maneuver_Type_names + 228, 9}, 19 }, - { {DirectionsLeg_Maneuver_Type_names + 237, 10}, 18 }, - { {DirectionsLeg_Maneuver_Type_names + 247, 13}, 17 }, - { {DirectionsLeg_Maneuver_Type_names + 260, 6}, 10 }, - { {DirectionsLeg_Maneuver_Type_names + 266, 16}, 26 }, - { {DirectionsLeg_Maneuver_Type_names + 282, 15}, 27 }, - { {DirectionsLeg_Maneuver_Type_names + 297, 10}, 14 }, - { {DirectionsLeg_Maneuver_Type_names + 307, 11}, 11 }, - { {DirectionsLeg_Maneuver_Type_names + 318, 11}, 16 }, - { {DirectionsLeg_Maneuver_Type_names + 329, 12}, 9 }, - { {DirectionsLeg_Maneuver_Type_names + 341, 6}, 1 }, - { {DirectionsLeg_Maneuver_Type_names + 347, 10}, 3 }, - { {DirectionsLeg_Maneuver_Type_names + 357, 11}, 2 }, - { {DirectionsLeg_Maneuver_Type_names + 368, 9}, 24 }, - { {DirectionsLeg_Maneuver_Type_names + 377, 10}, 23 }, - { {DirectionsLeg_Maneuver_Type_names + 387, 13}, 22 }, - { {DirectionsLeg_Maneuver_Type_names + 400, 11}, 40 }, - { {DirectionsLeg_Maneuver_Type_names + 411, 8}, 30 }, - { {DirectionsLeg_Maneuver_Type_names + 419, 29}, 35 }, - { {DirectionsLeg_Maneuver_Type_names + 448, 23}, 33 }, - { {DirectionsLeg_Maneuver_Type_names + 471, 26}, 34 }, - { {DirectionsLeg_Maneuver_Type_names + 497, 16}, 32 }, - { {DirectionsLeg_Maneuver_Type_names + 513, 16}, 31 }, - { {DirectionsLeg_Maneuver_Type_names + 529, 10}, 13 }, - { {DirectionsLeg_Maneuver_Type_names + 539, 11}, 12 }, + { {DirectionsLeg_Maneuver_Type_names + 8, 9}, 8 }, + { {DirectionsLeg_Maneuver_Type_names + 17, 12}, 4 }, + { {DirectionsLeg_Maneuver_Type_names + 29, 16}, 6 }, + { {DirectionsLeg_Maneuver_Type_names + 45, 17}, 5 }, + { {DirectionsLeg_Maneuver_Type_names + 62, 9}, 21 }, + { {DirectionsLeg_Maneuver_Type_names + 71, 10}, 20 }, + { {DirectionsLeg_Maneuver_Type_names + 81, 11}, 28 }, + { {DirectionsLeg_Maneuver_Type_names + 92, 10}, 29 }, + { {DirectionsLeg_Maneuver_Type_names + 102, 5}, 15 }, + { {DirectionsLeg_Maneuver_Type_names + 107, 6}, 25 }, + { {DirectionsLeg_Maneuver_Type_names + 113, 10}, 38 }, + { {DirectionsLeg_Maneuver_Type_names + 123, 11}, 37 }, + { {DirectionsLeg_Maneuver_Type_names + 134, 5}, 0 }, + { {DirectionsLeg_Maneuver_Type_names + 139, 33}, 36 }, + { {DirectionsLeg_Maneuver_Type_names + 172, 9}, 19 }, + { {DirectionsLeg_Maneuver_Type_names + 181, 10}, 18 }, + { {DirectionsLeg_Maneuver_Type_names + 191, 13}, 17 }, + { {DirectionsLeg_Maneuver_Type_names + 204, 6}, 10 }, + { {DirectionsLeg_Maneuver_Type_names + 210, 16}, 26 }, + { {DirectionsLeg_Maneuver_Type_names + 226, 15}, 27 }, + { {DirectionsLeg_Maneuver_Type_names + 241, 10}, 14 }, + { {DirectionsLeg_Maneuver_Type_names + 251, 11}, 11 }, + { {DirectionsLeg_Maneuver_Type_names + 262, 11}, 16 }, + { {DirectionsLeg_Maneuver_Type_names + 273, 12}, 9 }, + { {DirectionsLeg_Maneuver_Type_names + 285, 6}, 1 }, + { {DirectionsLeg_Maneuver_Type_names + 291, 10}, 3 }, + { {DirectionsLeg_Maneuver_Type_names + 301, 11}, 2 }, + { {DirectionsLeg_Maneuver_Type_names + 312, 9}, 24 }, + { {DirectionsLeg_Maneuver_Type_names + 321, 10}, 23 }, + { {DirectionsLeg_Maneuver_Type_names + 331, 13}, 22 }, + { {DirectionsLeg_Maneuver_Type_names + 344, 8}, 30 }, + { {DirectionsLeg_Maneuver_Type_names + 352, 29}, 35 }, + { {DirectionsLeg_Maneuver_Type_names + 381, 23}, 33 }, + { {DirectionsLeg_Maneuver_Type_names + 404, 26}, 34 }, + { {DirectionsLeg_Maneuver_Type_names + 430, 16}, 32 }, + { {DirectionsLeg_Maneuver_Type_names + 446, 16}, 31 }, + { {DirectionsLeg_Maneuver_Type_names + 462, 10}, 13 }, + { {DirectionsLeg_Maneuver_Type_names + 472, 11}, 12 }, }; static const int DirectionsLeg_Maneuver_Type_entries_by_number[] = { - 17, // 0 -> kNone - 29, // 1 -> kStart - 31, // 2 -> kStartRight - 30, // 3 -> kStartLeft - 4, // 4 -> kDestination - 6, // 5 -> kDestinationRight - 5, // 6 -> kDestinationLeft + 13, // 0 -> kNone + 25, // 1 -> kStart + 27, // 2 -> kStartRight + 26, // 3 -> kStartLeft + 2, // 4 -> kDestination + 4, // 5 -> kDestinationRight + 3, // 6 -> kDestinationLeft 0, // 7 -> kBecomes - 3, // 8 -> kContinue - 28, // 9 -> kSlightRight - 22, // 10 -> kRight - 26, // 11 -> kSharpRight - 43, // 12 -> kUturnRight - 42, // 13 -> kUturnLeft - 25, // 14 -> kSharpLeft - 13, // 15 -> kLeft - 27, // 16 -> kSlightLeft - 21, // 17 -> kRampStraight - 20, // 18 -> kRampRight - 19, // 19 -> kRampLeft - 10, // 20 -> kExitRight - 9, // 21 -> kExitLeft - 34, // 22 -> kStayStraight - 33, // 23 -> kStayRight - 32, // 24 -> kStayLeft - 14, // 25 -> kMerge - 23, // 26 -> kRoundaboutEnter - 24, // 27 -> kRoundaboutExit - 11, // 28 -> kFerryEnter - 12, // 29 -> kFerryExit - 36, // 30 -> kTransit - 41, // 31 -> kTransitTransfer - 40, // 32 -> kTransitRemainOn - 38, // 33 -> kTransitConnectionStart - 39, // 34 -> kTransitConnectionTransfer - 37, // 35 -> kTransitConnectionDestination - 18, // 36 -> kPostTransitConnectionDestination - 16, // 37 -> kMergeRight - 15, // 38 -> kMergeLeft - 7, // 39 -> kElevatorEnter - 35, // 40 -> kStepsEnter - 8, // 41 -> kEscalatorEnter - 1, // 42 -> kBuildingEnter - 2, // 43 -> kBuildingExit + 1, // 8 -> kContinue + 24, // 9 -> kSlightRight + 18, // 10 -> kRight + 22, // 11 -> kSharpRight + 38, // 12 -> kUturnRight + 37, // 13 -> kUturnLeft + 21, // 14 -> kSharpLeft + 9, // 15 -> kLeft + 23, // 16 -> kSlightLeft + 17, // 17 -> kRampStraight + 16, // 18 -> kRampRight + 15, // 19 -> kRampLeft + 6, // 20 -> kExitRight + 5, // 21 -> kExitLeft + 30, // 22 -> kStayStraight + 29, // 23 -> kStayRight + 28, // 24 -> kStayLeft + 10, // 25 -> kMerge + 19, // 26 -> kRoundaboutEnter + 20, // 27 -> kRoundaboutExit + 7, // 28 -> kFerryEnter + 8, // 29 -> kFerryExit + 31, // 30 -> kTransit + 36, // 31 -> kTransitTransfer + 35, // 32 -> kTransitRemainOn + 33, // 33 -> kTransitConnectionStart + 34, // 34 -> kTransitConnectionTransfer + 32, // 35 -> kTransitConnectionDestination + 14, // 36 -> kPostTransitConnectionDestination + 12, // 37 -> kMergeRight + 11, // 38 -> kMergeLeft }; const std::string& DirectionsLeg_Maneuver_Type_Name( @@ -533,12 +512,12 @@ const std::string& DirectionsLeg_Maneuver_Type_Name( ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( DirectionsLeg_Maneuver_Type_entries, DirectionsLeg_Maneuver_Type_entries_by_number, - 44, DirectionsLeg_Maneuver_Type_strings); + 39, DirectionsLeg_Maneuver_Type_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( DirectionsLeg_Maneuver_Type_entries, DirectionsLeg_Maneuver_Type_entries_by_number, - 44, value); + 39, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : DirectionsLeg_Maneuver_Type_strings[idx].get(); } @@ -546,7 +525,7 @@ bool DirectionsLeg_Maneuver_Type_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DirectionsLeg_Maneuver_Type* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - DirectionsLeg_Maneuver_Type_entries, 44, name, &int_value); + DirectionsLeg_Maneuver_Type_entries, 39, name, &int_value); if (success) { *value = static_cast(int_value); } @@ -592,11 +571,6 @@ constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kTransitConnection constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kPostTransitConnectionDestination; constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kMergeRight; constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kMergeLeft; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kElevatorEnter; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kStepsEnter; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kEscalatorEnter; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kBuildingEnter; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::kBuildingExit; constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::Type_MIN; constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::Type_MAX; constexpr int DirectionsLeg_Maneuver::Type_ARRAYSIZE; @@ -693,21 +667,46 @@ DirectionsLeg_Summary::DirectionsLeg_Summary(const DirectionsLeg_Summary& from) DirectionsLeg_Summary* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.bbox_){nullptr} - , decltype(_impl_.time_){} - , decltype(_impl_.length_){} - , decltype(_impl_.has_time_restrictions_){} - , decltype(_impl_.has_toll_){} - , decltype(_impl_.has_ferry_){} - , decltype(_impl_.has_highway_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_length_){} + , decltype(_impl_.has_time_){} + , decltype(_impl_.has_has_time_restrictions_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); if (from._internal_has_bbox()) { _this->_impl_.bbox_ = new ::valhalla::BoundingBox(*from._impl_.bbox_); } - ::memcpy(&_impl_.time_, &from._impl_.time_, - static_cast(reinterpret_cast(&_impl_.has_highway_) - - reinterpret_cast(&_impl_.time_)) + sizeof(_impl_.has_highway_)); + clear_has_has_length(); + switch (from.has_length_case()) { + case kLength: { + _this->_internal_set_length(from._internal_length()); + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } + } + clear_has_has_time(); + switch (from.has_time_case()) { + case kTime: { + _this->_internal_set_time(from._internal_time()); + break; + } + case HAS_TIME_NOT_SET: { + break; + } + } + clear_has_has_has_time_restrictions(); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.DirectionsLeg.Summary) } @@ -717,14 +716,15 @@ inline void DirectionsLeg_Summary::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.bbox_){nullptr} - , decltype(_impl_.time_){0} - , decltype(_impl_.length_){0} - , decltype(_impl_.has_time_restrictions_){false} - , decltype(_impl_.has_toll_){false} - , decltype(_impl_.has_ferry_){false} - , decltype(_impl_.has_highway_){false} + , decltype(_impl_.has_length_){} + , decltype(_impl_.has_time_){} + , decltype(_impl_.has_has_time_restrictions_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_length(); + clear_has_has_time(); + clear_has_has_has_time_restrictions(); } DirectionsLeg_Summary::~DirectionsLeg_Summary() { @@ -739,12 +739,64 @@ DirectionsLeg_Summary::~DirectionsLeg_Summary() { inline void DirectionsLeg_Summary::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (this != internal_default_instance()) delete _impl_.bbox_; + if (has_has_length()) { + clear_has_length(); + } + if (has_has_time()) { + clear_has_time(); + } + if (has_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + } } void DirectionsLeg_Summary::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void DirectionsLeg_Summary::clear_has_length() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Summary) + switch (has_length_case()) { + case kLength: { + // No need to clear + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_LENGTH_NOT_SET; +} + +void DirectionsLeg_Summary::clear_has_time() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Summary) + switch (has_time_case()) { + case kTime: { + // No need to clear + break; + } + case HAS_TIME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TIME_NOT_SET; +} + +void DirectionsLeg_Summary::clear_has_has_time_restrictions() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Summary) + switch (has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + // No need to clear + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} + + void DirectionsLeg_Summary::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.DirectionsLeg.Summary) uint32_t cached_has_bits = 0; @@ -755,9 +807,9 @@ void DirectionsLeg_Summary::Clear() { delete _impl_.bbox_; } _impl_.bbox_ = nullptr; - ::memset(&_impl_.time_, 0, static_cast( - reinterpret_cast(&_impl_.has_highway_) - - reinterpret_cast(&_impl_.time_)) + sizeof(_impl_.has_highway_)); + clear_has_length(); + clear_has_time(); + clear_has_has_time_restrictions(); _internal_metadata_.Clear(); } @@ -770,7 +822,7 @@ const char* DirectionsLeg_Summary::_InternalParse(const char* ptr, ::_pbi::Parse // float length = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 13)) { - _impl_.length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_length(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -778,7 +830,7 @@ const char* DirectionsLeg_Summary::_InternalParse(const char* ptr, ::_pbi::Parse // double time = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_time(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; @@ -794,31 +846,7 @@ const char* DirectionsLeg_Summary::_InternalParse(const char* ptr, ::_pbi::Parse // bool has_time_restrictions = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.has_time_restrictions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool has_toll = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.has_toll_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool has_ferry = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.has_ferry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool has_highway = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.has_highway_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_has_time_restrictions(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -853,21 +881,13 @@ uint8_t* DirectionsLeg_Summary::_InternalSerialize( (void) cached_has_bits; // float length = 1; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = this->_internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { + if (_internal_has_length()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_length(), target); } // double time = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = this->_internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { + if (_internal_has_time()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_time(), target); } @@ -880,29 +900,11 @@ uint8_t* DirectionsLeg_Summary::_InternalSerialize( } // bool has_time_restrictions = 4; - if (this->_internal_has_time_restrictions() != 0) { + if (_internal_has_has_time_restrictions()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_has_time_restrictions(), target); } - // bool has_toll = 5; - if (this->_internal_has_toll() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_has_toll(), target); - } - - // bool has_ferry = 6; - if (this->_internal_has_ferry() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_has_ferry(), target); - } - - // bool has_highway = 7; - if (this->_internal_has_highway() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_has_highway(), target); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); @@ -926,44 +928,36 @@ size_t DirectionsLeg_Summary::ByteSizeLong() const { *_impl_.bbox_); } - // double time = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = this->_internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { - total_size += 1 + 8; - } - - // float length = 1; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = this->_internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { - total_size += 1 + 4; - } - - // bool has_time_restrictions = 4; - if (this->_internal_has_time_restrictions() != 0) { - total_size += 1 + 1; - } - - // bool has_toll = 5; - if (this->_internal_has_toll() != 0) { - total_size += 1 + 1; + switch (has_length_case()) { + // float length = 1; + case kLength: { + total_size += 1 + 4; + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } } - - // bool has_ferry = 6; - if (this->_internal_has_ferry() != 0) { - total_size += 1 + 1; + switch (has_time_case()) { + // double time = 2; + case kTime: { + total_size += 1 + 8; + break; + } + case HAS_TIME_NOT_SET: { + break; + } } - - // bool has_highway = 7; - if (this->_internal_has_highway() != 0) { - total_size += 1 + 1; + switch (has_has_time_restrictions_case()) { + // bool has_time_restrictions = 4; + case kHasTimeRestrictions: { + total_size += 1 + 1; + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -989,31 +983,32 @@ void DirectionsLeg_Summary::MergeFrom(const DirectionsLeg_Summary& from) { _this->_internal_mutable_bbox()->::valhalla::BoundingBox::MergeFrom( from._internal_bbox()); } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = from._internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { - _this->_internal_set_time(from._internal_time()); - } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = from._internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { - _this->_internal_set_length(from._internal_length()); - } - if (from._internal_has_time_restrictions() != 0) { - _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); - } - if (from._internal_has_toll() != 0) { - _this->_internal_set_has_toll(from._internal_has_toll()); + switch (from.has_length_case()) { + case kLength: { + _this->_internal_set_length(from._internal_length()); + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } } - if (from._internal_has_ferry() != 0) { - _this->_internal_set_has_ferry(from._internal_has_ferry()); + switch (from.has_time_case()) { + case kTime: { + _this->_internal_set_time(from._internal_time()); + break; + } + case HAS_TIME_NOT_SET: { + break; + } } - if (from._internal_has_highway() != 0) { - _this->_internal_set_has_highway(from._internal_has_highway()); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -1032,12 +1027,13 @@ bool DirectionsLeg_Summary::IsInitialized() const { void DirectionsLeg_Summary::InternalSwap(DirectionsLeg_Summary* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(DirectionsLeg_Summary, _impl_.has_highway_) - + sizeof(DirectionsLeg_Summary::_impl_.has_highway_) - - PROTOBUF_FIELD_OFFSET(DirectionsLeg_Summary, _impl_.bbox_)>( - reinterpret_cast(&_impl_.bbox_), - reinterpret_cast(&other->_impl_.bbox_)); + swap(_impl_.bbox_, other->_impl_.bbox_); + swap(_impl_.has_length_, other->_impl_.has_length_); + swap(_impl_.has_time_, other->_impl_.has_time_); + swap(_impl_.has_has_time_restrictions_, other->_impl_.has_has_time_restrictions_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); } std::string DirectionsLeg_Summary::GetTypeName() const { @@ -1062,29 +1058,43 @@ DirectionsLeg_GuidanceView::DirectionsLeg_GuidanceView(const DirectionsLeg_Guida DirectionsLeg_GuidanceView* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.overlay_ids_){from._impl_.overlay_ids_} - , decltype(_impl_.data_id_){} - , decltype(_impl_.base_id_){} - , decltype(_impl_.type_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_data_id_){} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_base_id_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.data_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_data_id().empty()) { - _this->_impl_.data_id_.Set(from._internal_data_id(), - _this->GetArenaForAllocation()); - } - _impl_.base_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.base_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_base_id().empty()) { - _this->_impl_.base_id_.Set(from._internal_base_id(), - _this->GetArenaForAllocation()); - } - _this->_impl_.type_ = from._impl_.type_; + clear_has_has_data_id(); + switch (from.has_data_id_case()) { + case kDataId: { + _this->_internal_set_data_id(from._internal_data_id()); + break; + } + case HAS_DATA_ID_NOT_SET: { + break; + } + } + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + clear_has_has_base_id(); + switch (from.has_base_id_case()) { + case kBaseId: { + _this->_internal_set_base_id(from._internal_base_id()); + break; + } + case HAS_BASE_ID_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.DirectionsLeg.GuidanceView) } @@ -1094,19 +1104,15 @@ inline void DirectionsLeg_GuidanceView::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.overlay_ids_){arena} - , decltype(_impl_.data_id_){} - , decltype(_impl_.base_id_){} - , decltype(_impl_.type_){0} + , decltype(_impl_.has_data_id_){} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_base_id_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.data_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.base_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.base_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_data_id(); + clear_has_has_type(); + clear_has_has_base_id(); } DirectionsLeg_GuidanceView::~DirectionsLeg_GuidanceView() { @@ -1121,14 +1127,64 @@ DirectionsLeg_GuidanceView::~DirectionsLeg_GuidanceView() { inline void DirectionsLeg_GuidanceView::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.overlay_ids_.~RepeatedPtrField(); - _impl_.data_id_.Destroy(); - _impl_.base_id_.Destroy(); + if (has_has_data_id()) { + clear_has_data_id(); + } + if (has_has_type()) { + clear_has_type(); + } + if (has_has_base_id()) { + clear_has_base_id(); + } } void DirectionsLeg_GuidanceView::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void DirectionsLeg_GuidanceView::clear_has_data_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.GuidanceView) + switch (has_data_id_case()) { + case kDataId: { + _impl_.has_data_id_.data_id_.Destroy(); + break; + } + case HAS_DATA_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_DATA_ID_NOT_SET; +} + +void DirectionsLeg_GuidanceView::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.GuidanceView) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} + +void DirectionsLeg_GuidanceView::clear_has_base_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.GuidanceView) + switch (has_base_id_case()) { + case kBaseId: { + _impl_.has_base_id_.base_id_.Destroy(); + break; + } + case HAS_BASE_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_BASE_ID_NOT_SET; +} + + void DirectionsLeg_GuidanceView::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.DirectionsLeg.GuidanceView) uint32_t cached_has_bits = 0; @@ -1136,9 +1192,9 @@ void DirectionsLeg_GuidanceView::Clear() { (void) cached_has_bits; _impl_.overlay_ids_.Clear(); - _impl_.data_id_.ClearToEmpty(); - _impl_.base_id_.ClearToEmpty(); - _impl_.type_ = 0; + clear_has_data_id(); + clear_has_type(); + clear_has_base_id(); _internal_metadata_.Clear(); } @@ -1222,7 +1278,7 @@ uint8_t* DirectionsLeg_GuidanceView::_InternalSerialize( (void) cached_has_bits; // string data_id = 1; - if (!this->_internal_data_id().empty()) { + if (_internal_has_data_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_data_id().data(), static_cast(this->_internal_data_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -1232,14 +1288,14 @@ uint8_t* DirectionsLeg_GuidanceView::_InternalSerialize( } // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 2, this->_internal_type(), target); } // string base_id = 3; - if (!this->_internal_base_id().empty()) { + if (_internal_has_base_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_base_id().data(), static_cast(this->_internal_base_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -1282,26 +1338,41 @@ size_t DirectionsLeg_GuidanceView::ByteSizeLong() const { _impl_.overlay_ids_.Get(i)); } - // string data_id = 1; - if (!this->_internal_data_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_data_id()); + switch (has_data_id_case()) { + // string data_id = 1; + case kDataId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_data_id()); + break; + } + case HAS_DATA_ID_NOT_SET: { + break; + } } - - // string base_id = 3; - if (!this->_internal_base_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_base_id()); + switch (has_type_case()) { + // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - - // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_base_id_case()) { + // string base_id = 3; + case kBaseId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_base_id()); + break; + } + case HAS_BASE_ID_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -1324,14 +1395,32 @@ void DirectionsLeg_GuidanceView::MergeFrom(const DirectionsLeg_GuidanceView& fro (void) cached_has_bits; _this->_impl_.overlay_ids_.MergeFrom(from._impl_.overlay_ids_); - if (!from._internal_data_id().empty()) { - _this->_internal_set_data_id(from._internal_data_id()); + switch (from.has_data_id_case()) { + case kDataId: { + _this->_internal_set_data_id(from._internal_data_id()); + break; + } + case HAS_DATA_ID_NOT_SET: { + break; + } } - if (!from._internal_base_id().empty()) { - _this->_internal_set_base_id(from._internal_base_id()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_base_id_case()) { + case kBaseId: { + _this->_internal_set_base_id(from._internal_base_id()); + break; + } + case HAS_BASE_ID_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -1349,19 +1438,14 @@ bool DirectionsLeg_GuidanceView::IsInitialized() const { void DirectionsLeg_GuidanceView::InternalSwap(DirectionsLeg_GuidanceView* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.overlay_ids_.InternalSwap(&other->_impl_.overlay_ids_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.data_id_, lhs_arena, - &other->_impl_.data_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.base_id_, lhs_arena, - &other->_impl_.base_id_, rhs_arena - ); - swap(_impl_.type_, other->_impl_.type_); + swap(_impl_.has_data_id_, other->_impl_.has_data_id_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_.has_base_id_, other->_impl_.has_base_id_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); } std::string DirectionsLeg_GuidanceView::GetTypeName() const { @@ -1431,117 +1515,44 @@ DirectionsLeg_Maneuver::DirectionsLeg_Maneuver(const DirectionsLeg_Maneuver& fro , decltype(_impl_.begin_street_name_){from._impl_.begin_street_name_} , decltype(_impl_.roundabout_exit_street_names_){from._impl_.roundabout_exit_street_names_} , decltype(_impl_.guidance_views_){from._impl_.guidance_views_} - , decltype(_impl_.text_instruction_){} - , decltype(_impl_.verbal_transition_alert_instruction_){} - , decltype(_impl_.verbal_pre_transition_instruction_){} - , decltype(_impl_.verbal_post_transition_instruction_){} - , decltype(_impl_.depart_instruction_){} - , decltype(_impl_.verbal_depart_instruction_){} - , decltype(_impl_.arrive_instruction_){} - , decltype(_impl_.verbal_arrive_instruction_){} - , decltype(_impl_.verbal_succinct_transition_instruction_){} , decltype(_impl_.sign_){nullptr} , decltype(_impl_.transit_info_){nullptr} , decltype(_impl_.bss_info_){nullptr} - , decltype(_impl_.type_){} - , decltype(_impl_.length_){} - , decltype(_impl_.time_){} - , decltype(_impl_.begin_cardinal_direction_){} - , decltype(_impl_.begin_heading_){} - , decltype(_impl_.begin_shape_index_){} - , decltype(_impl_.end_shape_index_){} - , decltype(_impl_.roundabout_exit_count_){} - , decltype(_impl_.portions_toll_){} - , decltype(_impl_.portions_unpaved_){} - , decltype(_impl_.verbal_multi_cue_){} - , decltype(_impl_.to_stay_on_){} - , decltype(_impl_.travel_mode_){} - , decltype(_impl_.vehicle_type_){} - , decltype(_impl_.pedestrian_type_){} - , decltype(_impl_.bicycle_type_){} - , decltype(_impl_.transit_type_){} - , decltype(_impl_.begin_path_index_){} - , decltype(_impl_.end_path_index_){} - , decltype(_impl_.turn_degree_){} - , decltype(_impl_.bss_maneuver_type_){} - , decltype(_impl_.has_time_restrictions_){} - , decltype(_impl_.portions_highway_){} - , decltype(_impl_.portions_ferry_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_text_instruction_){} + , decltype(_impl_.has_length_){} + , decltype(_impl_.has_time_){} + , decltype(_impl_.has_begin_cardinal_direction_){} + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} + , decltype(_impl_.has_portions_toll_){} + , decltype(_impl_.has_portions_unpaved_){} + , decltype(_impl_.has_verbal_transition_alert_instruction_){} + , decltype(_impl_.has_verbal_pre_transition_instruction_){} + , decltype(_impl_.has_verbal_post_transition_instruction_){} + , decltype(_impl_.has_roundabout_exit_count_){} + , decltype(_impl_.has_depart_instruction_){} + , decltype(_impl_.has_verbal_depart_instruction_){} + , decltype(_impl_.has_arrive_instruction_){} + , decltype(_impl_.has_verbal_arrive_instruction_){} + , decltype(_impl_.has_verbal_multi_cue_){} + , decltype(_impl_.has_travel_mode_){} + , decltype(_impl_.has_vehicle_type_){} + , decltype(_impl_.has_pedestrian_type_){} + , decltype(_impl_.has_bicycle_type_){} + , decltype(_impl_.has_transit_type_){} + , decltype(_impl_.has_begin_path_index_){} + , decltype(_impl_.has_end_path_index_){} + , decltype(_impl_.has_to_stay_on_){} + , decltype(_impl_.has_turn_degree_){} + , decltype(_impl_.has_has_time_restrictions_){} + , decltype(_impl_.has_bss_maneuver_type_){} + , decltype(_impl_.has_verbal_succinct_transition_instruction_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.text_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.text_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_text_instruction().empty()) { - _this->_impl_.text_instruction_.Set(from._internal_text_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_transition_alert_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_transition_alert_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_transition_alert_instruction().empty()) { - _this->_impl_.verbal_transition_alert_instruction_.Set(from._internal_verbal_transition_alert_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_pre_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_pre_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_pre_transition_instruction().empty()) { - _this->_impl_.verbal_pre_transition_instruction_.Set(from._internal_verbal_pre_transition_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_post_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_post_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_post_transition_instruction().empty()) { - _this->_impl_.verbal_post_transition_instruction_.Set(from._internal_verbal_post_transition_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.depart_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.depart_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_depart_instruction().empty()) { - _this->_impl_.depart_instruction_.Set(from._internal_depart_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_depart_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_depart_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_depart_instruction().empty()) { - _this->_impl_.verbal_depart_instruction_.Set(from._internal_verbal_depart_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.arrive_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrive_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_arrive_instruction().empty()) { - _this->_impl_.arrive_instruction_.Set(from._internal_arrive_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_arrive_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_arrive_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_arrive_instruction().empty()) { - _this->_impl_.verbal_arrive_instruction_.Set(from._internal_verbal_arrive_instruction(), - _this->GetArenaForAllocation()); - } - _impl_.verbal_succinct_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_succinct_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_verbal_succinct_transition_instruction().empty()) { - _this->_impl_.verbal_succinct_transition_instruction_.Set(from._internal_verbal_succinct_transition_instruction(), - _this->GetArenaForAllocation()); - } if (from._internal_has_sign()) { _this->_impl_.sign_ = new ::valhalla::TripSign(*from._impl_.sign_); } @@ -1551,9 +1562,316 @@ DirectionsLeg_Maneuver::DirectionsLeg_Maneuver(const DirectionsLeg_Maneuver& fro if (from._internal_has_bss_info()) { _this->_impl_.bss_info_ = new ::valhalla::BikeShareStationInfo(*from._impl_.bss_info_); } - ::memcpy(&_impl_.type_, &from._impl_.type_, - static_cast(reinterpret_cast(&_impl_.portions_ferry_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.portions_ferry_)); + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + clear_has_has_text_instruction(); + switch (from.has_text_instruction_case()) { + case kTextInstruction: { + _this->_internal_set_text_instruction(from._internal_text_instruction()); + break; + } + case HAS_TEXT_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_length(); + switch (from.has_length_case()) { + case kLength: { + _this->_internal_set_length(from._internal_length()); + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } + } + clear_has_has_time(); + switch (from.has_time_case()) { + case kTime: { + _this->_internal_set_time(from._internal_time()); + break; + } + case HAS_TIME_NOT_SET: { + break; + } + } + clear_has_has_begin_cardinal_direction(); + switch (from.has_begin_cardinal_direction_case()) { + case kBeginCardinalDirection: { + _this->_internal_set_begin_cardinal_direction(from._internal_begin_cardinal_direction()); + break; + } + case HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET: { + break; + } + } + clear_has_has_begin_heading(); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } + } + clear_has_has_begin_shape_index(); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_end_shape_index(); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_portions_toll(); + switch (from.has_portions_toll_case()) { + case kPortionsToll: { + _this->_internal_set_portions_toll(from._internal_portions_toll()); + break; + } + case HAS_PORTIONS_TOLL_NOT_SET: { + break; + } + } + clear_has_has_portions_unpaved(); + switch (from.has_portions_unpaved_case()) { + case kPortionsUnpaved: { + _this->_internal_set_portions_unpaved(from._internal_portions_unpaved()); + break; + } + case HAS_PORTIONS_UNPAVED_NOT_SET: { + break; + } + } + clear_has_has_verbal_transition_alert_instruction(); + switch (from.has_verbal_transition_alert_instruction_case()) { + case kVerbalTransitionAlertInstruction: { + _this->_internal_set_verbal_transition_alert_instruction(from._internal_verbal_transition_alert_instruction()); + break; + } + case HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_verbal_pre_transition_instruction(); + switch (from.has_verbal_pre_transition_instruction_case()) { + case kVerbalPreTransitionInstruction: { + _this->_internal_set_verbal_pre_transition_instruction(from._internal_verbal_pre_transition_instruction()); + break; + } + case HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_verbal_post_transition_instruction(); + switch (from.has_verbal_post_transition_instruction_case()) { + case kVerbalPostTransitionInstruction: { + _this->_internal_set_verbal_post_transition_instruction(from._internal_verbal_post_transition_instruction()); + break; + } + case HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_roundabout_exit_count(); + switch (from.has_roundabout_exit_count_case()) { + case kRoundaboutExitCount: { + _this->_internal_set_roundabout_exit_count(from._internal_roundabout_exit_count()); + break; + } + case HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET: { + break; + } + } + clear_has_has_depart_instruction(); + switch (from.has_depart_instruction_case()) { + case kDepartInstruction: { + _this->_internal_set_depart_instruction(from._internal_depart_instruction()); + break; + } + case HAS_DEPART_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_verbal_depart_instruction(); + switch (from.has_verbal_depart_instruction_case()) { + case kVerbalDepartInstruction: { + _this->_internal_set_verbal_depart_instruction(from._internal_verbal_depart_instruction()); + break; + } + case HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_arrive_instruction(); + switch (from.has_arrive_instruction_case()) { + case kArriveInstruction: { + _this->_internal_set_arrive_instruction(from._internal_arrive_instruction()); + break; + } + case HAS_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_verbal_arrive_instruction(); + switch (from.has_verbal_arrive_instruction_case()) { + case kVerbalArriveInstruction: { + _this->_internal_set_verbal_arrive_instruction(from._internal_verbal_arrive_instruction()); + break; + } + case HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + clear_has_has_verbal_multi_cue(); + switch (from.has_verbal_multi_cue_case()) { + case kVerbalMultiCue: { + _this->_internal_set_verbal_multi_cue(from._internal_verbal_multi_cue()); + break; + } + case HAS_VERBAL_MULTI_CUE_NOT_SET: { + break; + } + } + clear_has_has_travel_mode(); + switch (from.has_travel_mode_case()) { + case kTravelMode: { + _this->_internal_set_travel_mode(from._internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } + } + clear_has_has_vehicle_type(); + switch (from.has_vehicle_type_case()) { + case kVehicleType: { + _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } + } + clear_has_has_pedestrian_type(); + switch (from.has_pedestrian_type_case()) { + case kPedestrianType: { + _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } + } + clear_has_has_bicycle_type(); + switch (from.has_bicycle_type_case()) { + case kBicycleType: { + _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } + } + clear_has_has_transit_type(); + switch (from.has_transit_type_case()) { + case kTransitType: { + _this->_internal_set_transit_type(from._internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } + } + clear_has_has_begin_path_index(); + switch (from.has_begin_path_index_case()) { + case kBeginPathIndex: { + _this->_internal_set_begin_path_index(from._internal_begin_path_index()); + break; + } + case HAS_BEGIN_PATH_INDEX_NOT_SET: { + break; + } + } + clear_has_has_end_path_index(); + switch (from.has_end_path_index_case()) { + case kEndPathIndex: { + _this->_internal_set_end_path_index(from._internal_end_path_index()); + break; + } + case HAS_END_PATH_INDEX_NOT_SET: { + break; + } + } + clear_has_has_to_stay_on(); + switch (from.has_to_stay_on_case()) { + case kToStayOn: { + _this->_internal_set_to_stay_on(from._internal_to_stay_on()); + break; + } + case HAS_TO_STAY_ON_NOT_SET: { + break; + } + } + clear_has_has_turn_degree(); + switch (from.has_turn_degree_case()) { + case kTurnDegree: { + _this->_internal_set_turn_degree(from._internal_turn_degree()); + break; + } + case HAS_TURN_DEGREE_NOT_SET: { + break; + } + } + clear_has_has_has_time_restrictions(); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + clear_has_has_bss_maneuver_type(); + switch (from.has_bss_maneuver_type_case()) { + case kBssManeuverType: { + _this->_internal_set_bss_maneuver_type(from._internal_bss_maneuver_type()); + break; + } + case HAS_BSS_MANEUVER_TYPE_NOT_SET: { + break; + } + } + clear_has_has_verbal_succinct_transition_instruction(); + switch (from.has_verbal_succinct_transition_instruction_case()) { + case kVerbalSuccinctTransitionInstruction: { + _this->_internal_set_verbal_succinct_transition_instruction(from._internal_verbal_succinct_transition_instruction()); + break; + } + case HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.DirectionsLeg.Maneuver) } @@ -1566,80 +1884,74 @@ inline void DirectionsLeg_Maneuver::SharedCtor( , decltype(_impl_.begin_street_name_){arena} , decltype(_impl_.roundabout_exit_street_names_){arena} , decltype(_impl_.guidance_views_){arena} - , decltype(_impl_.text_instruction_){} - , decltype(_impl_.verbal_transition_alert_instruction_){} - , decltype(_impl_.verbal_pre_transition_instruction_){} - , decltype(_impl_.verbal_post_transition_instruction_){} - , decltype(_impl_.depart_instruction_){} - , decltype(_impl_.verbal_depart_instruction_){} - , decltype(_impl_.arrive_instruction_){} - , decltype(_impl_.verbal_arrive_instruction_){} - , decltype(_impl_.verbal_succinct_transition_instruction_){} , decltype(_impl_.sign_){nullptr} , decltype(_impl_.transit_info_){nullptr} , decltype(_impl_.bss_info_){nullptr} - , decltype(_impl_.type_){0} - , decltype(_impl_.length_){0} - , decltype(_impl_.time_){0} - , decltype(_impl_.begin_cardinal_direction_){0} - , decltype(_impl_.begin_heading_){0u} - , decltype(_impl_.begin_shape_index_){0u} - , decltype(_impl_.end_shape_index_){0u} - , decltype(_impl_.roundabout_exit_count_){0u} - , decltype(_impl_.portions_toll_){false} - , decltype(_impl_.portions_unpaved_){false} - , decltype(_impl_.verbal_multi_cue_){false} - , decltype(_impl_.to_stay_on_){false} - , decltype(_impl_.travel_mode_){0} - , decltype(_impl_.vehicle_type_){0} - , decltype(_impl_.pedestrian_type_){0} - , decltype(_impl_.bicycle_type_){0} - , decltype(_impl_.transit_type_){0} - , decltype(_impl_.begin_path_index_){0u} - , decltype(_impl_.end_path_index_){0u} - , decltype(_impl_.turn_degree_){0u} - , decltype(_impl_.bss_maneuver_type_){0} - , decltype(_impl_.has_time_restrictions_){false} - , decltype(_impl_.portions_highway_){false} - , decltype(_impl_.portions_ferry_){false} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_text_instruction_){} + , decltype(_impl_.has_length_){} + , decltype(_impl_.has_time_){} + , decltype(_impl_.has_begin_cardinal_direction_){} + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} + , decltype(_impl_.has_portions_toll_){} + , decltype(_impl_.has_portions_unpaved_){} + , decltype(_impl_.has_verbal_transition_alert_instruction_){} + , decltype(_impl_.has_verbal_pre_transition_instruction_){} + , decltype(_impl_.has_verbal_post_transition_instruction_){} + , decltype(_impl_.has_roundabout_exit_count_){} + , decltype(_impl_.has_depart_instruction_){} + , decltype(_impl_.has_verbal_depart_instruction_){} + , decltype(_impl_.has_arrive_instruction_){} + , decltype(_impl_.has_verbal_arrive_instruction_){} + , decltype(_impl_.has_verbal_multi_cue_){} + , decltype(_impl_.has_travel_mode_){} + , decltype(_impl_.has_vehicle_type_){} + , decltype(_impl_.has_pedestrian_type_){} + , decltype(_impl_.has_bicycle_type_){} + , decltype(_impl_.has_transit_type_){} + , decltype(_impl_.has_begin_path_index_){} + , decltype(_impl_.has_end_path_index_){} + , decltype(_impl_.has_to_stay_on_){} + , decltype(_impl_.has_turn_degree_){} + , decltype(_impl_.has_has_time_restrictions_){} + , decltype(_impl_.has_bss_maneuver_type_){} + , decltype(_impl_.has_verbal_succinct_transition_instruction_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.text_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.text_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_transition_alert_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_transition_alert_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_pre_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_pre_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_post_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_post_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.depart_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.depart_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_depart_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_depart_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrive_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrive_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_arrive_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_arrive_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_succinct_transition_instruction_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.verbal_succinct_transition_instruction_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_type(); + clear_has_has_text_instruction(); + clear_has_has_length(); + clear_has_has_time(); + clear_has_has_begin_cardinal_direction(); + clear_has_has_begin_heading(); + clear_has_has_begin_shape_index(); + clear_has_has_end_shape_index(); + clear_has_has_portions_toll(); + clear_has_has_portions_unpaved(); + clear_has_has_verbal_transition_alert_instruction(); + clear_has_has_verbal_pre_transition_instruction(); + clear_has_has_verbal_post_transition_instruction(); + clear_has_has_roundabout_exit_count(); + clear_has_has_depart_instruction(); + clear_has_has_verbal_depart_instruction(); + clear_has_has_arrive_instruction(); + clear_has_has_verbal_arrive_instruction(); + clear_has_has_verbal_multi_cue(); + clear_has_has_travel_mode(); + clear_has_has_vehicle_type(); + clear_has_has_pedestrian_type(); + clear_has_has_bicycle_type(); + clear_has_has_transit_type(); + clear_has_has_begin_path_index(); + clear_has_has_end_path_index(); + clear_has_has_to_stay_on(); + clear_has_has_turn_degree(); + clear_has_has_has_time_restrictions(); + clear_has_has_bss_maneuver_type(); + clear_has_has_verbal_succinct_transition_instruction(); } DirectionsLeg_Maneuver::~DirectionsLeg_Maneuver() { @@ -1657,58 +1969,596 @@ inline void DirectionsLeg_Maneuver::SharedDtor() { _impl_.begin_street_name_.~RepeatedPtrField(); _impl_.roundabout_exit_street_names_.~RepeatedPtrField(); _impl_.guidance_views_.~RepeatedPtrField(); - _impl_.text_instruction_.Destroy(); - _impl_.verbal_transition_alert_instruction_.Destroy(); - _impl_.verbal_pre_transition_instruction_.Destroy(); - _impl_.verbal_post_transition_instruction_.Destroy(); - _impl_.depart_instruction_.Destroy(); - _impl_.verbal_depart_instruction_.Destroy(); - _impl_.arrive_instruction_.Destroy(); - _impl_.verbal_arrive_instruction_.Destroy(); - _impl_.verbal_succinct_transition_instruction_.Destroy(); if (this != internal_default_instance()) delete _impl_.sign_; if (this != internal_default_instance()) delete _impl_.transit_info_; if (this != internal_default_instance()) delete _impl_.bss_info_; -} - -void DirectionsLeg_Maneuver::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void DirectionsLeg_Maneuver::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.DirectionsLeg.Maneuver) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.street_name_.Clear(); - _impl_.begin_street_name_.Clear(); - _impl_.roundabout_exit_street_names_.Clear(); - _impl_.guidance_views_.Clear(); - _impl_.text_instruction_.ClearToEmpty(); - _impl_.verbal_transition_alert_instruction_.ClearToEmpty(); - _impl_.verbal_pre_transition_instruction_.ClearToEmpty(); - _impl_.verbal_post_transition_instruction_.ClearToEmpty(); - _impl_.depart_instruction_.ClearToEmpty(); - _impl_.verbal_depart_instruction_.ClearToEmpty(); - _impl_.arrive_instruction_.ClearToEmpty(); - _impl_.verbal_arrive_instruction_.ClearToEmpty(); - _impl_.verbal_succinct_transition_instruction_.ClearToEmpty(); - if (GetArenaForAllocation() == nullptr && _impl_.sign_ != nullptr) { - delete _impl_.sign_; + if (has_has_type()) { + clear_has_type(); } - _impl_.sign_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.transit_info_ != nullptr) { - delete _impl_.transit_info_; + if (has_has_text_instruction()) { + clear_has_text_instruction(); + } + if (has_has_length()) { + clear_has_length(); + } + if (has_has_time()) { + clear_has_time(); + } + if (has_has_begin_cardinal_direction()) { + clear_has_begin_cardinal_direction(); + } + if (has_has_begin_heading()) { + clear_has_begin_heading(); + } + if (has_has_begin_shape_index()) { + clear_has_begin_shape_index(); + } + if (has_has_end_shape_index()) { + clear_has_end_shape_index(); + } + if (has_has_portions_toll()) { + clear_has_portions_toll(); + } + if (has_has_portions_unpaved()) { + clear_has_portions_unpaved(); + } + if (has_has_verbal_transition_alert_instruction()) { + clear_has_verbal_transition_alert_instruction(); + } + if (has_has_verbal_pre_transition_instruction()) { + clear_has_verbal_pre_transition_instruction(); + } + if (has_has_verbal_post_transition_instruction()) { + clear_has_verbal_post_transition_instruction(); + } + if (has_has_roundabout_exit_count()) { + clear_has_roundabout_exit_count(); + } + if (has_has_depart_instruction()) { + clear_has_depart_instruction(); + } + if (has_has_verbal_depart_instruction()) { + clear_has_verbal_depart_instruction(); + } + if (has_has_arrive_instruction()) { + clear_has_arrive_instruction(); + } + if (has_has_verbal_arrive_instruction()) { + clear_has_verbal_arrive_instruction(); + } + if (has_has_verbal_multi_cue()) { + clear_has_verbal_multi_cue(); + } + if (has_has_travel_mode()) { + clear_has_travel_mode(); + } + if (has_has_vehicle_type()) { + clear_has_vehicle_type(); + } + if (has_has_pedestrian_type()) { + clear_has_pedestrian_type(); + } + if (has_has_bicycle_type()) { + clear_has_bicycle_type(); + } + if (has_has_transit_type()) { + clear_has_transit_type(); + } + if (has_has_begin_path_index()) { + clear_has_begin_path_index(); + } + if (has_has_end_path_index()) { + clear_has_end_path_index(); + } + if (has_has_to_stay_on()) { + clear_has_to_stay_on(); + } + if (has_has_turn_degree()) { + clear_has_turn_degree(); + } + if (has_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + } + if (has_has_bss_maneuver_type()) { + clear_has_bss_maneuver_type(); + } + if (has_has_verbal_succinct_transition_instruction()) { + clear_has_verbal_succinct_transition_instruction(); + } +} + +void DirectionsLeg_Maneuver::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void DirectionsLeg_Maneuver::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_text_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_text_instruction_case()) { + case kTextInstruction: { + _impl_.has_text_instruction_.text_instruction_.Destroy(); + break; + } + case HAS_TEXT_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TEXT_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_length() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_length_case()) { + case kLength: { + // No need to clear + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_LENGTH_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_time() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_time_case()) { + case kTime: { + // No need to clear + break; + } + case HAS_TIME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_TIME_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_begin_cardinal_direction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_begin_cardinal_direction_case()) { + case kBeginCardinalDirection: { + // No need to clear + break; + } + case HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_begin_heading() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_begin_heading_case()) { + case kBeginHeading: { + // No need to clear + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_BEGIN_HEADING_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_begin_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_begin_shape_index_case()) { + case kBeginShapeIndex: { + // No need to clear + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_end_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_end_shape_index_case()) { + case kEndShapeIndex: { + // No need to clear + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_END_SHAPE_INDEX_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_portions_toll() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_portions_toll_case()) { + case kPortionsToll: { + // No need to clear + break; + } + case HAS_PORTIONS_TOLL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_PORTIONS_TOLL_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_portions_unpaved() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_portions_unpaved_case()) { + case kPortionsUnpaved: { + // No need to clear + break; + } + case HAS_PORTIONS_UNPAVED_NOT_SET: { + break; + } + } + _impl_._oneof_case_[9] = HAS_PORTIONS_UNPAVED_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_transition_alert_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_transition_alert_instruction_case()) { + case kVerbalTransitionAlertInstruction: { + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Destroy(); + break; + } + case HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[10] = HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_pre_transition_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_pre_transition_instruction_case()) { + case kVerbalPreTransitionInstruction: { + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Destroy(); + break; + } + case HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[11] = HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_post_transition_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_post_transition_instruction_case()) { + case kVerbalPostTransitionInstruction: { + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Destroy(); + break; + } + case HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[12] = HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_roundabout_exit_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_roundabout_exit_count_case()) { + case kRoundaboutExitCount: { + // No need to clear + break; + } + case HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[13] = HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_depart_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_depart_instruction_case()) { + case kDepartInstruction: { + _impl_.has_depart_instruction_.depart_instruction_.Destroy(); + break; + } + case HAS_DEPART_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[14] = HAS_DEPART_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_depart_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_depart_instruction_case()) { + case kVerbalDepartInstruction: { + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Destroy(); + break; + } + case HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[15] = HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_arrive_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_arrive_instruction_case()) { + case kArriveInstruction: { + _impl_.has_arrive_instruction_.arrive_instruction_.Destroy(); + break; + } + case HAS_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[16] = HAS_ARRIVE_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_arrive_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_arrive_instruction_case()) { + case kVerbalArriveInstruction: { + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Destroy(); + break; + } + case HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[17] = HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_multi_cue() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_multi_cue_case()) { + case kVerbalMultiCue: { + // No need to clear + break; + } + case HAS_VERBAL_MULTI_CUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[18] = HAS_VERBAL_MULTI_CUE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_travel_mode() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_travel_mode_case()) { + case kTravelMode: { + // No need to clear + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[19] = HAS_TRAVEL_MODE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_vehicle_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_vehicle_type_case()) { + case kVehicleType: { + // No need to clear + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[20] = HAS_VEHICLE_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_pedestrian_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_pedestrian_type_case()) { + case kPedestrianType: { + // No need to clear + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[21] = HAS_PEDESTRIAN_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_bicycle_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_bicycle_type_case()) { + case kBicycleType: { + // No need to clear + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[22] = HAS_BICYCLE_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_transit_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_transit_type_case()) { + case kTransitType: { + // No need to clear + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[23] = HAS_TRANSIT_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_begin_path_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_begin_path_index_case()) { + case kBeginPathIndex: { + // No need to clear + break; + } + case HAS_BEGIN_PATH_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[24] = HAS_BEGIN_PATH_INDEX_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_end_path_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_end_path_index_case()) { + case kEndPathIndex: { + // No need to clear + break; + } + case HAS_END_PATH_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[25] = HAS_END_PATH_INDEX_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_to_stay_on() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_to_stay_on_case()) { + case kToStayOn: { + // No need to clear + break; + } + case HAS_TO_STAY_ON_NOT_SET: { + break; + } + } + _impl_._oneof_case_[26] = HAS_TO_STAY_ON_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_turn_degree() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_turn_degree_case()) { + case kTurnDegree: { + // No need to clear + break; + } + case HAS_TURN_DEGREE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[27] = HAS_TURN_DEGREE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_has_time_restrictions() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + // No need to clear + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[28] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_bss_maneuver_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_bss_maneuver_type_case()) { + case kBssManeuverType: { + // No need to clear + break; + } + case HAS_BSS_MANEUVER_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[29] = HAS_BSS_MANEUVER_TYPE_NOT_SET; +} + +void DirectionsLeg_Maneuver::clear_has_verbal_succinct_transition_instruction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg.Maneuver) + switch (has_verbal_succinct_transition_instruction_case()) { + case kVerbalSuccinctTransitionInstruction: { + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Destroy(); + break; + } + case HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[30] = HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET; +} + + +void DirectionsLeg_Maneuver::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.DirectionsLeg.Maneuver) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.street_name_.Clear(); + _impl_.begin_street_name_.Clear(); + _impl_.roundabout_exit_street_names_.Clear(); + _impl_.guidance_views_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.sign_ != nullptr) { + delete _impl_.sign_; + } + _impl_.sign_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.transit_info_ != nullptr) { + delete _impl_.transit_info_; } _impl_.transit_info_ = nullptr; if (GetArenaForAllocation() == nullptr && _impl_.bss_info_ != nullptr) { delete _impl_.bss_info_; } _impl_.bss_info_ = nullptr; - ::memset(&_impl_.type_, 0, static_cast( - reinterpret_cast(&_impl_.portions_ferry_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.portions_ferry_)); + clear_has_type(); + clear_has_text_instruction(); + clear_has_length(); + clear_has_time(); + clear_has_begin_cardinal_direction(); + clear_has_begin_heading(); + clear_has_begin_shape_index(); + clear_has_end_shape_index(); + clear_has_portions_toll(); + clear_has_portions_unpaved(); + clear_has_verbal_transition_alert_instruction(); + clear_has_verbal_pre_transition_instruction(); + clear_has_verbal_post_transition_instruction(); + clear_has_roundabout_exit_count(); + clear_has_depart_instruction(); + clear_has_verbal_depart_instruction(); + clear_has_arrive_instruction(); + clear_has_verbal_arrive_instruction(); + clear_has_verbal_multi_cue(); + clear_has_travel_mode(); + clear_has_vehicle_type(); + clear_has_pedestrian_type(); + clear_has_bicycle_type(); + clear_has_transit_type(); + clear_has_begin_path_index(); + clear_has_end_path_index(); + clear_has_to_stay_on(); + clear_has_turn_degree(); + clear_has_has_time_restrictions(); + clear_has_bss_maneuver_type(); + clear_has_verbal_succinct_transition_instruction(); _internal_metadata_.Clear(); } @@ -1753,7 +2603,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // float length = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 37)) { - _impl_.length_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_length(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -1761,7 +2611,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // double time = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) { - _impl_.time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_time(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; @@ -1778,7 +2628,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 begin_heading = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.begin_heading_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_begin_heading(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1786,7 +2636,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 begin_shape_index = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.begin_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_begin_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1794,7 +2644,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 end_shape_index = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.end_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_end_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1802,7 +2652,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // bool portions_toll = 10; case 10: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - _impl_.portions_toll_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_portions_toll(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1810,7 +2660,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // bool portions_unpaved = 11; case 11: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.portions_unpaved_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_portions_unpaved(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1869,7 +2719,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 roundabout_exit_count = 17; case 17: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _impl_.roundabout_exit_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_roundabout_exit_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1925,7 +2775,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // bool verbal_multi_cue = 23; case 23: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 184)) { - _impl_.verbal_multi_cue_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_verbal_multi_cue(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1978,7 +2828,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 begin_path_index = 29; case 29: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 232)) { - _impl_.begin_path_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_begin_path_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1986,7 +2836,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 end_path_index = 30; case 30: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 240)) { - _impl_.end_path_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_end_path_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1994,7 +2844,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // bool to_stay_on = 31; case 31: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 248)) { - _impl_.to_stay_on_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_to_stay_on(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2015,7 +2865,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // uint32 turn_degree = 33; case 33: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.turn_degree_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_turn_degree(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2023,7 +2873,7 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars // bool has_time_restrictions = 34; case 34: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.has_time_restrictions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_has_time_restrictions(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2068,22 +2918,6 @@ const char* DirectionsLeg_Maneuver::_InternalParse(const char* ptr, ::_pbi::Pars } else goto handle_unusual; continue; - // bool portions_highway = 39; - case 39: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.portions_highway_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool portions_ferry = 40; - case 40: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.portions_ferry_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -2114,14 +2948,14 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( (void) cached_has_bits; // .valhalla.DirectionsLeg.Maneuver.Type type = 1; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 1, this->_internal_type(), target); } // string text_instruction = 2; - if (!this->_internal_text_instruction().empty()) { + if (_internal_has_text_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_text_instruction().data(), static_cast(this->_internal_text_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2139,64 +2973,56 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // float length = 4; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = this->_internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { + if (_internal_has_length()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_length(), target); } // double time = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = this->_internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { + if (_internal_has_time()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_time(), target); } // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; - if (this->_internal_begin_cardinal_direction() != 0) { + if (_internal_has_begin_cardinal_direction()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 6, this->_internal_begin_cardinal_direction(), target); } // uint32 begin_heading = 7; - if (this->_internal_begin_heading() != 0) { + if (_internal_has_begin_heading()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_begin_heading(), target); } // uint32 begin_shape_index = 8; - if (this->_internal_begin_shape_index() != 0) { + if (_internal_has_begin_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_begin_shape_index(), target); } // uint32 end_shape_index = 9; - if (this->_internal_end_shape_index() != 0) { + if (_internal_has_end_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_end_shape_index(), target); } // bool portions_toll = 10; - if (this->_internal_portions_toll() != 0) { + if (_internal_has_portions_toll()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_portions_toll(), target); } // bool portions_unpaved = 11; - if (this->_internal_portions_unpaved() != 0) { + if (_internal_has_portions_unpaved()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_portions_unpaved(), target); } // string verbal_transition_alert_instruction = 12; - if (!this->_internal_verbal_transition_alert_instruction().empty()) { + if (_internal_has_verbal_transition_alert_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_transition_alert_instruction().data(), static_cast(this->_internal_verbal_transition_alert_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2206,7 +3032,7 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // string verbal_pre_transition_instruction = 13; - if (!this->_internal_verbal_pre_transition_instruction().empty()) { + if (_internal_has_verbal_pre_transition_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_pre_transition_instruction().data(), static_cast(this->_internal_verbal_pre_transition_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2216,7 +3042,7 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // string verbal_post_transition_instruction = 14; - if (!this->_internal_verbal_post_transition_instruction().empty()) { + if (_internal_has_verbal_post_transition_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_post_transition_instruction().data(), static_cast(this->_internal_verbal_post_transition_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2241,13 +3067,13 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // uint32 roundabout_exit_count = 17; - if (this->_internal_roundabout_exit_count() != 0) { + if (_internal_has_roundabout_exit_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(17, this->_internal_roundabout_exit_count(), target); } // string depart_instruction = 18; - if (!this->_internal_depart_instruction().empty()) { + if (_internal_has_depart_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_depart_instruction().data(), static_cast(this->_internal_depart_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2257,7 +3083,7 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // string verbal_depart_instruction = 19; - if (!this->_internal_verbal_depart_instruction().empty()) { + if (_internal_has_verbal_depart_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_depart_instruction().data(), static_cast(this->_internal_verbal_depart_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2267,7 +3093,7 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // string arrive_instruction = 20; - if (!this->_internal_arrive_instruction().empty()) { + if (_internal_has_arrive_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_arrive_instruction().data(), static_cast(this->_internal_arrive_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2277,7 +3103,7 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // string verbal_arrive_instruction = 21; - if (!this->_internal_verbal_arrive_instruction().empty()) { + if (_internal_has_verbal_arrive_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_arrive_instruction().data(), static_cast(this->_internal_verbal_arrive_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2294,60 +3120,60 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // bool verbal_multi_cue = 23; - if (this->_internal_verbal_multi_cue() != 0) { + if (_internal_has_verbal_multi_cue()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(23, this->_internal_verbal_multi_cue(), target); } // .valhalla.TravelMode travel_mode = 24; - if (this->_internal_travel_mode() != 0) { + if (_internal_has_travel_mode()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 24, this->_internal_travel_mode(), target); } // .valhalla.VehicleType vehicle_type = 25; - if (this->_internal_vehicle_type() != 0) { + if (_internal_has_vehicle_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 25, this->_internal_vehicle_type(), target); } // .valhalla.PedestrianType pedestrian_type = 26; - if (this->_internal_pedestrian_type() != 0) { + if (_internal_has_pedestrian_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 26, this->_internal_pedestrian_type(), target); } // .valhalla.BicycleType bicycle_type = 27; - if (this->_internal_bicycle_type() != 0) { + if (_internal_has_bicycle_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 27, this->_internal_bicycle_type(), target); } // .valhalla.TransitType transit_type = 28; - if (this->_internal_transit_type() != 0) { + if (_internal_has_transit_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 28, this->_internal_transit_type(), target); } // uint32 begin_path_index = 29; - if (this->_internal_begin_path_index() != 0) { + if (_internal_has_begin_path_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(29, this->_internal_begin_path_index(), target); } // uint32 end_path_index = 30; - if (this->_internal_end_path_index() != 0) { + if (_internal_has_end_path_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(30, this->_internal_end_path_index(), target); } // bool to_stay_on = 31; - if (this->_internal_to_stay_on() != 0) { + if (_internal_has_to_stay_on()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(31, this->_internal_to_stay_on(), target); } @@ -2361,13 +3187,13 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // uint32 turn_degree = 33; - if (this->_internal_turn_degree() != 0) { + if (_internal_has_turn_degree()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(33, this->_internal_turn_degree(), target); } // bool has_time_restrictions = 34; - if (this->_internal_has_time_restrictions() != 0) { + if (_internal_has_has_time_restrictions()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(34, this->_internal_has_time_restrictions(), target); } @@ -2381,14 +3207,14 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( } // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; - if (this->_internal_bss_maneuver_type() != 0) { + if (_internal_has_bss_maneuver_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 36, this->_internal_bss_maneuver_type(), target); } // string verbal_succinct_transition_instruction = 37; - if (!this->_internal_verbal_succinct_transition_instruction().empty()) { + if (_internal_has_verbal_succinct_transition_instruction()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_verbal_succinct_transition_instruction().data(), static_cast(this->_internal_verbal_succinct_transition_instruction().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -2404,18 +3230,6 @@ uint8_t* DirectionsLeg_Maneuver::_InternalSerialize( _Internal::bss_info(this).GetCachedSize(), target, stream); } - // bool portions_highway = 39; - if (this->_internal_portions_highway() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(39, this->_internal_portions_highway(), target); - } - - // bool portions_ferry = 40; - if (this->_internal_portions_ferry() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(40, this->_internal_portions_ferry(), target); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); @@ -2460,234 +3274,371 @@ size_t DirectionsLeg_Maneuver::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string text_instruction = 2; - if (!this->_internal_text_instruction().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_text_instruction()); - } - - // string verbal_transition_alert_instruction = 12; - if (!this->_internal_verbal_transition_alert_instruction().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_transition_alert_instruction()); - } - - // string verbal_pre_transition_instruction = 13; - if (!this->_internal_verbal_pre_transition_instruction().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_pre_transition_instruction()); - } - - // string verbal_post_transition_instruction = 14; - if (!this->_internal_verbal_post_transition_instruction().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_post_transition_instruction()); - } - - // string depart_instruction = 18; - if (!this->_internal_depart_instruction().empty()) { + // .valhalla.TripSign sign = 16; + if (this->_internal_has_sign()) { total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_depart_instruction()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.sign_); } - // string verbal_depart_instruction = 19; - if (!this->_internal_verbal_depart_instruction().empty()) { + // .valhalla.TransitRouteInfo transit_info = 22; + if (this->_internal_has_transit_info()) { total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_depart_instruction()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.transit_info_); } - // string arrive_instruction = 20; - if (!this->_internal_arrive_instruction().empty()) { + // .valhalla.BikeShareStationInfo bss_info = 38; + if (this->_internal_has_bss_info()) { total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_arrive_instruction()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.bss_info_); } - // string verbal_arrive_instruction = 21; - if (!this->_internal_verbal_arrive_instruction().empty()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_arrive_instruction()); + switch (has_type_case()) { + // .valhalla.DirectionsLeg.Maneuver.Type type = 1; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - - // string verbal_succinct_transition_instruction = 37; - if (!this->_internal_verbal_succinct_transition_instruction().empty()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_verbal_succinct_transition_instruction()); + switch (has_text_instruction_case()) { + // string text_instruction = 2; + case kTextInstruction: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_text_instruction()); + break; + } + case HAS_TEXT_INSTRUCTION_NOT_SET: { + break; + } } - - // .valhalla.TripSign sign = 16; - if (this->_internal_has_sign()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.sign_); + switch (has_length_case()) { + // float length = 4; + case kLength: { + total_size += 1 + 4; + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } } - - // .valhalla.TransitRouteInfo transit_info = 22; - if (this->_internal_has_transit_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.transit_info_); + switch (has_time_case()) { + // double time = 5; + case kTime: { + total_size += 1 + 8; + break; + } + case HAS_TIME_NOT_SET: { + break; + } } - - // .valhalla.BikeShareStationInfo bss_info = 38; - if (this->_internal_has_bss_info()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.bss_info_); + switch (has_begin_cardinal_direction_case()) { + // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; + case kBeginCardinalDirection: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_begin_cardinal_direction()); + break; + } + case HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET: { + break; + } } - - // .valhalla.DirectionsLeg.Maneuver.Type type = 1; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_begin_heading_case()) { + // uint32 begin_heading = 7; + case kBeginHeading: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - - // float length = 4; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = this->_internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { - total_size += 1 + 4; + switch (has_begin_shape_index_case()) { + // uint32 begin_shape_index = 8; + case kBeginShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - - // double time = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = this->_internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { - total_size += 1 + 8; + switch (has_end_shape_index_case()) { + // uint32 end_shape_index = 9; + case kEndShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } - - // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; - if (this->_internal_begin_cardinal_direction() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_begin_cardinal_direction()); + switch (has_portions_toll_case()) { + // bool portions_toll = 10; + case kPortionsToll: { + total_size += 1 + 1; + break; + } + case HAS_PORTIONS_TOLL_NOT_SET: { + break; + } } - - // uint32 begin_heading = 7; - if (this->_internal_begin_heading() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + switch (has_portions_unpaved_case()) { + // bool portions_unpaved = 11; + case kPortionsUnpaved: { + total_size += 1 + 1; + break; + } + case HAS_PORTIONS_UNPAVED_NOT_SET: { + break; + } } - - // uint32 begin_shape_index = 8; - if (this->_internal_begin_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + switch (has_verbal_transition_alert_instruction_case()) { + // string verbal_transition_alert_instruction = 12; + case kVerbalTransitionAlertInstruction: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_transition_alert_instruction()); + break; + } + case HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET: { + break; + } } - - // uint32 end_shape_index = 9; - if (this->_internal_end_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + switch (has_verbal_pre_transition_instruction_case()) { + // string verbal_pre_transition_instruction = 13; + case kVerbalPreTransitionInstruction: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_pre_transition_instruction()); + break; + } + case HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } - - // uint32 roundabout_exit_count = 17; - if (this->_internal_roundabout_exit_count() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_roundabout_exit_count()); + switch (has_verbal_post_transition_instruction_case()) { + // string verbal_post_transition_instruction = 14; + case kVerbalPostTransitionInstruction: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_post_transition_instruction()); + break; + } + case HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } - - // bool portions_toll = 10; - if (this->_internal_portions_toll() != 0) { - total_size += 1 + 1; + switch (has_roundabout_exit_count_case()) { + // uint32 roundabout_exit_count = 17; + case kRoundaboutExitCount: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_roundabout_exit_count()); + break; + } + case HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET: { + break; + } } - - // bool portions_unpaved = 11; - if (this->_internal_portions_unpaved() != 0) { - total_size += 1 + 1; + switch (has_depart_instruction_case()) { + // string depart_instruction = 18; + case kDepartInstruction: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_depart_instruction()); + break; + } + case HAS_DEPART_INSTRUCTION_NOT_SET: { + break; + } } - - // bool verbal_multi_cue = 23; - if (this->_internal_verbal_multi_cue() != 0) { - total_size += 2 + 1; + switch (has_verbal_depart_instruction_case()) { + // string verbal_depart_instruction = 19; + case kVerbalDepartInstruction: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_depart_instruction()); + break; + } + case HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET: { + break; + } } - - // bool to_stay_on = 31; - if (this->_internal_to_stay_on() != 0) { - total_size += 2 + 1; + switch (has_arrive_instruction_case()) { + // string arrive_instruction = 20; + case kArriveInstruction: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_arrive_instruction()); + break; + } + case HAS_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } } - - // .valhalla.TravelMode travel_mode = 24; - if (this->_internal_travel_mode() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_travel_mode()); + switch (has_verbal_arrive_instruction_case()) { + // string verbal_arrive_instruction = 21; + case kVerbalArriveInstruction: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_arrive_instruction()); + break; + } + case HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } } - - // .valhalla.VehicleType vehicle_type = 25; - if (this->_internal_vehicle_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_vehicle_type()); + switch (has_verbal_multi_cue_case()) { + // bool verbal_multi_cue = 23; + case kVerbalMultiCue: { + total_size += 2 + 1; + break; + } + case HAS_VERBAL_MULTI_CUE_NOT_SET: { + break; + } } - - // .valhalla.PedestrianType pedestrian_type = 26; - if (this->_internal_pedestrian_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_pedestrian_type()); + switch (has_travel_mode_case()) { + // .valhalla.TravelMode travel_mode = 24; + case kTravelMode: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } } - - // .valhalla.BicycleType bicycle_type = 27; - if (this->_internal_bicycle_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_bicycle_type()); + switch (has_vehicle_type_case()) { + // .valhalla.VehicleType vehicle_type = 25; + case kVehicleType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } } - - // .valhalla.TransitType transit_type = 28; - if (this->_internal_transit_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_transit_type()); + switch (has_pedestrian_type_case()) { + // .valhalla.PedestrianType pedestrian_type = 26; + case kPedestrianType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } } - - // uint32 begin_path_index = 29; - if (this->_internal_begin_path_index() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_begin_path_index()); + switch (has_bicycle_type_case()) { + // .valhalla.BicycleType bicycle_type = 27; + case kBicycleType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } } - - // uint32 end_path_index = 30; - if (this->_internal_end_path_index() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_end_path_index()); + switch (has_transit_type_case()) { + // .valhalla.TransitType transit_type = 28; + case kTransitType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } } - - // uint32 turn_degree = 33; - if (this->_internal_turn_degree() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_turn_degree()); + switch (has_begin_path_index_case()) { + // uint32 begin_path_index = 29; + case kBeginPathIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_begin_path_index()); + break; + } + case HAS_BEGIN_PATH_INDEX_NOT_SET: { + break; + } } - - // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; - if (this->_internal_bss_maneuver_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_bss_maneuver_type()); + switch (has_end_path_index_case()) { + // uint32 end_path_index = 30; + case kEndPathIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_end_path_index()); + break; + } + case HAS_END_PATH_INDEX_NOT_SET: { + break; + } } - - // bool has_time_restrictions = 34; - if (this->_internal_has_time_restrictions() != 0) { - total_size += 2 + 1; + switch (has_to_stay_on_case()) { + // bool to_stay_on = 31; + case kToStayOn: { + total_size += 2 + 1; + break; + } + case HAS_TO_STAY_ON_NOT_SET: { + break; + } } - - // bool portions_highway = 39; - if (this->_internal_portions_highway() != 0) { - total_size += 2 + 1; + switch (has_turn_degree_case()) { + // uint32 turn_degree = 33; + case kTurnDegree: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_turn_degree()); + break; + } + case HAS_TURN_DEGREE_NOT_SET: { + break; + } } - - // bool portions_ferry = 40; - if (this->_internal_portions_ferry() != 0) { - total_size += 2 + 1; + switch (has_has_time_restrictions_case()) { + // bool has_time_restrictions = 34; + case kHasTimeRestrictions: { + total_size += 2 + 1; + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + switch (has_bss_maneuver_type_case()) { + // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; + case kBssManeuverType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_bss_maneuver_type()); + break; + } + case HAS_BSS_MANEUVER_TYPE_NOT_SET: { + break; + } + } + switch (has_verbal_succinct_transition_instruction_case()) { + // string verbal_succinct_transition_instruction = 37; + case kVerbalSuccinctTransitionInstruction: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_verbal_succinct_transition_instruction()); + break; + } + case HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -2713,33 +3664,6 @@ void DirectionsLeg_Maneuver::MergeFrom(const DirectionsLeg_Maneuver& from) { _this->_impl_.begin_street_name_.MergeFrom(from._impl_.begin_street_name_); _this->_impl_.roundabout_exit_street_names_.MergeFrom(from._impl_.roundabout_exit_street_names_); _this->_impl_.guidance_views_.MergeFrom(from._impl_.guidance_views_); - if (!from._internal_text_instruction().empty()) { - _this->_internal_set_text_instruction(from._internal_text_instruction()); - } - if (!from._internal_verbal_transition_alert_instruction().empty()) { - _this->_internal_set_verbal_transition_alert_instruction(from._internal_verbal_transition_alert_instruction()); - } - if (!from._internal_verbal_pre_transition_instruction().empty()) { - _this->_internal_set_verbal_pre_transition_instruction(from._internal_verbal_pre_transition_instruction()); - } - if (!from._internal_verbal_post_transition_instruction().empty()) { - _this->_internal_set_verbal_post_transition_instruction(from._internal_verbal_post_transition_instruction()); - } - if (!from._internal_depart_instruction().empty()) { - _this->_internal_set_depart_instruction(from._internal_depart_instruction()); - } - if (!from._internal_verbal_depart_instruction().empty()) { - _this->_internal_set_verbal_depart_instruction(from._internal_verbal_depart_instruction()); - } - if (!from._internal_arrive_instruction().empty()) { - _this->_internal_set_arrive_instruction(from._internal_arrive_instruction()); - } - if (!from._internal_verbal_arrive_instruction().empty()) { - _this->_internal_set_verbal_arrive_instruction(from._internal_verbal_arrive_instruction()); - } - if (!from._internal_verbal_succinct_transition_instruction().empty()) { - _this->_internal_set_verbal_succinct_transition_instruction(from._internal_verbal_succinct_transition_instruction()); - } if (from._internal_has_sign()) { _this->_internal_mutable_sign()->::valhalla::TripSign::MergeFrom( from._internal_sign()); @@ -2752,85 +3676,284 @@ void DirectionsLeg_Maneuver::MergeFrom(const DirectionsLeg_Maneuver& from) { _this->_internal_mutable_bss_info()->::valhalla::BikeShareStationInfo::MergeFrom( from._internal_bss_info()); } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length = from._internal_length(); - uint32_t raw_length; - memcpy(&raw_length, &tmp_length, sizeof(tmp_length)); - if (raw_length != 0) { - _this->_internal_set_length(from._internal_length()); + switch (from.has_text_instruction_case()) { + case kTextInstruction: { + _this->_internal_set_text_instruction(from._internal_text_instruction()); + break; + } + case HAS_TEXT_INSTRUCTION_NOT_SET: { + break; + } } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_time = from._internal_time(); - uint64_t raw_time; - memcpy(&raw_time, &tmp_time, sizeof(tmp_time)); - if (raw_time != 0) { - _this->_internal_set_time(from._internal_time()); + switch (from.has_length_case()) { + case kLength: { + _this->_internal_set_length(from._internal_length()); + break; + } + case HAS_LENGTH_NOT_SET: { + break; + } } - if (from._internal_begin_cardinal_direction() != 0) { - _this->_internal_set_begin_cardinal_direction(from._internal_begin_cardinal_direction()); + switch (from.has_time_case()) { + case kTime: { + _this->_internal_set_time(from._internal_time()); + break; + } + case HAS_TIME_NOT_SET: { + break; + } } - if (from._internal_begin_heading() != 0) { - _this->_internal_set_begin_heading(from._internal_begin_heading()); + switch (from.has_begin_cardinal_direction_case()) { + case kBeginCardinalDirection: { + _this->_internal_set_begin_cardinal_direction(from._internal_begin_cardinal_direction()); + break; + } + case HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET: { + break; + } } - if (from._internal_begin_shape_index() != 0) { - _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - if (from._internal_end_shape_index() != 0) { - _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - if (from._internal_roundabout_exit_count() != 0) { - _this->_internal_set_roundabout_exit_count(from._internal_roundabout_exit_count()); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } - if (from._internal_portions_toll() != 0) { - _this->_internal_set_portions_toll(from._internal_portions_toll()); + switch (from.has_portions_toll_case()) { + case kPortionsToll: { + _this->_internal_set_portions_toll(from._internal_portions_toll()); + break; + } + case HAS_PORTIONS_TOLL_NOT_SET: { + break; + } } - if (from._internal_portions_unpaved() != 0) { - _this->_internal_set_portions_unpaved(from._internal_portions_unpaved()); + switch (from.has_portions_unpaved_case()) { + case kPortionsUnpaved: { + _this->_internal_set_portions_unpaved(from._internal_portions_unpaved()); + break; + } + case HAS_PORTIONS_UNPAVED_NOT_SET: { + break; + } } - if (from._internal_verbal_multi_cue() != 0) { - _this->_internal_set_verbal_multi_cue(from._internal_verbal_multi_cue()); + switch (from.has_verbal_transition_alert_instruction_case()) { + case kVerbalTransitionAlertInstruction: { + _this->_internal_set_verbal_transition_alert_instruction(from._internal_verbal_transition_alert_instruction()); + break; + } + case HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET: { + break; + } } - if (from._internal_to_stay_on() != 0) { - _this->_internal_set_to_stay_on(from._internal_to_stay_on()); + switch (from.has_verbal_pre_transition_instruction_case()) { + case kVerbalPreTransitionInstruction: { + _this->_internal_set_verbal_pre_transition_instruction(from._internal_verbal_pre_transition_instruction()); + break; + } + case HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } - if (from._internal_travel_mode() != 0) { - _this->_internal_set_travel_mode(from._internal_travel_mode()); + switch (from.has_verbal_post_transition_instruction_case()) { + case kVerbalPostTransitionInstruction: { + _this->_internal_set_verbal_post_transition_instruction(from._internal_verbal_post_transition_instruction()); + break; + } + case HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } - if (from._internal_vehicle_type() != 0) { - _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + switch (from.has_roundabout_exit_count_case()) { + case kRoundaboutExitCount: { + _this->_internal_set_roundabout_exit_count(from._internal_roundabout_exit_count()); + break; + } + case HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET: { + break; + } } - if (from._internal_pedestrian_type() != 0) { - _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + switch (from.has_depart_instruction_case()) { + case kDepartInstruction: { + _this->_internal_set_depart_instruction(from._internal_depart_instruction()); + break; + } + case HAS_DEPART_INSTRUCTION_NOT_SET: { + break; + } } - if (from._internal_bicycle_type() != 0) { - _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + switch (from.has_verbal_depart_instruction_case()) { + case kVerbalDepartInstruction: { + _this->_internal_set_verbal_depart_instruction(from._internal_verbal_depart_instruction()); + break; + } + case HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET: { + break; + } + } + switch (from.has_arrive_instruction_case()) { + case kArriveInstruction: { + _this->_internal_set_arrive_instruction(from._internal_arrive_instruction()); + break; + } + case HAS_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + switch (from.has_verbal_arrive_instruction_case()) { + case kVerbalArriveInstruction: { + _this->_internal_set_verbal_arrive_instruction(from._internal_verbal_arrive_instruction()); + break; + } + case HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET: { + break; + } + } + switch (from.has_verbal_multi_cue_case()) { + case kVerbalMultiCue: { + _this->_internal_set_verbal_multi_cue(from._internal_verbal_multi_cue()); + break; + } + case HAS_VERBAL_MULTI_CUE_NOT_SET: { + break; + } + } + switch (from.has_travel_mode_case()) { + case kTravelMode: { + _this->_internal_set_travel_mode(from._internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } + } + switch (from.has_vehicle_type_case()) { + case kVehicleType: { + _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } + } + switch (from.has_pedestrian_type_case()) { + case kPedestrianType: { + _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } } - if (from._internal_transit_type() != 0) { - _this->_internal_set_transit_type(from._internal_transit_type()); + switch (from.has_bicycle_type_case()) { + case kBicycleType: { + _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } } - if (from._internal_begin_path_index() != 0) { - _this->_internal_set_begin_path_index(from._internal_begin_path_index()); + switch (from.has_transit_type_case()) { + case kTransitType: { + _this->_internal_set_transit_type(from._internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } + } + switch (from.has_begin_path_index_case()) { + case kBeginPathIndex: { + _this->_internal_set_begin_path_index(from._internal_begin_path_index()); + break; + } + case HAS_BEGIN_PATH_INDEX_NOT_SET: { + break; + } } - if (from._internal_end_path_index() != 0) { - _this->_internal_set_end_path_index(from._internal_end_path_index()); + switch (from.has_end_path_index_case()) { + case kEndPathIndex: { + _this->_internal_set_end_path_index(from._internal_end_path_index()); + break; + } + case HAS_END_PATH_INDEX_NOT_SET: { + break; + } } - if (from._internal_turn_degree() != 0) { - _this->_internal_set_turn_degree(from._internal_turn_degree()); + switch (from.has_to_stay_on_case()) { + case kToStayOn: { + _this->_internal_set_to_stay_on(from._internal_to_stay_on()); + break; + } + case HAS_TO_STAY_ON_NOT_SET: { + break; + } } - if (from._internal_bss_maneuver_type() != 0) { - _this->_internal_set_bss_maneuver_type(from._internal_bss_maneuver_type()); + switch (from.has_turn_degree_case()) { + case kTurnDegree: { + _this->_internal_set_turn_degree(from._internal_turn_degree()); + break; + } + case HAS_TURN_DEGREE_NOT_SET: { + break; + } } - if (from._internal_has_time_restrictions() != 0) { - _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } } - if (from._internal_portions_highway() != 0) { - _this->_internal_set_portions_highway(from._internal_portions_highway()); + switch (from.has_bss_maneuver_type_case()) { + case kBssManeuverType: { + _this->_internal_set_bss_maneuver_type(from._internal_bss_maneuver_type()); + break; + } + case HAS_BSS_MANEUVER_TYPE_NOT_SET: { + break; + } } - if (from._internal_portions_ferry() != 0) { - _this->_internal_set_portions_ferry(from._internal_portions_ferry()); + switch (from.has_verbal_succinct_transition_instruction_case()) { + case kVerbalSuccinctTransitionInstruction: { + _this->_internal_set_verbal_succinct_transition_instruction(from._internal_verbal_succinct_transition_instruction()); + break; + } + case HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -2848,55 +3971,79 @@ bool DirectionsLeg_Maneuver::IsInitialized() const { void DirectionsLeg_Maneuver::InternalSwap(DirectionsLeg_Maneuver* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.street_name_.InternalSwap(&other->_impl_.street_name_); _impl_.begin_street_name_.InternalSwap(&other->_impl_.begin_street_name_); _impl_.roundabout_exit_street_names_.InternalSwap(&other->_impl_.roundabout_exit_street_names_); _impl_.guidance_views_.InternalSwap(&other->_impl_.guidance_views_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.text_instruction_, lhs_arena, - &other->_impl_.text_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_transition_alert_instruction_, lhs_arena, - &other->_impl_.verbal_transition_alert_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_pre_transition_instruction_, lhs_arena, - &other->_impl_.verbal_pre_transition_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_post_transition_instruction_, lhs_arena, - &other->_impl_.verbal_post_transition_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.depart_instruction_, lhs_arena, - &other->_impl_.depart_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_depart_instruction_, lhs_arena, - &other->_impl_.verbal_depart_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.arrive_instruction_, lhs_arena, - &other->_impl_.arrive_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_arrive_instruction_, lhs_arena, - &other->_impl_.verbal_arrive_instruction_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.verbal_succinct_transition_instruction_, lhs_arena, - &other->_impl_.verbal_succinct_transition_instruction_, rhs_arena - ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(DirectionsLeg_Maneuver, _impl_.portions_ferry_) - + sizeof(DirectionsLeg_Maneuver::_impl_.portions_ferry_) + PROTOBUF_FIELD_OFFSET(DirectionsLeg_Maneuver, _impl_.bss_info_) + + sizeof(DirectionsLeg_Maneuver::_impl_.bss_info_) - PROTOBUF_FIELD_OFFSET(DirectionsLeg_Maneuver, _impl_.sign_)>( reinterpret_cast(&_impl_.sign_), reinterpret_cast(&other->_impl_.sign_)); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_.has_text_instruction_, other->_impl_.has_text_instruction_); + swap(_impl_.has_length_, other->_impl_.has_length_); + swap(_impl_.has_time_, other->_impl_.has_time_); + swap(_impl_.has_begin_cardinal_direction_, other->_impl_.has_begin_cardinal_direction_); + swap(_impl_.has_begin_heading_, other->_impl_.has_begin_heading_); + swap(_impl_.has_begin_shape_index_, other->_impl_.has_begin_shape_index_); + swap(_impl_.has_end_shape_index_, other->_impl_.has_end_shape_index_); + swap(_impl_.has_portions_toll_, other->_impl_.has_portions_toll_); + swap(_impl_.has_portions_unpaved_, other->_impl_.has_portions_unpaved_); + swap(_impl_.has_verbal_transition_alert_instruction_, other->_impl_.has_verbal_transition_alert_instruction_); + swap(_impl_.has_verbal_pre_transition_instruction_, other->_impl_.has_verbal_pre_transition_instruction_); + swap(_impl_.has_verbal_post_transition_instruction_, other->_impl_.has_verbal_post_transition_instruction_); + swap(_impl_.has_roundabout_exit_count_, other->_impl_.has_roundabout_exit_count_); + swap(_impl_.has_depart_instruction_, other->_impl_.has_depart_instruction_); + swap(_impl_.has_verbal_depart_instruction_, other->_impl_.has_verbal_depart_instruction_); + swap(_impl_.has_arrive_instruction_, other->_impl_.has_arrive_instruction_); + swap(_impl_.has_verbal_arrive_instruction_, other->_impl_.has_verbal_arrive_instruction_); + swap(_impl_.has_verbal_multi_cue_, other->_impl_.has_verbal_multi_cue_); + swap(_impl_.has_travel_mode_, other->_impl_.has_travel_mode_); + swap(_impl_.has_vehicle_type_, other->_impl_.has_vehicle_type_); + swap(_impl_.has_pedestrian_type_, other->_impl_.has_pedestrian_type_); + swap(_impl_.has_bicycle_type_, other->_impl_.has_bicycle_type_); + swap(_impl_.has_transit_type_, other->_impl_.has_transit_type_); + swap(_impl_.has_begin_path_index_, other->_impl_.has_begin_path_index_); + swap(_impl_.has_end_path_index_, other->_impl_.has_end_path_index_); + swap(_impl_.has_to_stay_on_, other->_impl_.has_to_stay_on_); + swap(_impl_.has_turn_degree_, other->_impl_.has_turn_degree_); + swap(_impl_.has_has_time_restrictions_, other->_impl_.has_has_time_restrictions_); + swap(_impl_.has_bss_maneuver_type_, other->_impl_.has_bss_maneuver_type_); + swap(_impl_.has_verbal_succinct_transition_instruction_, other->_impl_.has_verbal_succinct_transition_instruction_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); + swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); + swap(_impl_._oneof_case_[9], other->_impl_._oneof_case_[9]); + swap(_impl_._oneof_case_[10], other->_impl_._oneof_case_[10]); + swap(_impl_._oneof_case_[11], other->_impl_._oneof_case_[11]); + swap(_impl_._oneof_case_[12], other->_impl_._oneof_case_[12]); + swap(_impl_._oneof_case_[13], other->_impl_._oneof_case_[13]); + swap(_impl_._oneof_case_[14], other->_impl_._oneof_case_[14]); + swap(_impl_._oneof_case_[15], other->_impl_._oneof_case_[15]); + swap(_impl_._oneof_case_[16], other->_impl_._oneof_case_[16]); + swap(_impl_._oneof_case_[17], other->_impl_._oneof_case_[17]); + swap(_impl_._oneof_case_[18], other->_impl_._oneof_case_[18]); + swap(_impl_._oneof_case_[19], other->_impl_._oneof_case_[19]); + swap(_impl_._oneof_case_[20], other->_impl_._oneof_case_[20]); + swap(_impl_._oneof_case_[21], other->_impl_._oneof_case_[21]); + swap(_impl_._oneof_case_[22], other->_impl_._oneof_case_[22]); + swap(_impl_._oneof_case_[23], other->_impl_._oneof_case_[23]); + swap(_impl_._oneof_case_[24], other->_impl_._oneof_case_[24]); + swap(_impl_._oneof_case_[25], other->_impl_._oneof_case_[25]); + swap(_impl_._oneof_case_[26], other->_impl_._oneof_case_[26]); + swap(_impl_._oneof_case_[27], other->_impl_._oneof_case_[27]); + swap(_impl_._oneof_case_[28], other->_impl_._oneof_case_[28]); + swap(_impl_._oneof_case_[29], other->_impl_._oneof_case_[29]); + swap(_impl_._oneof_case_[30], other->_impl_._oneof_case_[30]); } std::string DirectionsLeg_Maneuver::GetTypeName() const { @@ -2930,28 +4077,58 @@ DirectionsLeg::DirectionsLeg(const DirectionsLeg& from) new (&_impl_) Impl_{ decltype(_impl_.location_){from._impl_.location_} , decltype(_impl_.maneuver_){from._impl_.maneuver_} - , decltype(_impl_.shape_){} , decltype(_impl_.summary_){nullptr} - , decltype(_impl_.trip_id_){} - , decltype(_impl_.leg_id_){} - , decltype(_impl_.leg_count_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_leg_id_){} + , decltype(_impl_.has_leg_count_){} + , decltype(_impl_.has_shape_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.shape_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.shape_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_shape().empty()) { - _this->_impl_.shape_.Set(from._internal_shape(), - _this->GetArenaForAllocation()); - } if (from._internal_has_summary()) { _this->_impl_.summary_ = new ::valhalla::DirectionsLeg_Summary(*from._impl_.summary_); } - ::memcpy(&_impl_.trip_id_, &from._impl_.trip_id_, - static_cast(reinterpret_cast(&_impl_.leg_count_) - - reinterpret_cast(&_impl_.trip_id_)) + sizeof(_impl_.leg_count_)); + clear_has_has_trip_id(); + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + clear_has_has_leg_id(); + switch (from.has_leg_id_case()) { + case kLegId: { + _this->_internal_set_leg_id(from._internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } + } + clear_has_has_leg_count(); + switch (from.has_leg_count_case()) { + case kLegCount: { + _this->_internal_set_leg_count(from._internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + clear_has_has_shape(); + switch (from.has_shape_case()) { + case kShape: { + _this->_internal_set_shape(from._internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.DirectionsLeg) } @@ -2962,17 +4139,18 @@ inline void DirectionsLeg::SharedCtor( new (&_impl_) Impl_{ decltype(_impl_.location_){arena} , decltype(_impl_.maneuver_){arena} - , decltype(_impl_.shape_){} , decltype(_impl_.summary_){nullptr} - , decltype(_impl_.trip_id_){uint64_t{0u}} - , decltype(_impl_.leg_id_){0u} - , decltype(_impl_.leg_count_){0u} + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_leg_id_){} + , decltype(_impl_.has_leg_count_){} + , decltype(_impl_.has_shape_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.shape_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.shape_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_trip_id(); + clear_has_has_leg_id(); + clear_has_has_leg_count(); + clear_has_has_shape(); } DirectionsLeg::~DirectionsLeg() { @@ -2988,14 +4166,82 @@ inline void DirectionsLeg::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.location_.~RepeatedPtrField(); _impl_.maneuver_.~RepeatedPtrField(); - _impl_.shape_.Destroy(); if (this != internal_default_instance()) delete _impl_.summary_; + if (has_has_trip_id()) { + clear_has_trip_id(); + } + if (has_has_leg_id()) { + clear_has_leg_id(); + } + if (has_has_leg_count()) { + clear_has_leg_count(); + } + if (has_has_shape()) { + clear_has_shape(); + } } void DirectionsLeg::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void DirectionsLeg::clear_has_trip_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg) + switch (has_trip_id_case()) { + case kTripId: { + // No need to clear + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TRIP_ID_NOT_SET; +} + +void DirectionsLeg::clear_has_leg_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg) + switch (has_leg_id_case()) { + case kLegId: { + // No need to clear + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_LEG_ID_NOT_SET; +} + +void DirectionsLeg::clear_has_leg_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg) + switch (has_leg_count_case()) { + case kLegCount: { + // No need to clear + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_LEG_COUNT_NOT_SET; +} + +void DirectionsLeg::clear_has_shape() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.DirectionsLeg) + switch (has_shape_case()) { + case kShape: { + _impl_.has_shape_.shape_.Destroy(); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_SHAPE_NOT_SET; +} + + void DirectionsLeg::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.DirectionsLeg) uint32_t cached_has_bits = 0; @@ -3004,14 +4250,14 @@ void DirectionsLeg::Clear() { _impl_.location_.Clear(); _impl_.maneuver_.Clear(); - _impl_.shape_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.summary_ != nullptr) { delete _impl_.summary_; } _impl_.summary_ = nullptr; - ::memset(&_impl_.trip_id_, 0, static_cast( - reinterpret_cast(&_impl_.leg_count_) - - reinterpret_cast(&_impl_.trip_id_)) + sizeof(_impl_.leg_count_)); + clear_has_trip_id(); + clear_has_leg_id(); + clear_has_leg_count(); + clear_has_shape(); _internal_metadata_.Clear(); } @@ -3024,7 +4270,7 @@ const char* DirectionsLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint64 trip_id = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.trip_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_trip_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3032,7 +4278,7 @@ const char* DirectionsLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 leg_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.leg_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_leg_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3040,7 +4286,7 @@ const char* DirectionsLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 leg_count = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.leg_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_leg_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3119,19 +4365,19 @@ uint8_t* DirectionsLeg::_InternalSerialize( (void) cached_has_bits; // uint64 trip_id = 1; - if (this->_internal_trip_id() != 0) { + if (_internal_has_trip_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_trip_id(), target); } // uint32 leg_id = 2; - if (this->_internal_leg_id() != 0) { + if (_internal_has_leg_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_leg_id(), target); } // uint32 leg_count = 3; - if (this->_internal_leg_count() != 0) { + if (_internal_has_leg_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_leg_count(), target); } @@ -3160,7 +4406,7 @@ uint8_t* DirectionsLeg::_InternalSerialize( } // string shape = 7; - if (!this->_internal_shape().empty()) { + if (_internal_has_shape()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_shape().data(), static_cast(this->_internal_shape().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -3199,13 +4445,6 @@ size_t DirectionsLeg::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string shape = 7; - if (!this->_internal_shape().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_shape()); - } - // .valhalla.DirectionsLeg.Summary summary = 5; if (this->_internal_has_summary()) { total_size += 1 + @@ -3213,21 +4452,48 @@ size_t DirectionsLeg::ByteSizeLong() const { *_impl_.summary_); } - // uint64 trip_id = 1; - if (this->_internal_trip_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trip_id()); + switch (has_trip_id_case()) { + // uint64 trip_id = 1; + case kTripId: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } } - - // uint32 leg_id = 2; - if (this->_internal_leg_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_id()); + switch (has_leg_id_case()) { + // uint32 leg_id = 2; + case kLegId: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } } - - // uint32 leg_count = 3; - if (this->_internal_leg_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_count()); + switch (has_leg_count_case()) { + // uint32 leg_count = 3; + case kLegCount: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + switch (has_shape_case()) { + // string shape = 7; + case kShape: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -3251,21 +4517,45 @@ void DirectionsLeg::MergeFrom(const DirectionsLeg& from) { _this->_impl_.location_.MergeFrom(from._impl_.location_); _this->_impl_.maneuver_.MergeFrom(from._impl_.maneuver_); - if (!from._internal_shape().empty()) { - _this->_internal_set_shape(from._internal_shape()); - } if (from._internal_has_summary()) { _this->_internal_mutable_summary()->::valhalla::DirectionsLeg_Summary::MergeFrom( from._internal_summary()); } - if (from._internal_trip_id() != 0) { - _this->_internal_set_trip_id(from._internal_trip_id()); + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + switch (from.has_leg_id_case()) { + case kLegId: { + _this->_internal_set_leg_id(from._internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } } - if (from._internal_leg_id() != 0) { - _this->_internal_set_leg_id(from._internal_leg_id()); + switch (from.has_leg_count_case()) { + case kLegCount: { + _this->_internal_set_leg_count(from._internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } } - if (from._internal_leg_count() != 0) { - _this->_internal_set_leg_count(from._internal_leg_count()); + switch (from.has_shape_case()) { + case kShape: { + _this->_internal_set_shape(from._internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -3283,21 +4573,18 @@ bool DirectionsLeg::IsInitialized() const { void DirectionsLeg::InternalSwap(DirectionsLeg* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.location_.InternalSwap(&other->_impl_.location_); _impl_.maneuver_.InternalSwap(&other->_impl_.maneuver_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.shape_, lhs_arena, - &other->_impl_.shape_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(DirectionsLeg, _impl_.leg_count_) - + sizeof(DirectionsLeg::_impl_.leg_count_) - - PROTOBUF_FIELD_OFFSET(DirectionsLeg, _impl_.summary_)>( - reinterpret_cast(&_impl_.summary_), - reinterpret_cast(&other->_impl_.summary_)); + swap(_impl_.summary_, other->_impl_.summary_); + swap(_impl_.has_trip_id_, other->_impl_.has_trip_id_); + swap(_impl_.has_leg_id_, other->_impl_.has_leg_id_); + swap(_impl_.has_leg_count_, other->_impl_.has_leg_count_); + swap(_impl_.has_shape_, other->_impl_.has_shape_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); } std::string DirectionsLeg::GetTypeName() const { diff --git a/include/linux/valhalla/proto/directions.pb.h b/include/linux/valhalla/proto/directions.pb.h index 0e0ea45..8a0ad0c 100644 --- a/include/linux/valhalla/proto/directions.pb.h +++ b/include/linux/valhalla/proto/directions.pb.h @@ -29,7 +29,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -#include "common.pb.h" +#include "tripcommon.pb.h" #include "sign.pb.h" // @@protoc_insertion_point(includes) #include @@ -169,17 +169,12 @@ enum DirectionsLeg_Maneuver_Type : int { DirectionsLeg_Maneuver_Type_kPostTransitConnectionDestination = 36, DirectionsLeg_Maneuver_Type_kMergeRight = 37, DirectionsLeg_Maneuver_Type_kMergeLeft = 38, - DirectionsLeg_Maneuver_Type_kElevatorEnter = 39, - DirectionsLeg_Maneuver_Type_kStepsEnter = 40, - DirectionsLeg_Maneuver_Type_kEscalatorEnter = 41, - DirectionsLeg_Maneuver_Type_kBuildingEnter = 42, - DirectionsLeg_Maneuver_Type_kBuildingExit = 43, DirectionsLeg_Maneuver_Type_DirectionsLeg_Maneuver_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), DirectionsLeg_Maneuver_Type_DirectionsLeg_Maneuver_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool DirectionsLeg_Maneuver_Type_IsValid(int value); constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver_Type_Type_MIN = DirectionsLeg_Maneuver_Type_kNone; -constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver_Type_Type_MAX = DirectionsLeg_Maneuver_Type_kBuildingExit; +constexpr DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver_Type_Type_MAX = DirectionsLeg_Maneuver_Type_kMergeLeft; constexpr int DirectionsLeg_Maneuver_Type_Type_ARRAYSIZE = DirectionsLeg_Maneuver_Type_Type_MAX + 1; const std::string& DirectionsLeg_Maneuver_Type_Name(DirectionsLeg_Maneuver_Type value); @@ -250,6 +245,21 @@ class DirectionsLeg_Summary final : static const DirectionsLeg_Summary& default_instance() { return *internal_default_instance(); } + enum HasLengthCase { + kLength = 1, + HAS_LENGTH_NOT_SET = 0, + }; + + enum HasTimeCase { + kTime = 2, + HAS_TIME_NOT_SET = 0, + }; + + enum HasHasTimeRestrictionsCase { + kHasTimeRestrictions = 4, + HAS_HAS_TIME_RESTRICTIONS_NOT_SET = 0, + }; + static inline const DirectionsLeg_Summary* internal_default_instance() { return reinterpret_cast( &_DirectionsLeg_Summary_default_instance_); @@ -320,12 +330,9 @@ class DirectionsLeg_Summary final : enum : int { kBboxFieldNumber = 3, - kTimeFieldNumber = 2, kLengthFieldNumber = 1, + kTimeFieldNumber = 2, kHasTimeRestrictionsFieldNumber = 4, - kHasTollFieldNumber = 5, - kHasFerryFieldNumber = 6, - kHasHighwayFieldNumber = 7, }; // .valhalla.BoundingBox bbox = 3; bool has_bbox() const; @@ -345,16 +352,11 @@ class DirectionsLeg_Summary final : ::valhalla::BoundingBox* bbox); ::valhalla::BoundingBox* unsafe_arena_release_bbox(); - // double time = 2; - void clear_time(); - double time() const; - void set_time(double value); + // float length = 1; + bool has_length() const; private: - double _internal_time() const; - void _internal_set_time(double value); + bool _internal_has_length() const; public: - - // float length = 1; void clear_length(); float length() const; void set_length(float value); @@ -363,58 +365,77 @@ class DirectionsLeg_Summary final : void _internal_set_length(float value); public: - // bool has_time_restrictions = 4; - void clear_has_time_restrictions(); - bool has_time_restrictions() const; - void set_has_time_restrictions(bool value); + // double time = 2; + bool has_time() const; private: - bool _internal_has_time_restrictions() const; - void _internal_set_has_time_restrictions(bool value); + bool _internal_has_time() const; public: - - // bool has_toll = 5; - void clear_has_toll(); - bool has_toll() const; - void set_has_toll(bool value); + void clear_time(); + double time() const; + void set_time(double value); private: - bool _internal_has_toll() const; - void _internal_set_has_toll(bool value); + double _internal_time() const; + void _internal_set_time(double value); public: - // bool has_ferry = 6; - void clear_has_ferry(); - bool has_ferry() const; - void set_has_ferry(bool value); + // bool has_time_restrictions = 4; + bool has_has_time_restrictions() const; private: - bool _internal_has_ferry() const; - void _internal_set_has_ferry(bool value); + bool _internal_has_has_time_restrictions() const; public: - - // bool has_highway = 7; - void clear_has_highway(); - bool has_highway() const; - void set_has_highway(bool value); + void clear_has_time_restrictions(); + bool has_time_restrictions() const; + void set_has_time_restrictions(bool value); private: - bool _internal_has_highway() const; - void _internal_set_has_highway(bool value); + bool _internal_has_time_restrictions() const; + void _internal_set_has_time_restrictions(bool value); public: + void clear_has_length(); + HasLengthCase has_length_case() const; + void clear_has_time(); + HasTimeCase has_time_case() const; + void clear_has_has_time_restrictions(); + HasHasTimeRestrictionsCase has_has_time_restrictions_case() const; // @@protoc_insertion_point(class_scope:valhalla.DirectionsLeg.Summary) private: class _Internal; + void set_has_length(); + void set_has_time(); + void set_has_has_time_restrictions(); + + inline bool has_has_length() const; + inline void clear_has_has_length(); + + inline bool has_has_time() const; + inline void clear_has_has_time(); + + inline bool has_has_has_time_restrictions() const; + inline void clear_has_has_has_time_restrictions(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::valhalla::BoundingBox* bbox_; - double time_; - float length_; - bool has_time_restrictions_; - bool has_toll_; - bool has_ferry_; - bool has_highway_; + union HasLengthUnion { + constexpr HasLengthUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float length_; + } has_length_; + union HasTimeUnion { + constexpr HasTimeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double time_; + } has_time_; + union HasHasTimeRestrictionsUnion { + constexpr HasHasTimeRestrictionsUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool has_time_restrictions_; + } has_has_time_restrictions_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[3]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_directions_2eproto; @@ -455,6 +476,21 @@ class DirectionsLeg_GuidanceView final : static const DirectionsLeg_GuidanceView& default_instance() { return *internal_default_instance(); } + enum HasDataIdCase { + kDataId = 1, + HAS_DATA_ID_NOT_SET = 0, + }; + + enum HasTypeCase { + kType = 2, + HAS_TYPE_NOT_SET = 0, + }; + + enum HasBaseIdCase { + kBaseId = 3, + HAS_BASE_ID_NOT_SET = 0, + }; + static inline const DirectionsLeg_GuidanceView* internal_default_instance() { return reinterpret_cast( &_DirectionsLeg_GuidanceView_default_instance_); @@ -566,8 +602,8 @@ class DirectionsLeg_GuidanceView final : enum : int { kOverlayIdsFieldNumber = 4, kDataIdFieldNumber = 1, - kBaseIdFieldNumber = 3, kTypeFieldNumber = 2, + kBaseIdFieldNumber = 3, }; // repeated string overlay_ids = 4; int overlay_ids_size() const; @@ -594,6 +630,10 @@ class DirectionsLeg_GuidanceView final : public: // string data_id = 1; + bool has_data_id() const; + private: + bool _internal_has_data_id() const; + public: void clear_data_id(); const std::string& data_id() const; template @@ -607,7 +647,24 @@ class DirectionsLeg_GuidanceView final : std::string* _internal_mutable_data_id(); public: + // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::valhalla::DirectionsLeg_GuidanceView_Type type() const; + void set_type(::valhalla::DirectionsLeg_GuidanceView_Type value); + private: + ::valhalla::DirectionsLeg_GuidanceView_Type _internal_type() const; + void _internal_set_type(::valhalla::DirectionsLeg_GuidanceView_Type value); + public: + // string base_id = 3; + bool has_base_id() const; + private: + bool _internal_has_base_id() const; + public: void clear_base_id(); const std::string& base_id() const; template @@ -621,28 +678,51 @@ class DirectionsLeg_GuidanceView final : std::string* _internal_mutable_base_id(); public: - // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; - void clear_type(); - ::valhalla::DirectionsLeg_GuidanceView_Type type() const; - void set_type(::valhalla::DirectionsLeg_GuidanceView_Type value); - private: - ::valhalla::DirectionsLeg_GuidanceView_Type _internal_type() const; - void _internal_set_type(::valhalla::DirectionsLeg_GuidanceView_Type value); - public: - + void clear_has_data_id(); + HasDataIdCase has_data_id_case() const; + void clear_has_type(); + HasTypeCase has_type_case() const; + void clear_has_base_id(); + HasBaseIdCase has_base_id_case() const; // @@protoc_insertion_point(class_scope:valhalla.DirectionsLeg.GuidanceView) private: class _Internal; + void set_has_data_id(); + void set_has_type(); + void set_has_base_id(); + + inline bool has_has_data_id() const; + inline void clear_has_has_data_id(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); + + inline bool has_has_base_id() const; + inline void clear_has_has_base_id(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField overlay_ids_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr base_id_; - int type_; + union HasDataIdUnion { + constexpr HasDataIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_id_; + } has_data_id_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; + union HasBaseIdUnion { + constexpr HasBaseIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr base_id_; + } has_base_id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[3]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_directions_2eproto; @@ -683,6 +763,161 @@ class DirectionsLeg_Maneuver final : static const DirectionsLeg_Maneuver& default_instance() { return *internal_default_instance(); } + enum HasTypeCase { + kType = 1, + HAS_TYPE_NOT_SET = 0, + }; + + enum HasTextInstructionCase { + kTextInstruction = 2, + HAS_TEXT_INSTRUCTION_NOT_SET = 0, + }; + + enum HasLengthCase { + kLength = 4, + HAS_LENGTH_NOT_SET = 0, + }; + + enum HasTimeCase { + kTime = 5, + HAS_TIME_NOT_SET = 0, + }; + + enum HasBeginCardinalDirectionCase { + kBeginCardinalDirection = 6, + HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET = 0, + }; + + enum HasBeginHeadingCase { + kBeginHeading = 7, + HAS_BEGIN_HEADING_NOT_SET = 0, + }; + + enum HasBeginShapeIndexCase { + kBeginShapeIndex = 8, + HAS_BEGIN_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasEndShapeIndexCase { + kEndShapeIndex = 9, + HAS_END_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasPortionsTollCase { + kPortionsToll = 10, + HAS_PORTIONS_TOLL_NOT_SET = 0, + }; + + enum HasPortionsUnpavedCase { + kPortionsUnpaved = 11, + HAS_PORTIONS_UNPAVED_NOT_SET = 0, + }; + + enum HasVerbalTransitionAlertInstructionCase { + kVerbalTransitionAlertInstruction = 12, + HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET = 0, + }; + + enum HasVerbalPreTransitionInstructionCase { + kVerbalPreTransitionInstruction = 13, + HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET = 0, + }; + + enum HasVerbalPostTransitionInstructionCase { + kVerbalPostTransitionInstruction = 14, + HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET = 0, + }; + + enum HasRoundaboutExitCountCase { + kRoundaboutExitCount = 17, + HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET = 0, + }; + + enum HasDepartInstructionCase { + kDepartInstruction = 18, + HAS_DEPART_INSTRUCTION_NOT_SET = 0, + }; + + enum HasVerbalDepartInstructionCase { + kVerbalDepartInstruction = 19, + HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET = 0, + }; + + enum HasArriveInstructionCase { + kArriveInstruction = 20, + HAS_ARRIVE_INSTRUCTION_NOT_SET = 0, + }; + + enum HasVerbalArriveInstructionCase { + kVerbalArriveInstruction = 21, + HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET = 0, + }; + + enum HasVerbalMultiCueCase { + kVerbalMultiCue = 23, + HAS_VERBAL_MULTI_CUE_NOT_SET = 0, + }; + + enum HasTravelModeCase { + kTravelMode = 24, + HAS_TRAVEL_MODE_NOT_SET = 0, + }; + + enum HasVehicleTypeCase { + kVehicleType = 25, + HAS_VEHICLE_TYPE_NOT_SET = 0, + }; + + enum HasPedestrianTypeCase { + kPedestrianType = 26, + HAS_PEDESTRIAN_TYPE_NOT_SET = 0, + }; + + enum HasBicycleTypeCase { + kBicycleType = 27, + HAS_BICYCLE_TYPE_NOT_SET = 0, + }; + + enum HasTransitTypeCase { + kTransitType = 28, + HAS_TRANSIT_TYPE_NOT_SET = 0, + }; + + enum HasBeginPathIndexCase { + kBeginPathIndex = 29, + HAS_BEGIN_PATH_INDEX_NOT_SET = 0, + }; + + enum HasEndPathIndexCase { + kEndPathIndex = 30, + HAS_END_PATH_INDEX_NOT_SET = 0, + }; + + enum HasToStayOnCase { + kToStayOn = 31, + HAS_TO_STAY_ON_NOT_SET = 0, + }; + + enum HasTurnDegreeCase { + kTurnDegree = 33, + HAS_TURN_DEGREE_NOT_SET = 0, + }; + + enum HasHasTimeRestrictionsCase { + kHasTimeRestrictions = 34, + HAS_HAS_TIME_RESTRICTIONS_NOT_SET = 0, + }; + + enum HasBssManeuverTypeCase { + kBssManeuverType = 36, + HAS_BSS_MANEUVER_TYPE_NOT_SET = 0, + }; + + enum HasVerbalSuccinctTransitionInstructionCase { + kVerbalSuccinctTransitionInstruction = 37, + HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET = 0, + }; + static inline const DirectionsLeg_Maneuver* internal_default_instance() { return reinterpret_cast( &_DirectionsLeg_Maneuver_default_instance_); @@ -866,16 +1101,6 @@ class DirectionsLeg_Maneuver final : DirectionsLeg_Maneuver_Type_kMergeRight; static constexpr Type kMergeLeft = DirectionsLeg_Maneuver_Type_kMergeLeft; - static constexpr Type kElevatorEnter = - DirectionsLeg_Maneuver_Type_kElevatorEnter; - static constexpr Type kStepsEnter = - DirectionsLeg_Maneuver_Type_kStepsEnter; - static constexpr Type kEscalatorEnter = - DirectionsLeg_Maneuver_Type_kEscalatorEnter; - static constexpr Type kBuildingEnter = - DirectionsLeg_Maneuver_Type_kBuildingEnter; - static constexpr Type kBuildingExit = - DirectionsLeg_Maneuver_Type_kBuildingExit; static inline bool Type_IsValid(int value) { return DirectionsLeg_Maneuver_Type_IsValid(value); } @@ -932,30 +1157,28 @@ class DirectionsLeg_Maneuver final : kBeginStreetNameFieldNumber = 15, kRoundaboutExitStreetNamesFieldNumber = 32, kGuidanceViewsFieldNumber = 35, - kTextInstructionFieldNumber = 2, - kVerbalTransitionAlertInstructionFieldNumber = 12, - kVerbalPreTransitionInstructionFieldNumber = 13, - kVerbalPostTransitionInstructionFieldNumber = 14, - kDepartInstructionFieldNumber = 18, - kVerbalDepartInstructionFieldNumber = 19, - kArriveInstructionFieldNumber = 20, - kVerbalArriveInstructionFieldNumber = 21, - kVerbalSuccinctTransitionInstructionFieldNumber = 37, kSignFieldNumber = 16, kTransitInfoFieldNumber = 22, kBssInfoFieldNumber = 38, kTypeFieldNumber = 1, + kTextInstructionFieldNumber = 2, kLengthFieldNumber = 4, kTimeFieldNumber = 5, kBeginCardinalDirectionFieldNumber = 6, kBeginHeadingFieldNumber = 7, kBeginShapeIndexFieldNumber = 8, kEndShapeIndexFieldNumber = 9, - kRoundaboutExitCountFieldNumber = 17, kPortionsTollFieldNumber = 10, kPortionsUnpavedFieldNumber = 11, + kVerbalTransitionAlertInstructionFieldNumber = 12, + kVerbalPreTransitionInstructionFieldNumber = 13, + kVerbalPostTransitionInstructionFieldNumber = 14, + kRoundaboutExitCountFieldNumber = 17, + kDepartInstructionFieldNumber = 18, + kVerbalDepartInstructionFieldNumber = 19, + kArriveInstructionFieldNumber = 20, + kVerbalArriveInstructionFieldNumber = 21, kVerbalMultiCueFieldNumber = 23, - kToStayOnFieldNumber = 31, kTravelModeFieldNumber = 24, kVehicleTypeFieldNumber = 25, kPedestrianTypeFieldNumber = 26, @@ -963,11 +1186,11 @@ class DirectionsLeg_Maneuver final : kTransitTypeFieldNumber = 28, kBeginPathIndexFieldNumber = 29, kEndPathIndexFieldNumber = 30, + kToStayOnFieldNumber = 31, kTurnDegreeFieldNumber = 33, - kBssManeuverTypeFieldNumber = 36, kHasTimeRestrictionsFieldNumber = 34, - kPortionsHighwayFieldNumber = 39, - kPortionsFerryFieldNumber = 40, + kBssManeuverTypeFieldNumber = 36, + kVerbalSuccinctTransitionInstructionFieldNumber = 37, }; // repeated .valhalla.StreetName street_name = 3; int street_name_size() const; @@ -1041,7 +1264,78 @@ class DirectionsLeg_Maneuver final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::DirectionsLeg_GuidanceView >& guidance_views() const; + // .valhalla.TripSign sign = 16; + bool has_sign() const; + private: + bool _internal_has_sign() const; + public: + void clear_sign(); + const ::valhalla::TripSign& sign() const; + PROTOBUF_NODISCARD ::valhalla::TripSign* release_sign(); + ::valhalla::TripSign* mutable_sign(); + void set_allocated_sign(::valhalla::TripSign* sign); + private: + const ::valhalla::TripSign& _internal_sign() const; + ::valhalla::TripSign* _internal_mutable_sign(); + public: + void unsafe_arena_set_allocated_sign( + ::valhalla::TripSign* sign); + ::valhalla::TripSign* unsafe_arena_release_sign(); + + // .valhalla.TransitRouteInfo transit_info = 22; + bool has_transit_info() const; + private: + bool _internal_has_transit_info() const; + public: + void clear_transit_info(); + const ::valhalla::TransitRouteInfo& transit_info() const; + PROTOBUF_NODISCARD ::valhalla::TransitRouteInfo* release_transit_info(); + ::valhalla::TransitRouteInfo* mutable_transit_info(); + void set_allocated_transit_info(::valhalla::TransitRouteInfo* transit_info); + private: + const ::valhalla::TransitRouteInfo& _internal_transit_info() const; + ::valhalla::TransitRouteInfo* _internal_mutable_transit_info(); + public: + void unsafe_arena_set_allocated_transit_info( + ::valhalla::TransitRouteInfo* transit_info); + ::valhalla::TransitRouteInfo* unsafe_arena_release_transit_info(); + + // .valhalla.BikeShareStationInfo bss_info = 38; + bool has_bss_info() const; + private: + bool _internal_has_bss_info() const; + public: + void clear_bss_info(); + const ::valhalla::BikeShareStationInfo& bss_info() const; + PROTOBUF_NODISCARD ::valhalla::BikeShareStationInfo* release_bss_info(); + ::valhalla::BikeShareStationInfo* mutable_bss_info(); + void set_allocated_bss_info(::valhalla::BikeShareStationInfo* bss_info); + private: + const ::valhalla::BikeShareStationInfo& _internal_bss_info() const; + ::valhalla::BikeShareStationInfo* _internal_mutable_bss_info(); + public: + void unsafe_arena_set_allocated_bss_info( + ::valhalla::BikeShareStationInfo* bss_info); + ::valhalla::BikeShareStationInfo* unsafe_arena_release_bss_info(); + + // .valhalla.DirectionsLeg.Maneuver.Type type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::valhalla::DirectionsLeg_Maneuver_Type type() const; + void set_type(::valhalla::DirectionsLeg_Maneuver_Type value); + private: + ::valhalla::DirectionsLeg_Maneuver_Type _internal_type() const; + void _internal_set_type(::valhalla::DirectionsLeg_Maneuver_Type value); + public: + // string text_instruction = 2; + bool has_text_instruction() const; + private: + bool _internal_has_text_instruction() const; + public: void clear_text_instruction(); const std::string& text_instruction() const; template @@ -1055,35 +1349,151 @@ class DirectionsLeg_Maneuver final : std::string* _internal_mutable_text_instruction(); public: - // string verbal_transition_alert_instruction = 12; - void clear_verbal_transition_alert_instruction(); - const std::string& verbal_transition_alert_instruction() const; - template - void set_verbal_transition_alert_instruction(ArgT0&& arg0, ArgT... args); - std::string* mutable_verbal_transition_alert_instruction(); - PROTOBUF_NODISCARD std::string* release_verbal_transition_alert_instruction(); - void set_allocated_verbal_transition_alert_instruction(std::string* verbal_transition_alert_instruction); + // float length = 4; + bool has_length() const; private: - const std::string& _internal_verbal_transition_alert_instruction() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_transition_alert_instruction(const std::string& value); - std::string* _internal_mutable_verbal_transition_alert_instruction(); + bool _internal_has_length() const; public: - - // string verbal_pre_transition_instruction = 13; - void clear_verbal_pre_transition_instruction(); - const std::string& verbal_pre_transition_instruction() const; - template - void set_verbal_pre_transition_instruction(ArgT0&& arg0, ArgT... args); - std::string* mutable_verbal_pre_transition_instruction(); - PROTOBUF_NODISCARD std::string* release_verbal_pre_transition_instruction(); - void set_allocated_verbal_pre_transition_instruction(std::string* verbal_pre_transition_instruction); + void clear_length(); + float length() const; + void set_length(float value); private: - const std::string& _internal_verbal_pre_transition_instruction() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_pre_transition_instruction(const std::string& value); + float _internal_length() const; + void _internal_set_length(float value); + public: + + // double time = 5; + bool has_time() const; + private: + bool _internal_has_time() const; + public: + void clear_time(); + double time() const; + void set_time(double value); + private: + double _internal_time() const; + void _internal_set_time(double value); + public: + + // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; + bool has_begin_cardinal_direction() const; + private: + bool _internal_has_begin_cardinal_direction() const; + public: + void clear_begin_cardinal_direction(); + ::valhalla::DirectionsLeg_Maneuver_CardinalDirection begin_cardinal_direction() const; + void set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value); + private: + ::valhalla::DirectionsLeg_Maneuver_CardinalDirection _internal_begin_cardinal_direction() const; + void _internal_set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value); + public: + + // uint32 begin_heading = 7; + bool has_begin_heading() const; + private: + bool _internal_has_begin_heading() const; + public: + void clear_begin_heading(); + uint32_t begin_heading() const; + void set_begin_heading(uint32_t value); + private: + uint32_t _internal_begin_heading() const; + void _internal_set_begin_heading(uint32_t value); + public: + + // uint32 begin_shape_index = 8; + bool has_begin_shape_index() const; + private: + bool _internal_has_begin_shape_index() const; + public: + void clear_begin_shape_index(); + uint32_t begin_shape_index() const; + void set_begin_shape_index(uint32_t value); + private: + uint32_t _internal_begin_shape_index() const; + void _internal_set_begin_shape_index(uint32_t value); + public: + + // uint32 end_shape_index = 9; + bool has_end_shape_index() const; + private: + bool _internal_has_end_shape_index() const; + public: + void clear_end_shape_index(); + uint32_t end_shape_index() const; + void set_end_shape_index(uint32_t value); + private: + uint32_t _internal_end_shape_index() const; + void _internal_set_end_shape_index(uint32_t value); + public: + + // bool portions_toll = 10; + bool has_portions_toll() const; + private: + bool _internal_has_portions_toll() const; + public: + void clear_portions_toll(); + bool portions_toll() const; + void set_portions_toll(bool value); + private: + bool _internal_portions_toll() const; + void _internal_set_portions_toll(bool value); + public: + + // bool portions_unpaved = 11; + bool has_portions_unpaved() const; + private: + bool _internal_has_portions_unpaved() const; + public: + void clear_portions_unpaved(); + bool portions_unpaved() const; + void set_portions_unpaved(bool value); + private: + bool _internal_portions_unpaved() const; + void _internal_set_portions_unpaved(bool value); + public: + + // string verbal_transition_alert_instruction = 12; + bool has_verbal_transition_alert_instruction() const; + private: + bool _internal_has_verbal_transition_alert_instruction() const; + public: + void clear_verbal_transition_alert_instruction(); + const std::string& verbal_transition_alert_instruction() const; + template + void set_verbal_transition_alert_instruction(ArgT0&& arg0, ArgT... args); + std::string* mutable_verbal_transition_alert_instruction(); + PROTOBUF_NODISCARD std::string* release_verbal_transition_alert_instruction(); + void set_allocated_verbal_transition_alert_instruction(std::string* verbal_transition_alert_instruction); + private: + const std::string& _internal_verbal_transition_alert_instruction() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_transition_alert_instruction(const std::string& value); + std::string* _internal_mutable_verbal_transition_alert_instruction(); + public: + + // string verbal_pre_transition_instruction = 13; + bool has_verbal_pre_transition_instruction() const; + private: + bool _internal_has_verbal_pre_transition_instruction() const; + public: + void clear_verbal_pre_transition_instruction(); + const std::string& verbal_pre_transition_instruction() const; + template + void set_verbal_pre_transition_instruction(ArgT0&& arg0, ArgT... args); + std::string* mutable_verbal_pre_transition_instruction(); + PROTOBUF_NODISCARD std::string* release_verbal_pre_transition_instruction(); + void set_allocated_verbal_pre_transition_instruction(std::string* verbal_pre_transition_instruction); + private: + const std::string& _internal_verbal_pre_transition_instruction() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_pre_transition_instruction(const std::string& value); std::string* _internal_mutable_verbal_pre_transition_instruction(); public: // string verbal_post_transition_instruction = 14; + bool has_verbal_post_transition_instruction() const; + private: + bool _internal_has_verbal_post_transition_instruction() const; + public: void clear_verbal_post_transition_instruction(); const std::string& verbal_post_transition_instruction() const; template @@ -1097,7 +1507,24 @@ class DirectionsLeg_Maneuver final : std::string* _internal_mutable_verbal_post_transition_instruction(); public: + // uint32 roundabout_exit_count = 17; + bool has_roundabout_exit_count() const; + private: + bool _internal_has_roundabout_exit_count() const; + public: + void clear_roundabout_exit_count(); + uint32_t roundabout_exit_count() const; + void set_roundabout_exit_count(uint32_t value); + private: + uint32_t _internal_roundabout_exit_count() const; + void _internal_set_roundabout_exit_count(uint32_t value); + public: + // string depart_instruction = 18; + bool has_depart_instruction() const; + private: + bool _internal_has_depart_instruction() const; + public: void clear_depart_instruction(); const std::string& depart_instruction() const; template @@ -1112,6 +1539,10 @@ class DirectionsLeg_Maneuver final : public: // string verbal_depart_instruction = 19; + bool has_verbal_depart_instruction() const; + private: + bool _internal_has_verbal_depart_instruction() const; + public: void clear_verbal_depart_instruction(); const std::string& verbal_depart_instruction() const; template @@ -1126,6 +1557,10 @@ class DirectionsLeg_Maneuver final : public: // string arrive_instruction = 20; + bool has_arrive_instruction() const; + private: + bool _internal_has_arrive_instruction() const; + public: void clear_arrive_instruction(); const std::string& arrive_instruction() const; template @@ -1140,6 +1575,10 @@ class DirectionsLeg_Maneuver final : public: // string verbal_arrive_instruction = 21; + bool has_verbal_arrive_instruction() const; + private: + bool _internal_has_verbal_arrive_instruction() const; + public: void clear_verbal_arrive_instruction(); const std::string& verbal_arrive_instruction() const; template @@ -1148,170 +1587,16 @@ class DirectionsLeg_Maneuver final : PROTOBUF_NODISCARD std::string* release_verbal_arrive_instruction(); void set_allocated_verbal_arrive_instruction(std::string* verbal_arrive_instruction); private: - const std::string& _internal_verbal_arrive_instruction() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_arrive_instruction(const std::string& value); - std::string* _internal_mutable_verbal_arrive_instruction(); - public: - - // string verbal_succinct_transition_instruction = 37; - void clear_verbal_succinct_transition_instruction(); - const std::string& verbal_succinct_transition_instruction() const; - template - void set_verbal_succinct_transition_instruction(ArgT0&& arg0, ArgT... args); - std::string* mutable_verbal_succinct_transition_instruction(); - PROTOBUF_NODISCARD std::string* release_verbal_succinct_transition_instruction(); - void set_allocated_verbal_succinct_transition_instruction(std::string* verbal_succinct_transition_instruction); - private: - const std::string& _internal_verbal_succinct_transition_instruction() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_succinct_transition_instruction(const std::string& value); - std::string* _internal_mutable_verbal_succinct_transition_instruction(); - public: - - // .valhalla.TripSign sign = 16; - bool has_sign() const; - private: - bool _internal_has_sign() const; - public: - void clear_sign(); - const ::valhalla::TripSign& sign() const; - PROTOBUF_NODISCARD ::valhalla::TripSign* release_sign(); - ::valhalla::TripSign* mutable_sign(); - void set_allocated_sign(::valhalla::TripSign* sign); - private: - const ::valhalla::TripSign& _internal_sign() const; - ::valhalla::TripSign* _internal_mutable_sign(); - public: - void unsafe_arena_set_allocated_sign( - ::valhalla::TripSign* sign); - ::valhalla::TripSign* unsafe_arena_release_sign(); - - // .valhalla.TransitRouteInfo transit_info = 22; - bool has_transit_info() const; - private: - bool _internal_has_transit_info() const; - public: - void clear_transit_info(); - const ::valhalla::TransitRouteInfo& transit_info() const; - PROTOBUF_NODISCARD ::valhalla::TransitRouteInfo* release_transit_info(); - ::valhalla::TransitRouteInfo* mutable_transit_info(); - void set_allocated_transit_info(::valhalla::TransitRouteInfo* transit_info); - private: - const ::valhalla::TransitRouteInfo& _internal_transit_info() const; - ::valhalla::TransitRouteInfo* _internal_mutable_transit_info(); - public: - void unsafe_arena_set_allocated_transit_info( - ::valhalla::TransitRouteInfo* transit_info); - ::valhalla::TransitRouteInfo* unsafe_arena_release_transit_info(); - - // .valhalla.BikeShareStationInfo bss_info = 38; - bool has_bss_info() const; - private: - bool _internal_has_bss_info() const; - public: - void clear_bss_info(); - const ::valhalla::BikeShareStationInfo& bss_info() const; - PROTOBUF_NODISCARD ::valhalla::BikeShareStationInfo* release_bss_info(); - ::valhalla::BikeShareStationInfo* mutable_bss_info(); - void set_allocated_bss_info(::valhalla::BikeShareStationInfo* bss_info); - private: - const ::valhalla::BikeShareStationInfo& _internal_bss_info() const; - ::valhalla::BikeShareStationInfo* _internal_mutable_bss_info(); - public: - void unsafe_arena_set_allocated_bss_info( - ::valhalla::BikeShareStationInfo* bss_info); - ::valhalla::BikeShareStationInfo* unsafe_arena_release_bss_info(); - - // .valhalla.DirectionsLeg.Maneuver.Type type = 1; - void clear_type(); - ::valhalla::DirectionsLeg_Maneuver_Type type() const; - void set_type(::valhalla::DirectionsLeg_Maneuver_Type value); - private: - ::valhalla::DirectionsLeg_Maneuver_Type _internal_type() const; - void _internal_set_type(::valhalla::DirectionsLeg_Maneuver_Type value); - public: - - // float length = 4; - void clear_length(); - float length() const; - void set_length(float value); - private: - float _internal_length() const; - void _internal_set_length(float value); - public: - - // double time = 5; - void clear_time(); - double time() const; - void set_time(double value); - private: - double _internal_time() const; - void _internal_set_time(double value); - public: - - // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; - void clear_begin_cardinal_direction(); - ::valhalla::DirectionsLeg_Maneuver_CardinalDirection begin_cardinal_direction() const; - void set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value); - private: - ::valhalla::DirectionsLeg_Maneuver_CardinalDirection _internal_begin_cardinal_direction() const; - void _internal_set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value); - public: - - // uint32 begin_heading = 7; - void clear_begin_heading(); - uint32_t begin_heading() const; - void set_begin_heading(uint32_t value); - private: - uint32_t _internal_begin_heading() const; - void _internal_set_begin_heading(uint32_t value); - public: - - // uint32 begin_shape_index = 8; - void clear_begin_shape_index(); - uint32_t begin_shape_index() const; - void set_begin_shape_index(uint32_t value); - private: - uint32_t _internal_begin_shape_index() const; - void _internal_set_begin_shape_index(uint32_t value); - public: - - // uint32 end_shape_index = 9; - void clear_end_shape_index(); - uint32_t end_shape_index() const; - void set_end_shape_index(uint32_t value); - private: - uint32_t _internal_end_shape_index() const; - void _internal_set_end_shape_index(uint32_t value); - public: - - // uint32 roundabout_exit_count = 17; - void clear_roundabout_exit_count(); - uint32_t roundabout_exit_count() const; - void set_roundabout_exit_count(uint32_t value); - private: - uint32_t _internal_roundabout_exit_count() const; - void _internal_set_roundabout_exit_count(uint32_t value); - public: - - // bool portions_toll = 10; - void clear_portions_toll(); - bool portions_toll() const; - void set_portions_toll(bool value); - private: - bool _internal_portions_toll() const; - void _internal_set_portions_toll(bool value); + const std::string& _internal_verbal_arrive_instruction() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_arrive_instruction(const std::string& value); + std::string* _internal_mutable_verbal_arrive_instruction(); public: - // bool portions_unpaved = 11; - void clear_portions_unpaved(); - bool portions_unpaved() const; - void set_portions_unpaved(bool value); + // bool verbal_multi_cue = 23; + bool has_verbal_multi_cue() const; private: - bool _internal_portions_unpaved() const; - void _internal_set_portions_unpaved(bool value); + bool _internal_has_verbal_multi_cue() const; public: - - // bool verbal_multi_cue = 23; void clear_verbal_multi_cue(); bool verbal_multi_cue() const; void set_verbal_multi_cue(bool value); @@ -1320,16 +1605,11 @@ class DirectionsLeg_Maneuver final : void _internal_set_verbal_multi_cue(bool value); public: - // bool to_stay_on = 31; - void clear_to_stay_on(); - bool to_stay_on() const; - void set_to_stay_on(bool value); + // .valhalla.TravelMode travel_mode = 24; + bool has_travel_mode() const; private: - bool _internal_to_stay_on() const; - void _internal_set_to_stay_on(bool value); + bool _internal_has_travel_mode() const; public: - - // .valhalla.TravelMode travel_mode = 24; void clear_travel_mode(); ::valhalla::TravelMode travel_mode() const; void set_travel_mode(::valhalla::TravelMode value); @@ -1339,6 +1619,10 @@ class DirectionsLeg_Maneuver final : public: // .valhalla.VehicleType vehicle_type = 25; + bool has_vehicle_type() const; + private: + bool _internal_has_vehicle_type() const; + public: void clear_vehicle_type(); ::valhalla::VehicleType vehicle_type() const; void set_vehicle_type(::valhalla::VehicleType value); @@ -1348,6 +1632,10 @@ class DirectionsLeg_Maneuver final : public: // .valhalla.PedestrianType pedestrian_type = 26; + bool has_pedestrian_type() const; + private: + bool _internal_has_pedestrian_type() const; + public: void clear_pedestrian_type(); ::valhalla::PedestrianType pedestrian_type() const; void set_pedestrian_type(::valhalla::PedestrianType value); @@ -1357,6 +1645,10 @@ class DirectionsLeg_Maneuver final : public: // .valhalla.BicycleType bicycle_type = 27; + bool has_bicycle_type() const; + private: + bool _internal_has_bicycle_type() const; + public: void clear_bicycle_type(); ::valhalla::BicycleType bicycle_type() const; void set_bicycle_type(::valhalla::BicycleType value); @@ -1366,6 +1658,10 @@ class DirectionsLeg_Maneuver final : public: // .valhalla.TransitType transit_type = 28; + bool has_transit_type() const; + private: + bool _internal_has_transit_type() const; + public: void clear_transit_type(); ::valhalla::TransitType transit_type() const; void set_transit_type(::valhalla::TransitType value); @@ -1375,6 +1671,10 @@ class DirectionsLeg_Maneuver final : public: // uint32 begin_path_index = 29; + bool has_begin_path_index() const; + private: + bool _internal_has_begin_path_index() const; + public: void clear_begin_path_index(); uint32_t begin_path_index() const; void set_begin_path_index(uint32_t value); @@ -1384,6 +1684,10 @@ class DirectionsLeg_Maneuver final : public: // uint32 end_path_index = 30; + bool has_end_path_index() const; + private: + bool _internal_has_end_path_index() const; + public: void clear_end_path_index(); uint32_t end_path_index() const; void set_end_path_index(uint32_t value); @@ -1392,7 +1696,24 @@ class DirectionsLeg_Maneuver final : void _internal_set_end_path_index(uint32_t value); public: + // bool to_stay_on = 31; + bool has_to_stay_on() const; + private: + bool _internal_has_to_stay_on() const; + public: + void clear_to_stay_on(); + bool to_stay_on() const; + void set_to_stay_on(bool value); + private: + bool _internal_to_stay_on() const; + void _internal_set_to_stay_on(bool value); + public: + // uint32 turn_degree = 33; + bool has_turn_degree() const; + private: + bool _internal_has_turn_degree() const; + public: void clear_turn_degree(); uint32_t turn_degree() const; void set_turn_degree(uint32_t value); @@ -1401,16 +1722,11 @@ class DirectionsLeg_Maneuver final : void _internal_set_turn_degree(uint32_t value); public: - // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; - void clear_bss_maneuver_type(); - ::valhalla::DirectionsLeg_Maneuver_BssManeuverType bss_maneuver_type() const; - void set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value); + // bool has_time_restrictions = 34; + bool has_has_time_restrictions() const; private: - ::valhalla::DirectionsLeg_Maneuver_BssManeuverType _internal_bss_maneuver_type() const; - void _internal_set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value); + bool _internal_has_has_time_restrictions() const; public: - - // bool has_time_restrictions = 34; void clear_has_time_restrictions(); bool has_time_restrictions() const; void set_has_time_restrictions(bool value); @@ -1419,27 +1735,226 @@ class DirectionsLeg_Maneuver final : void _internal_set_has_time_restrictions(bool value); public: - // bool portions_highway = 39; - void clear_portions_highway(); - bool portions_highway() const; - void set_portions_highway(bool value); + // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; + bool has_bss_maneuver_type() const; + private: + bool _internal_has_bss_maneuver_type() const; + public: + void clear_bss_maneuver_type(); + ::valhalla::DirectionsLeg_Maneuver_BssManeuverType bss_maneuver_type() const; + void set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value); private: - bool _internal_portions_highway() const; - void _internal_set_portions_highway(bool value); + ::valhalla::DirectionsLeg_Maneuver_BssManeuverType _internal_bss_maneuver_type() const; + void _internal_set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value); public: - // bool portions_ferry = 40; - void clear_portions_ferry(); - bool portions_ferry() const; - void set_portions_ferry(bool value); + // string verbal_succinct_transition_instruction = 37; + bool has_verbal_succinct_transition_instruction() const; + private: + bool _internal_has_verbal_succinct_transition_instruction() const; + public: + void clear_verbal_succinct_transition_instruction(); + const std::string& verbal_succinct_transition_instruction() const; + template + void set_verbal_succinct_transition_instruction(ArgT0&& arg0, ArgT... args); + std::string* mutable_verbal_succinct_transition_instruction(); + PROTOBUF_NODISCARD std::string* release_verbal_succinct_transition_instruction(); + void set_allocated_verbal_succinct_transition_instruction(std::string* verbal_succinct_transition_instruction); private: - bool _internal_portions_ferry() const; - void _internal_set_portions_ferry(bool value); + const std::string& _internal_verbal_succinct_transition_instruction() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verbal_succinct_transition_instruction(const std::string& value); + std::string* _internal_mutable_verbal_succinct_transition_instruction(); public: + void clear_has_type(); + HasTypeCase has_type_case() const; + void clear_has_text_instruction(); + HasTextInstructionCase has_text_instruction_case() const; + void clear_has_length(); + HasLengthCase has_length_case() const; + void clear_has_time(); + HasTimeCase has_time_case() const; + void clear_has_begin_cardinal_direction(); + HasBeginCardinalDirectionCase has_begin_cardinal_direction_case() const; + void clear_has_begin_heading(); + HasBeginHeadingCase has_begin_heading_case() const; + void clear_has_begin_shape_index(); + HasBeginShapeIndexCase has_begin_shape_index_case() const; + void clear_has_end_shape_index(); + HasEndShapeIndexCase has_end_shape_index_case() const; + void clear_has_portions_toll(); + HasPortionsTollCase has_portions_toll_case() const; + void clear_has_portions_unpaved(); + HasPortionsUnpavedCase has_portions_unpaved_case() const; + void clear_has_verbal_transition_alert_instruction(); + HasVerbalTransitionAlertInstructionCase has_verbal_transition_alert_instruction_case() const; + void clear_has_verbal_pre_transition_instruction(); + HasVerbalPreTransitionInstructionCase has_verbal_pre_transition_instruction_case() const; + void clear_has_verbal_post_transition_instruction(); + HasVerbalPostTransitionInstructionCase has_verbal_post_transition_instruction_case() const; + void clear_has_roundabout_exit_count(); + HasRoundaboutExitCountCase has_roundabout_exit_count_case() const; + void clear_has_depart_instruction(); + HasDepartInstructionCase has_depart_instruction_case() const; + void clear_has_verbal_depart_instruction(); + HasVerbalDepartInstructionCase has_verbal_depart_instruction_case() const; + void clear_has_arrive_instruction(); + HasArriveInstructionCase has_arrive_instruction_case() const; + void clear_has_verbal_arrive_instruction(); + HasVerbalArriveInstructionCase has_verbal_arrive_instruction_case() const; + void clear_has_verbal_multi_cue(); + HasVerbalMultiCueCase has_verbal_multi_cue_case() const; + void clear_has_travel_mode(); + HasTravelModeCase has_travel_mode_case() const; + void clear_has_vehicle_type(); + HasVehicleTypeCase has_vehicle_type_case() const; + void clear_has_pedestrian_type(); + HasPedestrianTypeCase has_pedestrian_type_case() const; + void clear_has_bicycle_type(); + HasBicycleTypeCase has_bicycle_type_case() const; + void clear_has_transit_type(); + HasTransitTypeCase has_transit_type_case() const; + void clear_has_begin_path_index(); + HasBeginPathIndexCase has_begin_path_index_case() const; + void clear_has_end_path_index(); + HasEndPathIndexCase has_end_path_index_case() const; + void clear_has_to_stay_on(); + HasToStayOnCase has_to_stay_on_case() const; + void clear_has_turn_degree(); + HasTurnDegreeCase has_turn_degree_case() const; + void clear_has_has_time_restrictions(); + HasHasTimeRestrictionsCase has_has_time_restrictions_case() const; + void clear_has_bss_maneuver_type(); + HasBssManeuverTypeCase has_bss_maneuver_type_case() const; + void clear_has_verbal_succinct_transition_instruction(); + HasVerbalSuccinctTransitionInstructionCase has_verbal_succinct_transition_instruction_case() const; // @@protoc_insertion_point(class_scope:valhalla.DirectionsLeg.Maneuver) private: class _Internal; + void set_has_type(); + void set_has_text_instruction(); + void set_has_length(); + void set_has_time(); + void set_has_begin_cardinal_direction(); + void set_has_begin_heading(); + void set_has_begin_shape_index(); + void set_has_end_shape_index(); + void set_has_portions_toll(); + void set_has_portions_unpaved(); + void set_has_verbal_transition_alert_instruction(); + void set_has_verbal_pre_transition_instruction(); + void set_has_verbal_post_transition_instruction(); + void set_has_roundabout_exit_count(); + void set_has_depart_instruction(); + void set_has_verbal_depart_instruction(); + void set_has_arrive_instruction(); + void set_has_verbal_arrive_instruction(); + void set_has_verbal_multi_cue(); + void set_has_travel_mode(); + void set_has_vehicle_type(); + void set_has_pedestrian_type(); + void set_has_bicycle_type(); + void set_has_transit_type(); + void set_has_begin_path_index(); + void set_has_end_path_index(); + void set_has_to_stay_on(); + void set_has_turn_degree(); + void set_has_has_time_restrictions(); + void set_has_bss_maneuver_type(); + void set_has_verbal_succinct_transition_instruction(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); + + inline bool has_has_text_instruction() const; + inline void clear_has_has_text_instruction(); + + inline bool has_has_length() const; + inline void clear_has_has_length(); + + inline bool has_has_time() const; + inline void clear_has_has_time(); + + inline bool has_has_begin_cardinal_direction() const; + inline void clear_has_has_begin_cardinal_direction(); + + inline bool has_has_begin_heading() const; + inline void clear_has_has_begin_heading(); + + inline bool has_has_begin_shape_index() const; + inline void clear_has_has_begin_shape_index(); + + inline bool has_has_end_shape_index() const; + inline void clear_has_has_end_shape_index(); + + inline bool has_has_portions_toll() const; + inline void clear_has_has_portions_toll(); + + inline bool has_has_portions_unpaved() const; + inline void clear_has_has_portions_unpaved(); + + inline bool has_has_verbal_transition_alert_instruction() const; + inline void clear_has_has_verbal_transition_alert_instruction(); + + inline bool has_has_verbal_pre_transition_instruction() const; + inline void clear_has_has_verbal_pre_transition_instruction(); + + inline bool has_has_verbal_post_transition_instruction() const; + inline void clear_has_has_verbal_post_transition_instruction(); + + inline bool has_has_roundabout_exit_count() const; + inline void clear_has_has_roundabout_exit_count(); + + inline bool has_has_depart_instruction() const; + inline void clear_has_has_depart_instruction(); + + inline bool has_has_verbal_depart_instruction() const; + inline void clear_has_has_verbal_depart_instruction(); + + inline bool has_has_arrive_instruction() const; + inline void clear_has_has_arrive_instruction(); + + inline bool has_has_verbal_arrive_instruction() const; + inline void clear_has_has_verbal_arrive_instruction(); + + inline bool has_has_verbal_multi_cue() const; + inline void clear_has_has_verbal_multi_cue(); + + inline bool has_has_travel_mode() const; + inline void clear_has_has_travel_mode(); + + inline bool has_has_vehicle_type() const; + inline void clear_has_has_vehicle_type(); + + inline bool has_has_pedestrian_type() const; + inline void clear_has_has_pedestrian_type(); + + inline bool has_has_bicycle_type() const; + inline void clear_has_has_bicycle_type(); + + inline bool has_has_transit_type() const; + inline void clear_has_has_transit_type(); + + inline bool has_has_begin_path_index() const; + inline void clear_has_has_begin_path_index(); + + inline bool has_has_end_path_index() const; + inline void clear_has_has_end_path_index(); + + inline bool has_has_to_stay_on() const; + inline void clear_has_has_to_stay_on(); + + inline bool has_has_turn_degree() const; + inline void clear_has_has_turn_degree(); + + inline bool has_has_has_time_restrictions() const; + inline void clear_has_has_has_time_restrictions(); + + inline bool has_has_bss_maneuver_type() const; + inline void clear_has_has_bss_maneuver_type(); + + inline bool has_has_verbal_succinct_transition_instruction() const; + inline void clear_has_has_verbal_succinct_transition_instruction(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -1449,43 +1964,167 @@ class DirectionsLeg_Maneuver final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::StreetName > begin_street_name_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::StreetName > roundabout_exit_street_names_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::DirectionsLeg_GuidanceView > guidance_views_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_transition_alert_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_pre_transition_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_post_transition_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr depart_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_depart_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr arrive_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_arrive_instruction_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_succinct_transition_instruction_; ::valhalla::TripSign* sign_; ::valhalla::TransitRouteInfo* transit_info_; ::valhalla::BikeShareStationInfo* bss_info_; - int type_; - float length_; - double time_; - int begin_cardinal_direction_; - uint32_t begin_heading_; - uint32_t begin_shape_index_; - uint32_t end_shape_index_; - uint32_t roundabout_exit_count_; - bool portions_toll_; - bool portions_unpaved_; - bool verbal_multi_cue_; - bool to_stay_on_; - int travel_mode_; - int vehicle_type_; - int pedestrian_type_; - int bicycle_type_; - int transit_type_; - uint32_t begin_path_index_; - uint32_t end_path_index_; - uint32_t turn_degree_; - int bss_maneuver_type_; - bool has_time_restrictions_; - bool portions_highway_; - bool portions_ferry_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; + union HasTextInstructionUnion { + constexpr HasTextInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_instruction_; + } has_text_instruction_; + union HasLengthUnion { + constexpr HasLengthUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float length_; + } has_length_; + union HasTimeUnion { + constexpr HasTimeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double time_; + } has_time_; + union HasBeginCardinalDirectionUnion { + constexpr HasBeginCardinalDirectionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int begin_cardinal_direction_; + } has_begin_cardinal_direction_; + union HasBeginHeadingUnion { + constexpr HasBeginHeadingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_heading_; + } has_begin_heading_; + union HasBeginShapeIndexUnion { + constexpr HasBeginShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_shape_index_; + } has_begin_shape_index_; + union HasEndShapeIndexUnion { + constexpr HasEndShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t end_shape_index_; + } has_end_shape_index_; + union HasPortionsTollUnion { + constexpr HasPortionsTollUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool portions_toll_; + } has_portions_toll_; + union HasPortionsUnpavedUnion { + constexpr HasPortionsUnpavedUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool portions_unpaved_; + } has_portions_unpaved_; + union HasVerbalTransitionAlertInstructionUnion { + constexpr HasVerbalTransitionAlertInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_transition_alert_instruction_; + } has_verbal_transition_alert_instruction_; + union HasVerbalPreTransitionInstructionUnion { + constexpr HasVerbalPreTransitionInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_pre_transition_instruction_; + } has_verbal_pre_transition_instruction_; + union HasVerbalPostTransitionInstructionUnion { + constexpr HasVerbalPostTransitionInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_post_transition_instruction_; + } has_verbal_post_transition_instruction_; + union HasRoundaboutExitCountUnion { + constexpr HasRoundaboutExitCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t roundabout_exit_count_; + } has_roundabout_exit_count_; + union HasDepartInstructionUnion { + constexpr HasDepartInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr depart_instruction_; + } has_depart_instruction_; + union HasVerbalDepartInstructionUnion { + constexpr HasVerbalDepartInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_depart_instruction_; + } has_verbal_depart_instruction_; + union HasArriveInstructionUnion { + constexpr HasArriveInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr arrive_instruction_; + } has_arrive_instruction_; + union HasVerbalArriveInstructionUnion { + constexpr HasVerbalArriveInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_arrive_instruction_; + } has_verbal_arrive_instruction_; + union HasVerbalMultiCueUnion { + constexpr HasVerbalMultiCueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool verbal_multi_cue_; + } has_verbal_multi_cue_; + union HasTravelModeUnion { + constexpr HasTravelModeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int travel_mode_; + } has_travel_mode_; + union HasVehicleTypeUnion { + constexpr HasVehicleTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int vehicle_type_; + } has_vehicle_type_; + union HasPedestrianTypeUnion { + constexpr HasPedestrianTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int pedestrian_type_; + } has_pedestrian_type_; + union HasBicycleTypeUnion { + constexpr HasBicycleTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int bicycle_type_; + } has_bicycle_type_; + union HasTransitTypeUnion { + constexpr HasTransitTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int transit_type_; + } has_transit_type_; + union HasBeginPathIndexUnion { + constexpr HasBeginPathIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_path_index_; + } has_begin_path_index_; + union HasEndPathIndexUnion { + constexpr HasEndPathIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t end_path_index_; + } has_end_path_index_; + union HasToStayOnUnion { + constexpr HasToStayOnUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool to_stay_on_; + } has_to_stay_on_; + union HasTurnDegreeUnion { + constexpr HasTurnDegreeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t turn_degree_; + } has_turn_degree_; + union HasHasTimeRestrictionsUnion { + constexpr HasHasTimeRestrictionsUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool has_time_restrictions_; + } has_has_time_restrictions_; + union HasBssManeuverTypeUnion { + constexpr HasBssManeuverTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int bss_maneuver_type_; + } has_bss_maneuver_type_; + union HasVerbalSuccinctTransitionInstructionUnion { + constexpr HasVerbalSuccinctTransitionInstructionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verbal_succinct_transition_instruction_; + } has_verbal_succinct_transition_instruction_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[31]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_directions_2eproto; @@ -1526,6 +2165,26 @@ class DirectionsLeg final : static const DirectionsLeg& default_instance() { return *internal_default_instance(); } + enum HasTripIdCase { + kTripId = 1, + HAS_TRIP_ID_NOT_SET = 0, + }; + + enum HasLegIdCase { + kLegId = 2, + HAS_LEG_ID_NOT_SET = 0, + }; + + enum HasLegCountCase { + kLegCount = 3, + HAS_LEG_COUNT_NOT_SET = 0, + }; + + enum HasShapeCase { + kShape = 7, + HAS_SHAPE_NOT_SET = 0, + }; + static inline const DirectionsLeg* internal_default_instance() { return reinterpret_cast( &_DirectionsLeg_default_instance_); @@ -1601,11 +2260,11 @@ class DirectionsLeg final : enum : int { kLocationFieldNumber = 4, kManeuverFieldNumber = 6, - kShapeFieldNumber = 7, kSummaryFieldNumber = 5, kTripIdFieldNumber = 1, kLegIdFieldNumber = 2, kLegCountFieldNumber = 3, + kShapeFieldNumber = 7, }; // repeated .valhalla.Location location = 4; int location_size() const; @@ -1643,20 +2302,6 @@ class DirectionsLeg final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::DirectionsLeg_Maneuver >& maneuver() const; - // string shape = 7; - void clear_shape(); - const std::string& shape() const; - template - void set_shape(ArgT0&& arg0, ArgT... args); - std::string* mutable_shape(); - PROTOBUF_NODISCARD std::string* release_shape(); - void set_allocated_shape(std::string* shape); - private: - const std::string& _internal_shape() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_shape(const std::string& value); - std::string* _internal_mutable_shape(); - public: - // .valhalla.DirectionsLeg.Summary summary = 5; bool has_summary() const; private: @@ -1676,6 +2321,10 @@ class DirectionsLeg final : ::valhalla::DirectionsLeg_Summary* unsafe_arena_release_summary(); // uint64 trip_id = 1; + bool has_trip_id() const; + private: + bool _internal_has_trip_id() const; + public: void clear_trip_id(); uint64_t trip_id() const; void set_trip_id(uint64_t value); @@ -1685,6 +2334,10 @@ class DirectionsLeg final : public: // uint32 leg_id = 2; + bool has_leg_id() const; + private: + bool _internal_has_leg_id() const; + public: void clear_leg_id(); uint32_t leg_id() const; void set_leg_id(uint32_t value); @@ -1694,6 +2347,10 @@ class DirectionsLeg final : public: // uint32 leg_count = 3; + bool has_leg_count() const; + private: + bool _internal_has_leg_count() const; + public: void clear_leg_count(); uint32_t leg_count() const; void set_leg_count(uint32_t value); @@ -1702,9 +2359,51 @@ class DirectionsLeg final : void _internal_set_leg_count(uint32_t value); public: + // string shape = 7; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const std::string& shape() const; + template + void set_shape(ArgT0&& arg0, ArgT... args); + std::string* mutable_shape(); + PROTOBUF_NODISCARD std::string* release_shape(); + void set_allocated_shape(std::string* shape); + private: + const std::string& _internal_shape() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_shape(const std::string& value); + std::string* _internal_mutable_shape(); + public: + + void clear_has_trip_id(); + HasTripIdCase has_trip_id_case() const; + void clear_has_leg_id(); + HasLegIdCase has_leg_id_case() const; + void clear_has_leg_count(); + HasLegCountCase has_leg_count_case() const; + void clear_has_shape(); + HasShapeCase has_shape_case() const; // @@protoc_insertion_point(class_scope:valhalla.DirectionsLeg) private: class _Internal; + void set_has_trip_id(); + void set_has_leg_id(); + void set_has_leg_count(); + void set_has_shape(); + + inline bool has_has_trip_id() const; + inline void clear_has_has_trip_id(); + + inline bool has_has_leg_id() const; + inline void clear_has_has_leg_id(); + + inline bool has_has_leg_count() const; + inline void clear_has_has_leg_count(); + + inline bool has_has_shape() const; + inline void clear_has_has_shape(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -1712,12 +2411,30 @@ class DirectionsLeg final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location > location_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::DirectionsLeg_Maneuver > maneuver_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr shape_; ::valhalla::DirectionsLeg_Summary* summary_; - uint64_t trip_id_; - uint32_t leg_id_; - uint32_t leg_count_; + union HasTripIdUnion { + constexpr HasTripIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t trip_id_; + } has_trip_id_; + union HasLegIdUnion { + constexpr HasLegIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t leg_id_; + } has_leg_id_; + union HasLegCountUnion { + constexpr HasLegCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t leg_count_; + } has_leg_count_; + union HasShapeUnion { + constexpr HasShapeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr shape_; + } has_shape_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[4]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_directions_2eproto; @@ -2012,40 +2729,76 @@ class Directions final : // DirectionsLeg_Summary // float length = 1; +inline bool DirectionsLeg_Summary::_internal_has_length() const { + return has_length_case() == kLength; +} +inline bool DirectionsLeg_Summary::has_length() const { + return _internal_has_length(); +} +inline void DirectionsLeg_Summary::set_has_length() { + _impl_._oneof_case_[0] = kLength; +} inline void DirectionsLeg_Summary::clear_length() { - _impl_.length_ = 0; + if (_internal_has_length()) { + _impl_.has_length_.length_ = 0; + clear_has_has_length(); + } } inline float DirectionsLeg_Summary::_internal_length() const { - return _impl_.length_; + if (_internal_has_length()) { + return _impl_.has_length_.length_; + } + return 0; +} +inline void DirectionsLeg_Summary::_internal_set_length(float value) { + if (!_internal_has_length()) { + clear_has_length(); + set_has_length(); + } + _impl_.has_length_.length_ = value; } inline float DirectionsLeg_Summary::length() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.length) return _internal_length(); } -inline void DirectionsLeg_Summary::_internal_set_length(float value) { - - _impl_.length_ = value; -} inline void DirectionsLeg_Summary::set_length(float value) { _internal_set_length(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.length) } // double time = 2; +inline bool DirectionsLeg_Summary::_internal_has_time() const { + return has_time_case() == kTime; +} +inline bool DirectionsLeg_Summary::has_time() const { + return _internal_has_time(); +} +inline void DirectionsLeg_Summary::set_has_time() { + _impl_._oneof_case_[1] = kTime; +} inline void DirectionsLeg_Summary::clear_time() { - _impl_.time_ = 0; + if (_internal_has_time()) { + _impl_.has_time_.time_ = 0; + clear_has_has_time(); + } } inline double DirectionsLeg_Summary::_internal_time() const { - return _impl_.time_; + if (_internal_has_time()) { + return _impl_.has_time_.time_; + } + return 0; +} +inline void DirectionsLeg_Summary::_internal_set_time(double value) { + if (!_internal_has_time()) { + clear_has_time(); + set_has_time(); + } + _impl_.has_time_.time_ = value; } inline double DirectionsLeg_Summary::time() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.time) return _internal_time(); } -inline void DirectionsLeg_Summary::_internal_set_time(double value) { - - _impl_.time_ = value; -} inline void DirectionsLeg_Summary::set_time(double value) { _internal_set_time(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.time) @@ -2137,102 +2890,102 @@ inline void DirectionsLeg_Summary::set_allocated_bbox(::valhalla::BoundingBox* b } // bool has_time_restrictions = 4; +inline bool DirectionsLeg_Summary::_internal_has_has_time_restrictions() const { + return has_has_time_restrictions_case() == kHasTimeRestrictions; +} +inline bool DirectionsLeg_Summary::has_has_time_restrictions() const { + return _internal_has_has_time_restrictions(); +} +inline void DirectionsLeg_Summary::set_has_has_time_restrictions() { + _impl_._oneof_case_[2] = kHasTimeRestrictions; +} inline void DirectionsLeg_Summary::clear_has_time_restrictions() { - _impl_.has_time_restrictions_ = false; + if (_internal_has_has_time_restrictions()) { + _impl_.has_has_time_restrictions_.has_time_restrictions_ = false; + clear_has_has_has_time_restrictions(); + } } inline bool DirectionsLeg_Summary::_internal_has_time_restrictions() const { - return _impl_.has_time_restrictions_; + if (_internal_has_has_time_restrictions()) { + return _impl_.has_has_time_restrictions_.has_time_restrictions_; + } + return false; +} +inline void DirectionsLeg_Summary::_internal_set_has_time_restrictions(bool value) { + if (!_internal_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + set_has_has_time_restrictions(); + } + _impl_.has_has_time_restrictions_.has_time_restrictions_ = value; } inline bool DirectionsLeg_Summary::has_time_restrictions() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.has_time_restrictions) return _internal_has_time_restrictions(); } -inline void DirectionsLeg_Summary::_internal_set_has_time_restrictions(bool value) { - - _impl_.has_time_restrictions_ = value; -} inline void DirectionsLeg_Summary::set_has_time_restrictions(bool value) { _internal_set_has_time_restrictions(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.has_time_restrictions) } -// bool has_toll = 5; -inline void DirectionsLeg_Summary::clear_has_toll() { - _impl_.has_toll_ = false; -} -inline bool DirectionsLeg_Summary::_internal_has_toll() const { - return _impl_.has_toll_; -} -inline bool DirectionsLeg_Summary::has_toll() const { - // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.has_toll) - return _internal_has_toll(); -} -inline void DirectionsLeg_Summary::_internal_set_has_toll(bool value) { - - _impl_.has_toll_ = value; -} -inline void DirectionsLeg_Summary::set_has_toll(bool value) { - _internal_set_has_toll(value); - // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.has_toll) -} - -// bool has_ferry = 6; -inline void DirectionsLeg_Summary::clear_has_ferry() { - _impl_.has_ferry_ = false; -} -inline bool DirectionsLeg_Summary::_internal_has_ferry() const { - return _impl_.has_ferry_; +inline bool DirectionsLeg_Summary::has_has_length() const { + return has_length_case() != HAS_LENGTH_NOT_SET; } -inline bool DirectionsLeg_Summary::has_ferry() const { - // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.has_ferry) - return _internal_has_ferry(); +inline void DirectionsLeg_Summary::clear_has_has_length() { + _impl_._oneof_case_[0] = HAS_LENGTH_NOT_SET; } -inline void DirectionsLeg_Summary::_internal_set_has_ferry(bool value) { - - _impl_.has_ferry_ = value; +inline bool DirectionsLeg_Summary::has_has_time() const { + return has_time_case() != HAS_TIME_NOT_SET; } -inline void DirectionsLeg_Summary::set_has_ferry(bool value) { - _internal_set_has_ferry(value); - // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.has_ferry) +inline void DirectionsLeg_Summary::clear_has_has_time() { + _impl_._oneof_case_[1] = HAS_TIME_NOT_SET; } - -// bool has_highway = 7; -inline void DirectionsLeg_Summary::clear_has_highway() { - _impl_.has_highway_ = false; +inline bool DirectionsLeg_Summary::has_has_has_time_restrictions() const { + return has_has_time_restrictions_case() != HAS_HAS_TIME_RESTRICTIONS_NOT_SET; } -inline bool DirectionsLeg_Summary::_internal_has_highway() const { - return _impl_.has_highway_; +inline void DirectionsLeg_Summary::clear_has_has_has_time_restrictions() { + _impl_._oneof_case_[2] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; } -inline bool DirectionsLeg_Summary::has_highway() const { - // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Summary.has_highway) - return _internal_has_highway(); +inline DirectionsLeg_Summary::HasLengthCase DirectionsLeg_Summary::has_length_case() const { + return DirectionsLeg_Summary::HasLengthCase(_impl_._oneof_case_[0]); } -inline void DirectionsLeg_Summary::_internal_set_has_highway(bool value) { - - _impl_.has_highway_ = value; +inline DirectionsLeg_Summary::HasTimeCase DirectionsLeg_Summary::has_time_case() const { + return DirectionsLeg_Summary::HasTimeCase(_impl_._oneof_case_[1]); } -inline void DirectionsLeg_Summary::set_has_highway(bool value) { - _internal_set_has_highway(value); - // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Summary.has_highway) +inline DirectionsLeg_Summary::HasHasTimeRestrictionsCase DirectionsLeg_Summary::has_has_time_restrictions_case() const { + return DirectionsLeg_Summary::HasHasTimeRestrictionsCase(_impl_._oneof_case_[2]); } - // ------------------------------------------------------------------- // DirectionsLeg_GuidanceView // string data_id = 1; +inline bool DirectionsLeg_GuidanceView::_internal_has_data_id() const { + return has_data_id_case() == kDataId; +} +inline bool DirectionsLeg_GuidanceView::has_data_id() const { + return _internal_has_data_id(); +} +inline void DirectionsLeg_GuidanceView::set_has_data_id() { + _impl_._oneof_case_[0] = kDataId; +} inline void DirectionsLeg_GuidanceView::clear_data_id() { - _impl_.data_id_.ClearToEmpty(); + if (_internal_has_data_id()) { + _impl_.has_data_id_.data_id_.Destroy(); + clear_has_has_data_id(); + } } inline const std::string& DirectionsLeg_GuidanceView::data_id() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.GuidanceView.data_id) return _internal_data_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_GuidanceView::set_data_id(ArgT0&& arg0, ArgT... args) { - - _impl_.data_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_GuidanceView::set_data_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_data_id()) { + clear_has_data_id(); + set_has_data_id(); + _impl_.has_data_id_.data_id_.InitDefault(); + } + _impl_.has_data_id_.data_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.GuidanceView.data_id) } inline std::string* DirectionsLeg_GuidanceView::mutable_data_id() { @@ -2241,49 +2994,79 @@ inline std::string* DirectionsLeg_GuidanceView::mutable_data_id() { return _s; } inline const std::string& DirectionsLeg_GuidanceView::_internal_data_id() const { - return _impl_.data_id_.Get(); + if (_internal_has_data_id()) { + return _impl_.has_data_id_.data_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_GuidanceView::_internal_set_data_id(const std::string& value) { - - _impl_.data_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_data_id()) { + clear_has_data_id(); + set_has_data_id(); + _impl_.has_data_id_.data_id_.InitDefault(); + } + _impl_.has_data_id_.data_id_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_GuidanceView::_internal_mutable_data_id() { - - return _impl_.data_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_data_id()) { + clear_has_data_id(); + set_has_data_id(); + _impl_.has_data_id_.data_id_.InitDefault(); + } + return _impl_.has_data_id_.data_id_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_GuidanceView::release_data_id() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.GuidanceView.data_id) - return _impl_.data_id_.Release(); + if (_internal_has_data_id()) { + clear_has_has_data_id(); + return _impl_.has_data_id_.data_id_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_GuidanceView::set_allocated_data_id(std::string* data_id) { - if (data_id != nullptr) { - - } else { - + if (has_has_data_id()) { + clear_has_data_id(); } - _impl_.data_id_.SetAllocated(data_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.data_id_.IsDefault()) { - _impl_.data_id_.Set("", GetArenaForAllocation()); + if (data_id != nullptr) { + set_has_data_id(); + _impl_.has_data_id_.data_id_.InitAllocated(data_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.GuidanceView.data_id) } // .valhalla.DirectionsLeg.GuidanceView.Type type = 2; +inline bool DirectionsLeg_GuidanceView::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool DirectionsLeg_GuidanceView::has_type() const { + return _internal_has_type(); +} +inline void DirectionsLeg_GuidanceView::set_has_type() { + _impl_._oneof_case_[1] = kType; +} inline void DirectionsLeg_GuidanceView::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::DirectionsLeg_GuidanceView_Type DirectionsLeg_GuidanceView::_internal_type() const { - return static_cast< ::valhalla::DirectionsLeg_GuidanceView_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::DirectionsLeg_GuidanceView_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::DirectionsLeg_GuidanceView_Type >(0); } inline ::valhalla::DirectionsLeg_GuidanceView_Type DirectionsLeg_GuidanceView::type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.GuidanceView.type) return _internal_type(); } inline void DirectionsLeg_GuidanceView::_internal_set_type(::valhalla::DirectionsLeg_GuidanceView_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void DirectionsLeg_GuidanceView::set_type(::valhalla::DirectionsLeg_GuidanceView_Type value) { _internal_set_type(value); @@ -2291,18 +3074,33 @@ inline void DirectionsLeg_GuidanceView::set_type(::valhalla::DirectionsLeg_Guida } // string base_id = 3; +inline bool DirectionsLeg_GuidanceView::_internal_has_base_id() const { + return has_base_id_case() == kBaseId; +} +inline bool DirectionsLeg_GuidanceView::has_base_id() const { + return _internal_has_base_id(); +} +inline void DirectionsLeg_GuidanceView::set_has_base_id() { + _impl_._oneof_case_[2] = kBaseId; +} inline void DirectionsLeg_GuidanceView::clear_base_id() { - _impl_.base_id_.ClearToEmpty(); + if (_internal_has_base_id()) { + _impl_.has_base_id_.base_id_.Destroy(); + clear_has_has_base_id(); + } } inline const std::string& DirectionsLeg_GuidanceView::base_id() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.GuidanceView.base_id) return _internal_base_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_GuidanceView::set_base_id(ArgT0&& arg0, ArgT... args) { - - _impl_.base_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_GuidanceView::set_base_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_base_id()) { + clear_has_base_id(); + set_has_base_id(); + _impl_.has_base_id_.base_id_.InitDefault(); + } + _impl_.has_base_id_.base_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.GuidanceView.base_id) } inline std::string* DirectionsLeg_GuidanceView::mutable_base_id() { @@ -2311,32 +3109,44 @@ inline std::string* DirectionsLeg_GuidanceView::mutable_base_id() { return _s; } inline const std::string& DirectionsLeg_GuidanceView::_internal_base_id() const { - return _impl_.base_id_.Get(); + if (_internal_has_base_id()) { + return _impl_.has_base_id_.base_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_GuidanceView::_internal_set_base_id(const std::string& value) { - - _impl_.base_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_base_id()) { + clear_has_base_id(); + set_has_base_id(); + _impl_.has_base_id_.base_id_.InitDefault(); + } + _impl_.has_base_id_.base_id_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_GuidanceView::_internal_mutable_base_id() { - - return _impl_.base_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_base_id()) { + clear_has_base_id(); + set_has_base_id(); + _impl_.has_base_id_.base_id_.InitDefault(); + } + return _impl_.has_base_id_.base_id_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_GuidanceView::release_base_id() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.GuidanceView.base_id) - return _impl_.base_id_.Release(); + if (_internal_has_base_id()) { + clear_has_has_base_id(); + return _impl_.has_base_id_.base_id_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_GuidanceView::set_allocated_base_id(std::string* base_id) { - if (base_id != nullptr) { - - } else { - + if (has_has_base_id()) { + clear_has_base_id(); } - _impl_.base_id_.SetAllocated(base_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.base_id_.IsDefault()) { - _impl_.base_id_.Set("", GetArenaForAllocation()); + if (base_id != nullptr) { + set_has_base_id(); + _impl_.has_base_id_.base_id_.InitAllocated(base_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.GuidanceView.base_id) } @@ -2415,24 +3225,69 @@ DirectionsLeg_GuidanceView::mutable_overlay_ids() { return &_impl_.overlay_ids_; } +inline bool DirectionsLeg_GuidanceView::has_has_data_id() const { + return has_data_id_case() != HAS_DATA_ID_NOT_SET; +} +inline void DirectionsLeg_GuidanceView::clear_has_has_data_id() { + _impl_._oneof_case_[0] = HAS_DATA_ID_NOT_SET; +} +inline bool DirectionsLeg_GuidanceView::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void DirectionsLeg_GuidanceView::clear_has_has_type() { + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} +inline bool DirectionsLeg_GuidanceView::has_has_base_id() const { + return has_base_id_case() != HAS_BASE_ID_NOT_SET; +} +inline void DirectionsLeg_GuidanceView::clear_has_has_base_id() { + _impl_._oneof_case_[2] = HAS_BASE_ID_NOT_SET; +} +inline DirectionsLeg_GuidanceView::HasDataIdCase DirectionsLeg_GuidanceView::has_data_id_case() const { + return DirectionsLeg_GuidanceView::HasDataIdCase(_impl_._oneof_case_[0]); +} +inline DirectionsLeg_GuidanceView::HasTypeCase DirectionsLeg_GuidanceView::has_type_case() const { + return DirectionsLeg_GuidanceView::HasTypeCase(_impl_._oneof_case_[1]); +} +inline DirectionsLeg_GuidanceView::HasBaseIdCase DirectionsLeg_GuidanceView::has_base_id_case() const { + return DirectionsLeg_GuidanceView::HasBaseIdCase(_impl_._oneof_case_[2]); +} // ------------------------------------------------------------------- // DirectionsLeg_Maneuver // .valhalla.DirectionsLeg.Maneuver.Type type = 1; +inline bool DirectionsLeg_Maneuver::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool DirectionsLeg_Maneuver::has_type() const { + return _internal_has_type(); +} +inline void DirectionsLeg_Maneuver::set_has_type() { + _impl_._oneof_case_[0] = kType; +} inline void DirectionsLeg_Maneuver::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::_internal_type() const { - return static_cast< ::valhalla::DirectionsLeg_Maneuver_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::DirectionsLeg_Maneuver_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::DirectionsLeg_Maneuver_Type >(0); } inline ::valhalla::DirectionsLeg_Maneuver_Type DirectionsLeg_Maneuver::type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.type) return _internal_type(); } inline void DirectionsLeg_Maneuver::_internal_set_type(::valhalla::DirectionsLeg_Maneuver_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void DirectionsLeg_Maneuver::set_type(::valhalla::DirectionsLeg_Maneuver_Type value) { _internal_set_type(value); @@ -2440,18 +3295,33 @@ inline void DirectionsLeg_Maneuver::set_type(::valhalla::DirectionsLeg_Maneuver_ } // string text_instruction = 2; +inline bool DirectionsLeg_Maneuver::_internal_has_text_instruction() const { + return has_text_instruction_case() == kTextInstruction; +} +inline bool DirectionsLeg_Maneuver::has_text_instruction() const { + return _internal_has_text_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_text_instruction() { + _impl_._oneof_case_[1] = kTextInstruction; +} inline void DirectionsLeg_Maneuver::clear_text_instruction() { - _impl_.text_instruction_.ClearToEmpty(); + if (_internal_has_text_instruction()) { + _impl_.has_text_instruction_.text_instruction_.Destroy(); + clear_has_has_text_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::text_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.text_instruction) return _internal_text_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_text_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.text_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_text_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_text_instruction()) { + clear_has_text_instruction(); + set_has_text_instruction(); + _impl_.has_text_instruction_.text_instruction_.InitDefault(); + } + _impl_.has_text_instruction_.text_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.text_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_text_instruction() { @@ -2460,32 +3330,44 @@ inline std::string* DirectionsLeg_Maneuver::mutable_text_instruction() { return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_text_instruction() const { - return _impl_.text_instruction_.Get(); + if (_internal_has_text_instruction()) { + return _impl_.has_text_instruction_.text_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_text_instruction(const std::string& value) { - - _impl_.text_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_text_instruction()) { + clear_has_text_instruction(); + set_has_text_instruction(); + _impl_.has_text_instruction_.text_instruction_.InitDefault(); + } + _impl_.has_text_instruction_.text_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_text_instruction() { - - return _impl_.text_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_text_instruction()) { + clear_has_text_instruction(); + set_has_text_instruction(); + _impl_.has_text_instruction_.text_instruction_.InitDefault(); + } + return _impl_.has_text_instruction_.text_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_text_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.text_instruction) - return _impl_.text_instruction_.Release(); + if (_internal_has_text_instruction()) { + clear_has_has_text_instruction(); + return _impl_.has_text_instruction_.text_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_text_instruction(std::string* text_instruction) { - if (text_instruction != nullptr) { - - } else { - + if (has_has_text_instruction()) { + clear_has_text_instruction(); } - _impl_.text_instruction_.SetAllocated(text_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.text_instruction_.IsDefault()) { - _impl_.text_instruction_.Set("", GetArenaForAllocation()); + if (text_instruction != nullptr) { + set_has_text_instruction(); + _impl_.has_text_instruction_.text_instruction_.InitAllocated(text_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.text_instruction) } @@ -2527,59 +3409,113 @@ DirectionsLeg_Maneuver::street_name() const { } // float length = 4; +inline bool DirectionsLeg_Maneuver::_internal_has_length() const { + return has_length_case() == kLength; +} +inline bool DirectionsLeg_Maneuver::has_length() const { + return _internal_has_length(); +} +inline void DirectionsLeg_Maneuver::set_has_length() { + _impl_._oneof_case_[2] = kLength; +} inline void DirectionsLeg_Maneuver::clear_length() { - _impl_.length_ = 0; + if (_internal_has_length()) { + _impl_.has_length_.length_ = 0; + clear_has_has_length(); + } } inline float DirectionsLeg_Maneuver::_internal_length() const { - return _impl_.length_; + if (_internal_has_length()) { + return _impl_.has_length_.length_; + } + return 0; +} +inline void DirectionsLeg_Maneuver::_internal_set_length(float value) { + if (!_internal_has_length()) { + clear_has_length(); + set_has_length(); + } + _impl_.has_length_.length_ = value; } inline float DirectionsLeg_Maneuver::length() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.length) return _internal_length(); } -inline void DirectionsLeg_Maneuver::_internal_set_length(float value) { - - _impl_.length_ = value; -} inline void DirectionsLeg_Maneuver::set_length(float value) { _internal_set_length(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.length) } // double time = 5; +inline bool DirectionsLeg_Maneuver::_internal_has_time() const { + return has_time_case() == kTime; +} +inline bool DirectionsLeg_Maneuver::has_time() const { + return _internal_has_time(); +} +inline void DirectionsLeg_Maneuver::set_has_time() { + _impl_._oneof_case_[3] = kTime; +} inline void DirectionsLeg_Maneuver::clear_time() { - _impl_.time_ = 0; + if (_internal_has_time()) { + _impl_.has_time_.time_ = 0; + clear_has_has_time(); + } } inline double DirectionsLeg_Maneuver::_internal_time() const { - return _impl_.time_; + if (_internal_has_time()) { + return _impl_.has_time_.time_; + } + return 0; +} +inline void DirectionsLeg_Maneuver::_internal_set_time(double value) { + if (!_internal_has_time()) { + clear_has_time(); + set_has_time(); + } + _impl_.has_time_.time_ = value; } inline double DirectionsLeg_Maneuver::time() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.time) return _internal_time(); } -inline void DirectionsLeg_Maneuver::_internal_set_time(double value) { - - _impl_.time_ = value; -} inline void DirectionsLeg_Maneuver::set_time(double value) { _internal_set_time(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.time) } // .valhalla.DirectionsLeg.Maneuver.CardinalDirection begin_cardinal_direction = 6; +inline bool DirectionsLeg_Maneuver::_internal_has_begin_cardinal_direction() const { + return has_begin_cardinal_direction_case() == kBeginCardinalDirection; +} +inline bool DirectionsLeg_Maneuver::has_begin_cardinal_direction() const { + return _internal_has_begin_cardinal_direction(); +} +inline void DirectionsLeg_Maneuver::set_has_begin_cardinal_direction() { + _impl_._oneof_case_[4] = kBeginCardinalDirection; +} inline void DirectionsLeg_Maneuver::clear_begin_cardinal_direction() { - _impl_.begin_cardinal_direction_ = 0; + if (_internal_has_begin_cardinal_direction()) { + _impl_.has_begin_cardinal_direction_.begin_cardinal_direction_ = 0; + clear_has_has_begin_cardinal_direction(); + } } inline ::valhalla::DirectionsLeg_Maneuver_CardinalDirection DirectionsLeg_Maneuver::_internal_begin_cardinal_direction() const { - return static_cast< ::valhalla::DirectionsLeg_Maneuver_CardinalDirection >(_impl_.begin_cardinal_direction_); + if (_internal_has_begin_cardinal_direction()) { + return static_cast< ::valhalla::DirectionsLeg_Maneuver_CardinalDirection >(_impl_.has_begin_cardinal_direction_.begin_cardinal_direction_); + } + return static_cast< ::valhalla::DirectionsLeg_Maneuver_CardinalDirection >(0); } inline ::valhalla::DirectionsLeg_Maneuver_CardinalDirection DirectionsLeg_Maneuver::begin_cardinal_direction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.begin_cardinal_direction) return _internal_begin_cardinal_direction(); } inline void DirectionsLeg_Maneuver::_internal_set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value) { - - _impl_.begin_cardinal_direction_ = value; + if (!_internal_has_begin_cardinal_direction()) { + clear_has_begin_cardinal_direction(); + set_has_begin_cardinal_direction(); + } + _impl_.has_begin_cardinal_direction_.begin_cardinal_direction_ = value; } inline void DirectionsLeg_Maneuver::set_begin_cardinal_direction(::valhalla::DirectionsLeg_Maneuver_CardinalDirection value) { _internal_set_begin_cardinal_direction(value); @@ -2587,118 +3523,223 @@ inline void DirectionsLeg_Maneuver::set_begin_cardinal_direction(::valhalla::Dir } // uint32 begin_heading = 7; +inline bool DirectionsLeg_Maneuver::_internal_has_begin_heading() const { + return has_begin_heading_case() == kBeginHeading; +} +inline bool DirectionsLeg_Maneuver::has_begin_heading() const { + return _internal_has_begin_heading(); +} +inline void DirectionsLeg_Maneuver::set_has_begin_heading() { + _impl_._oneof_case_[5] = kBeginHeading; +} inline void DirectionsLeg_Maneuver::clear_begin_heading() { - _impl_.begin_heading_ = 0u; + if (_internal_has_begin_heading()) { + _impl_.has_begin_heading_.begin_heading_ = 0u; + clear_has_has_begin_heading(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_begin_heading() const { - return _impl_.begin_heading_; + if (_internal_has_begin_heading()) { + return _impl_.has_begin_heading_.begin_heading_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_begin_heading(uint32_t value) { + if (!_internal_has_begin_heading()) { + clear_has_begin_heading(); + set_has_begin_heading(); + } + _impl_.has_begin_heading_.begin_heading_ = value; } inline uint32_t DirectionsLeg_Maneuver::begin_heading() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.begin_heading) return _internal_begin_heading(); } -inline void DirectionsLeg_Maneuver::_internal_set_begin_heading(uint32_t value) { - - _impl_.begin_heading_ = value; -} inline void DirectionsLeg_Maneuver::set_begin_heading(uint32_t value) { _internal_set_begin_heading(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.begin_heading) } // uint32 begin_shape_index = 8; +inline bool DirectionsLeg_Maneuver::_internal_has_begin_shape_index() const { + return has_begin_shape_index_case() == kBeginShapeIndex; +} +inline bool DirectionsLeg_Maneuver::has_begin_shape_index() const { + return _internal_has_begin_shape_index(); +} +inline void DirectionsLeg_Maneuver::set_has_begin_shape_index() { + _impl_._oneof_case_[6] = kBeginShapeIndex; +} inline void DirectionsLeg_Maneuver::clear_begin_shape_index() { - _impl_.begin_shape_index_ = 0u; + if (_internal_has_begin_shape_index()) { + _impl_.has_begin_shape_index_.begin_shape_index_ = 0u; + clear_has_has_begin_shape_index(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_begin_shape_index() const { - return _impl_.begin_shape_index_; + if (_internal_has_begin_shape_index()) { + return _impl_.has_begin_shape_index_.begin_shape_index_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_begin_shape_index(uint32_t value) { + if (!_internal_has_begin_shape_index()) { + clear_has_begin_shape_index(); + set_has_begin_shape_index(); + } + _impl_.has_begin_shape_index_.begin_shape_index_ = value; } inline uint32_t DirectionsLeg_Maneuver::begin_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.begin_shape_index) return _internal_begin_shape_index(); } -inline void DirectionsLeg_Maneuver::_internal_set_begin_shape_index(uint32_t value) { - - _impl_.begin_shape_index_ = value; -} inline void DirectionsLeg_Maneuver::set_begin_shape_index(uint32_t value) { _internal_set_begin_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.begin_shape_index) } // uint32 end_shape_index = 9; +inline bool DirectionsLeg_Maneuver::_internal_has_end_shape_index() const { + return has_end_shape_index_case() == kEndShapeIndex; +} +inline bool DirectionsLeg_Maneuver::has_end_shape_index() const { + return _internal_has_end_shape_index(); +} +inline void DirectionsLeg_Maneuver::set_has_end_shape_index() { + _impl_._oneof_case_[7] = kEndShapeIndex; +} inline void DirectionsLeg_Maneuver::clear_end_shape_index() { - _impl_.end_shape_index_ = 0u; + if (_internal_has_end_shape_index()) { + _impl_.has_end_shape_index_.end_shape_index_ = 0u; + clear_has_has_end_shape_index(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_end_shape_index() const { - return _impl_.end_shape_index_; + if (_internal_has_end_shape_index()) { + return _impl_.has_end_shape_index_.end_shape_index_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_end_shape_index(uint32_t value) { + if (!_internal_has_end_shape_index()) { + clear_has_end_shape_index(); + set_has_end_shape_index(); + } + _impl_.has_end_shape_index_.end_shape_index_ = value; } inline uint32_t DirectionsLeg_Maneuver::end_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.end_shape_index) return _internal_end_shape_index(); } -inline void DirectionsLeg_Maneuver::_internal_set_end_shape_index(uint32_t value) { - - _impl_.end_shape_index_ = value; -} inline void DirectionsLeg_Maneuver::set_end_shape_index(uint32_t value) { _internal_set_end_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.end_shape_index) } // bool portions_toll = 10; +inline bool DirectionsLeg_Maneuver::_internal_has_portions_toll() const { + return has_portions_toll_case() == kPortionsToll; +} +inline bool DirectionsLeg_Maneuver::has_portions_toll() const { + return _internal_has_portions_toll(); +} +inline void DirectionsLeg_Maneuver::set_has_portions_toll() { + _impl_._oneof_case_[8] = kPortionsToll; +} inline void DirectionsLeg_Maneuver::clear_portions_toll() { - _impl_.portions_toll_ = false; + if (_internal_has_portions_toll()) { + _impl_.has_portions_toll_.portions_toll_ = false; + clear_has_has_portions_toll(); + } } inline bool DirectionsLeg_Maneuver::_internal_portions_toll() const { - return _impl_.portions_toll_; + if (_internal_has_portions_toll()) { + return _impl_.has_portions_toll_.portions_toll_; + } + return false; +} +inline void DirectionsLeg_Maneuver::_internal_set_portions_toll(bool value) { + if (!_internal_has_portions_toll()) { + clear_has_portions_toll(); + set_has_portions_toll(); + } + _impl_.has_portions_toll_.portions_toll_ = value; } inline bool DirectionsLeg_Maneuver::portions_toll() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.portions_toll) return _internal_portions_toll(); } -inline void DirectionsLeg_Maneuver::_internal_set_portions_toll(bool value) { - - _impl_.portions_toll_ = value; -} inline void DirectionsLeg_Maneuver::set_portions_toll(bool value) { _internal_set_portions_toll(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.portions_toll) } // bool portions_unpaved = 11; +inline bool DirectionsLeg_Maneuver::_internal_has_portions_unpaved() const { + return has_portions_unpaved_case() == kPortionsUnpaved; +} +inline bool DirectionsLeg_Maneuver::has_portions_unpaved() const { + return _internal_has_portions_unpaved(); +} +inline void DirectionsLeg_Maneuver::set_has_portions_unpaved() { + _impl_._oneof_case_[9] = kPortionsUnpaved; +} inline void DirectionsLeg_Maneuver::clear_portions_unpaved() { - _impl_.portions_unpaved_ = false; + if (_internal_has_portions_unpaved()) { + _impl_.has_portions_unpaved_.portions_unpaved_ = false; + clear_has_has_portions_unpaved(); + } } inline bool DirectionsLeg_Maneuver::_internal_portions_unpaved() const { - return _impl_.portions_unpaved_; + if (_internal_has_portions_unpaved()) { + return _impl_.has_portions_unpaved_.portions_unpaved_; + } + return false; +} +inline void DirectionsLeg_Maneuver::_internal_set_portions_unpaved(bool value) { + if (!_internal_has_portions_unpaved()) { + clear_has_portions_unpaved(); + set_has_portions_unpaved(); + } + _impl_.has_portions_unpaved_.portions_unpaved_ = value; } inline bool DirectionsLeg_Maneuver::portions_unpaved() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.portions_unpaved) return _internal_portions_unpaved(); } -inline void DirectionsLeg_Maneuver::_internal_set_portions_unpaved(bool value) { - - _impl_.portions_unpaved_ = value; -} inline void DirectionsLeg_Maneuver::set_portions_unpaved(bool value) { _internal_set_portions_unpaved(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.portions_unpaved) } // string verbal_transition_alert_instruction = 12; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_transition_alert_instruction() const { + return has_verbal_transition_alert_instruction_case() == kVerbalTransitionAlertInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_transition_alert_instruction() const { + return _internal_has_verbal_transition_alert_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_transition_alert_instruction() { + _impl_._oneof_case_[10] = kVerbalTransitionAlertInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_transition_alert_instruction() { - _impl_.verbal_transition_alert_instruction_.ClearToEmpty(); + if (_internal_has_verbal_transition_alert_instruction()) { + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Destroy(); + clear_has_has_verbal_transition_alert_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_transition_alert_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_transition_alert_instruction) return _internal_verbal_transition_alert_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_transition_alert_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_transition_alert_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_transition_alert_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_transition_alert_instruction()) { + clear_has_verbal_transition_alert_instruction(); + set_has_verbal_transition_alert_instruction(); + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.InitDefault(); + } + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_transition_alert_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_transition_alert_instruction() { @@ -2707,48 +3748,75 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_transition_alert_inst return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_transition_alert_instruction() const { - return _impl_.verbal_transition_alert_instruction_.Get(); + if (_internal_has_verbal_transition_alert_instruction()) { + return _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_transition_alert_instruction(const std::string& value) { - - _impl_.verbal_transition_alert_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_transition_alert_instruction()) { + clear_has_verbal_transition_alert_instruction(); + set_has_verbal_transition_alert_instruction(); + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.InitDefault(); + } + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_transition_alert_instruction() { - - return _impl_.verbal_transition_alert_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_transition_alert_instruction()) { + clear_has_verbal_transition_alert_instruction(); + set_has_verbal_transition_alert_instruction(); + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.InitDefault(); + } + return _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_transition_alert_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_transition_alert_instruction) - return _impl_.verbal_transition_alert_instruction_.Release(); + if (_internal_has_verbal_transition_alert_instruction()) { + clear_has_has_verbal_transition_alert_instruction(); + return _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_transition_alert_instruction(std::string* verbal_transition_alert_instruction) { - if (verbal_transition_alert_instruction != nullptr) { - - } else { - + if (has_has_verbal_transition_alert_instruction()) { + clear_has_verbal_transition_alert_instruction(); } - _impl_.verbal_transition_alert_instruction_.SetAllocated(verbal_transition_alert_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_transition_alert_instruction_.IsDefault()) { - _impl_.verbal_transition_alert_instruction_.Set("", GetArenaForAllocation()); + if (verbal_transition_alert_instruction != nullptr) { + set_has_verbal_transition_alert_instruction(); + _impl_.has_verbal_transition_alert_instruction_.verbal_transition_alert_instruction_.InitAllocated(verbal_transition_alert_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_transition_alert_instruction) } // string verbal_pre_transition_instruction = 13; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_pre_transition_instruction() const { + return has_verbal_pre_transition_instruction_case() == kVerbalPreTransitionInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_pre_transition_instruction() const { + return _internal_has_verbal_pre_transition_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_pre_transition_instruction() { + _impl_._oneof_case_[11] = kVerbalPreTransitionInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_pre_transition_instruction() { - _impl_.verbal_pre_transition_instruction_.ClearToEmpty(); + if (_internal_has_verbal_pre_transition_instruction()) { + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Destroy(); + clear_has_has_verbal_pre_transition_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_pre_transition_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_pre_transition_instruction) return _internal_verbal_pre_transition_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_pre_transition_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_pre_transition_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_pre_transition_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_pre_transition_instruction()) { + clear_has_verbal_pre_transition_instruction(); + set_has_verbal_pre_transition_instruction(); + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_pre_transition_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_pre_transition_instruction() { @@ -2757,48 +3825,75 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_pre_transition_instru return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_pre_transition_instruction() const { - return _impl_.verbal_pre_transition_instruction_.Get(); + if (_internal_has_verbal_pre_transition_instruction()) { + return _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_pre_transition_instruction(const std::string& value) { - - _impl_.verbal_pre_transition_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_pre_transition_instruction()) { + clear_has_verbal_pre_transition_instruction(); + set_has_verbal_pre_transition_instruction(); + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_pre_transition_instruction() { - - return _impl_.verbal_pre_transition_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_pre_transition_instruction()) { + clear_has_verbal_pre_transition_instruction(); + set_has_verbal_pre_transition_instruction(); + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.InitDefault(); + } + return _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_pre_transition_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_pre_transition_instruction) - return _impl_.verbal_pre_transition_instruction_.Release(); + if (_internal_has_verbal_pre_transition_instruction()) { + clear_has_has_verbal_pre_transition_instruction(); + return _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_pre_transition_instruction(std::string* verbal_pre_transition_instruction) { - if (verbal_pre_transition_instruction != nullptr) { - - } else { - + if (has_has_verbal_pre_transition_instruction()) { + clear_has_verbal_pre_transition_instruction(); } - _impl_.verbal_pre_transition_instruction_.SetAllocated(verbal_pre_transition_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_pre_transition_instruction_.IsDefault()) { - _impl_.verbal_pre_transition_instruction_.Set("", GetArenaForAllocation()); + if (verbal_pre_transition_instruction != nullptr) { + set_has_verbal_pre_transition_instruction(); + _impl_.has_verbal_pre_transition_instruction_.verbal_pre_transition_instruction_.InitAllocated(verbal_pre_transition_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_pre_transition_instruction) } // string verbal_post_transition_instruction = 14; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_post_transition_instruction() const { + return has_verbal_post_transition_instruction_case() == kVerbalPostTransitionInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_post_transition_instruction() const { + return _internal_has_verbal_post_transition_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_post_transition_instruction() { + _impl_._oneof_case_[12] = kVerbalPostTransitionInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_post_transition_instruction() { - _impl_.verbal_post_transition_instruction_.ClearToEmpty(); + if (_internal_has_verbal_post_transition_instruction()) { + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Destroy(); + clear_has_has_verbal_post_transition_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_post_transition_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_post_transition_instruction) return _internal_verbal_post_transition_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_post_transition_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_post_transition_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_post_transition_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_post_transition_instruction()) { + clear_has_verbal_post_transition_instruction(); + set_has_verbal_post_transition_instruction(); + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_post_transition_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_post_transition_instruction() { @@ -2807,32 +3902,44 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_post_transition_instr return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_post_transition_instruction() const { - return _impl_.verbal_post_transition_instruction_.Get(); + if (_internal_has_verbal_post_transition_instruction()) { + return _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_post_transition_instruction(const std::string& value) { - - _impl_.verbal_post_transition_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_post_transition_instruction()) { + clear_has_verbal_post_transition_instruction(); + set_has_verbal_post_transition_instruction(); + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_post_transition_instruction() { - - return _impl_.verbal_post_transition_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_post_transition_instruction()) { + clear_has_verbal_post_transition_instruction(); + set_has_verbal_post_transition_instruction(); + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.InitDefault(); + } + return _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_post_transition_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_post_transition_instruction) - return _impl_.verbal_post_transition_instruction_.Release(); + if (_internal_has_verbal_post_transition_instruction()) { + clear_has_has_verbal_post_transition_instruction(); + return _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_post_transition_instruction(std::string* verbal_post_transition_instruction) { - if (verbal_post_transition_instruction != nullptr) { - - } else { - + if (has_has_verbal_post_transition_instruction()) { + clear_has_verbal_post_transition_instruction(); } - _impl_.verbal_post_transition_instruction_.SetAllocated(verbal_post_transition_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_post_transition_instruction_.IsDefault()) { - _impl_.verbal_post_transition_instruction_.Set("", GetArenaForAllocation()); + if (verbal_post_transition_instruction != nullptr) { + set_has_verbal_post_transition_instruction(); + _impl_.has_verbal_post_transition_instruction_.verbal_post_transition_instruction_.InitAllocated(verbal_post_transition_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_post_transition_instruction) } @@ -2959,38 +4066,71 @@ inline void DirectionsLeg_Maneuver::set_allocated_sign(::valhalla::TripSign* sig } // uint32 roundabout_exit_count = 17; +inline bool DirectionsLeg_Maneuver::_internal_has_roundabout_exit_count() const { + return has_roundabout_exit_count_case() == kRoundaboutExitCount; +} +inline bool DirectionsLeg_Maneuver::has_roundabout_exit_count() const { + return _internal_has_roundabout_exit_count(); +} +inline void DirectionsLeg_Maneuver::set_has_roundabout_exit_count() { + _impl_._oneof_case_[13] = kRoundaboutExitCount; +} inline void DirectionsLeg_Maneuver::clear_roundabout_exit_count() { - _impl_.roundabout_exit_count_ = 0u; + if (_internal_has_roundabout_exit_count()) { + _impl_.has_roundabout_exit_count_.roundabout_exit_count_ = 0u; + clear_has_has_roundabout_exit_count(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_roundabout_exit_count() const { - return _impl_.roundabout_exit_count_; + if (_internal_has_roundabout_exit_count()) { + return _impl_.has_roundabout_exit_count_.roundabout_exit_count_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_roundabout_exit_count(uint32_t value) { + if (!_internal_has_roundabout_exit_count()) { + clear_has_roundabout_exit_count(); + set_has_roundabout_exit_count(); + } + _impl_.has_roundabout_exit_count_.roundabout_exit_count_ = value; } inline uint32_t DirectionsLeg_Maneuver::roundabout_exit_count() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.roundabout_exit_count) return _internal_roundabout_exit_count(); } -inline void DirectionsLeg_Maneuver::_internal_set_roundabout_exit_count(uint32_t value) { - - _impl_.roundabout_exit_count_ = value; -} inline void DirectionsLeg_Maneuver::set_roundabout_exit_count(uint32_t value) { _internal_set_roundabout_exit_count(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.roundabout_exit_count) } // string depart_instruction = 18; +inline bool DirectionsLeg_Maneuver::_internal_has_depart_instruction() const { + return has_depart_instruction_case() == kDepartInstruction; +} +inline bool DirectionsLeg_Maneuver::has_depart_instruction() const { + return _internal_has_depart_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_depart_instruction() { + _impl_._oneof_case_[14] = kDepartInstruction; +} inline void DirectionsLeg_Maneuver::clear_depart_instruction() { - _impl_.depart_instruction_.ClearToEmpty(); + if (_internal_has_depart_instruction()) { + _impl_.has_depart_instruction_.depart_instruction_.Destroy(); + clear_has_has_depart_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::depart_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.depart_instruction) return _internal_depart_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_depart_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.depart_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_depart_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_depart_instruction()) { + clear_has_depart_instruction(); + set_has_depart_instruction(); + _impl_.has_depart_instruction_.depart_instruction_.InitDefault(); + } + _impl_.has_depart_instruction_.depart_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.depart_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_depart_instruction() { @@ -2999,48 +4139,75 @@ inline std::string* DirectionsLeg_Maneuver::mutable_depart_instruction() { return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_depart_instruction() const { - return _impl_.depart_instruction_.Get(); + if (_internal_has_depart_instruction()) { + return _impl_.has_depart_instruction_.depart_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_depart_instruction(const std::string& value) { - - _impl_.depart_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_depart_instruction()) { + clear_has_depart_instruction(); + set_has_depart_instruction(); + _impl_.has_depart_instruction_.depart_instruction_.InitDefault(); + } + _impl_.has_depart_instruction_.depart_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_depart_instruction() { - - return _impl_.depart_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_depart_instruction()) { + clear_has_depart_instruction(); + set_has_depart_instruction(); + _impl_.has_depart_instruction_.depart_instruction_.InitDefault(); + } + return _impl_.has_depart_instruction_.depart_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_depart_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.depart_instruction) - return _impl_.depart_instruction_.Release(); + if (_internal_has_depart_instruction()) { + clear_has_has_depart_instruction(); + return _impl_.has_depart_instruction_.depart_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_depart_instruction(std::string* depart_instruction) { - if (depart_instruction != nullptr) { - - } else { - + if (has_has_depart_instruction()) { + clear_has_depart_instruction(); } - _impl_.depart_instruction_.SetAllocated(depart_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.depart_instruction_.IsDefault()) { - _impl_.depart_instruction_.Set("", GetArenaForAllocation()); + if (depart_instruction != nullptr) { + set_has_depart_instruction(); + _impl_.has_depart_instruction_.depart_instruction_.InitAllocated(depart_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.depart_instruction) } // string verbal_depart_instruction = 19; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_depart_instruction() const { + return has_verbal_depart_instruction_case() == kVerbalDepartInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_depart_instruction() const { + return _internal_has_verbal_depart_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_depart_instruction() { + _impl_._oneof_case_[15] = kVerbalDepartInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_depart_instruction() { - _impl_.verbal_depart_instruction_.ClearToEmpty(); + if (_internal_has_verbal_depart_instruction()) { + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Destroy(); + clear_has_has_verbal_depart_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_depart_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_depart_instruction) return _internal_verbal_depart_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_depart_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_depart_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_depart_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_depart_instruction()) { + clear_has_verbal_depart_instruction(); + set_has_verbal_depart_instruction(); + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.InitDefault(); + } + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_depart_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_depart_instruction() { @@ -3049,48 +4216,75 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_depart_instruction() return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_depart_instruction() const { - return _impl_.verbal_depart_instruction_.Get(); + if (_internal_has_verbal_depart_instruction()) { + return _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_depart_instruction(const std::string& value) { - - _impl_.verbal_depart_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_depart_instruction()) { + clear_has_verbal_depart_instruction(); + set_has_verbal_depart_instruction(); + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.InitDefault(); + } + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_depart_instruction() { - - return _impl_.verbal_depart_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_depart_instruction()) { + clear_has_verbal_depart_instruction(); + set_has_verbal_depart_instruction(); + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.InitDefault(); + } + return _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_depart_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_depart_instruction) - return _impl_.verbal_depart_instruction_.Release(); + if (_internal_has_verbal_depart_instruction()) { + clear_has_has_verbal_depart_instruction(); + return _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_depart_instruction(std::string* verbal_depart_instruction) { - if (verbal_depart_instruction != nullptr) { - - } else { - + if (has_has_verbal_depart_instruction()) { + clear_has_verbal_depart_instruction(); } - _impl_.verbal_depart_instruction_.SetAllocated(verbal_depart_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_depart_instruction_.IsDefault()) { - _impl_.verbal_depart_instruction_.Set("", GetArenaForAllocation()); + if (verbal_depart_instruction != nullptr) { + set_has_verbal_depart_instruction(); + _impl_.has_verbal_depart_instruction_.verbal_depart_instruction_.InitAllocated(verbal_depart_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_depart_instruction) } // string arrive_instruction = 20; +inline bool DirectionsLeg_Maneuver::_internal_has_arrive_instruction() const { + return has_arrive_instruction_case() == kArriveInstruction; +} +inline bool DirectionsLeg_Maneuver::has_arrive_instruction() const { + return _internal_has_arrive_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_arrive_instruction() { + _impl_._oneof_case_[16] = kArriveInstruction; +} inline void DirectionsLeg_Maneuver::clear_arrive_instruction() { - _impl_.arrive_instruction_.ClearToEmpty(); + if (_internal_has_arrive_instruction()) { + _impl_.has_arrive_instruction_.arrive_instruction_.Destroy(); + clear_has_has_arrive_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::arrive_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.arrive_instruction) return _internal_arrive_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_arrive_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.arrive_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_arrive_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_arrive_instruction()) { + clear_has_arrive_instruction(); + set_has_arrive_instruction(); + _impl_.has_arrive_instruction_.arrive_instruction_.InitDefault(); + } + _impl_.has_arrive_instruction_.arrive_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.arrive_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_arrive_instruction() { @@ -3099,48 +4293,75 @@ inline std::string* DirectionsLeg_Maneuver::mutable_arrive_instruction() { return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_arrive_instruction() const { - return _impl_.arrive_instruction_.Get(); + if (_internal_has_arrive_instruction()) { + return _impl_.has_arrive_instruction_.arrive_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_arrive_instruction(const std::string& value) { - - _impl_.arrive_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_arrive_instruction()) { + clear_has_arrive_instruction(); + set_has_arrive_instruction(); + _impl_.has_arrive_instruction_.arrive_instruction_.InitDefault(); + } + _impl_.has_arrive_instruction_.arrive_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_arrive_instruction() { - - return _impl_.arrive_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_arrive_instruction()) { + clear_has_arrive_instruction(); + set_has_arrive_instruction(); + _impl_.has_arrive_instruction_.arrive_instruction_.InitDefault(); + } + return _impl_.has_arrive_instruction_.arrive_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_arrive_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.arrive_instruction) - return _impl_.arrive_instruction_.Release(); + if (_internal_has_arrive_instruction()) { + clear_has_has_arrive_instruction(); + return _impl_.has_arrive_instruction_.arrive_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_arrive_instruction(std::string* arrive_instruction) { - if (arrive_instruction != nullptr) { - - } else { - + if (has_has_arrive_instruction()) { + clear_has_arrive_instruction(); } - _impl_.arrive_instruction_.SetAllocated(arrive_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.arrive_instruction_.IsDefault()) { - _impl_.arrive_instruction_.Set("", GetArenaForAllocation()); + if (arrive_instruction != nullptr) { + set_has_arrive_instruction(); + _impl_.has_arrive_instruction_.arrive_instruction_.InitAllocated(arrive_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.arrive_instruction) } // string verbal_arrive_instruction = 21; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_arrive_instruction() const { + return has_verbal_arrive_instruction_case() == kVerbalArriveInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_arrive_instruction() const { + return _internal_has_verbal_arrive_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_arrive_instruction() { + _impl_._oneof_case_[17] = kVerbalArriveInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_arrive_instruction() { - _impl_.verbal_arrive_instruction_.ClearToEmpty(); + if (_internal_has_verbal_arrive_instruction()) { + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Destroy(); + clear_has_has_verbal_arrive_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_arrive_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_arrive_instruction) return _internal_verbal_arrive_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_arrive_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_arrive_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_arrive_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_arrive_instruction()) { + clear_has_verbal_arrive_instruction(); + set_has_verbal_arrive_instruction(); + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.InitDefault(); + } + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_arrive_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_arrive_instruction() { @@ -3149,32 +4370,44 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_arrive_instruction() return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_arrive_instruction() const { - return _impl_.verbal_arrive_instruction_.Get(); + if (_internal_has_verbal_arrive_instruction()) { + return _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_arrive_instruction(const std::string& value) { - - _impl_.verbal_arrive_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_arrive_instruction()) { + clear_has_verbal_arrive_instruction(); + set_has_verbal_arrive_instruction(); + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.InitDefault(); + } + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_arrive_instruction() { - - return _impl_.verbal_arrive_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_arrive_instruction()) { + clear_has_verbal_arrive_instruction(); + set_has_verbal_arrive_instruction(); + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.InitDefault(); + } + return _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_arrive_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_arrive_instruction) - return _impl_.verbal_arrive_instruction_.Release(); + if (_internal_has_verbal_arrive_instruction()) { + clear_has_has_verbal_arrive_instruction(); + return _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_arrive_instruction(std::string* verbal_arrive_instruction) { - if (verbal_arrive_instruction != nullptr) { - - } else { - + if (has_has_verbal_arrive_instruction()) { + clear_has_verbal_arrive_instruction(); } - _impl_.verbal_arrive_instruction_.SetAllocated(verbal_arrive_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_arrive_instruction_.IsDefault()) { - _impl_.verbal_arrive_instruction_.Set("", GetArenaForAllocation()); + if (verbal_arrive_instruction != nullptr) { + set_has_verbal_arrive_instruction(); + _impl_.has_verbal_arrive_instruction_.verbal_arrive_instruction_.InitAllocated(verbal_arrive_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_arrive_instruction) } @@ -3264,39 +4497,75 @@ inline void DirectionsLeg_Maneuver::set_allocated_transit_info(::valhalla::Trans } // bool verbal_multi_cue = 23; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_multi_cue() const { + return has_verbal_multi_cue_case() == kVerbalMultiCue; +} +inline bool DirectionsLeg_Maneuver::has_verbal_multi_cue() const { + return _internal_has_verbal_multi_cue(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_multi_cue() { + _impl_._oneof_case_[18] = kVerbalMultiCue; +} inline void DirectionsLeg_Maneuver::clear_verbal_multi_cue() { - _impl_.verbal_multi_cue_ = false; + if (_internal_has_verbal_multi_cue()) { + _impl_.has_verbal_multi_cue_.verbal_multi_cue_ = false; + clear_has_has_verbal_multi_cue(); + } } inline bool DirectionsLeg_Maneuver::_internal_verbal_multi_cue() const { - return _impl_.verbal_multi_cue_; + if (_internal_has_verbal_multi_cue()) { + return _impl_.has_verbal_multi_cue_.verbal_multi_cue_; + } + return false; +} +inline void DirectionsLeg_Maneuver::_internal_set_verbal_multi_cue(bool value) { + if (!_internal_has_verbal_multi_cue()) { + clear_has_verbal_multi_cue(); + set_has_verbal_multi_cue(); + } + _impl_.has_verbal_multi_cue_.verbal_multi_cue_ = value; } inline bool DirectionsLeg_Maneuver::verbal_multi_cue() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_multi_cue) return _internal_verbal_multi_cue(); } -inline void DirectionsLeg_Maneuver::_internal_set_verbal_multi_cue(bool value) { - - _impl_.verbal_multi_cue_ = value; -} inline void DirectionsLeg_Maneuver::set_verbal_multi_cue(bool value) { _internal_set_verbal_multi_cue(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_multi_cue) } // .valhalla.TravelMode travel_mode = 24; +inline bool DirectionsLeg_Maneuver::_internal_has_travel_mode() const { + return has_travel_mode_case() == kTravelMode; +} +inline bool DirectionsLeg_Maneuver::has_travel_mode() const { + return _internal_has_travel_mode(); +} +inline void DirectionsLeg_Maneuver::set_has_travel_mode() { + _impl_._oneof_case_[19] = kTravelMode; +} inline void DirectionsLeg_Maneuver::clear_travel_mode() { - _impl_.travel_mode_ = 0; + if (_internal_has_travel_mode()) { + _impl_.has_travel_mode_.travel_mode_ = 0; + clear_has_has_travel_mode(); + } } inline ::valhalla::TravelMode DirectionsLeg_Maneuver::_internal_travel_mode() const { - return static_cast< ::valhalla::TravelMode >(_impl_.travel_mode_); + if (_internal_has_travel_mode()) { + return static_cast< ::valhalla::TravelMode >(_impl_.has_travel_mode_.travel_mode_); + } + return static_cast< ::valhalla::TravelMode >(0); } inline ::valhalla::TravelMode DirectionsLeg_Maneuver::travel_mode() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.travel_mode) return _internal_travel_mode(); } inline void DirectionsLeg_Maneuver::_internal_set_travel_mode(::valhalla::TravelMode value) { - - _impl_.travel_mode_ = value; + if (!_internal_has_travel_mode()) { + clear_has_travel_mode(); + set_has_travel_mode(); + } + _impl_.has_travel_mode_.travel_mode_ = value; } inline void DirectionsLeg_Maneuver::set_travel_mode(::valhalla::TravelMode value) { _internal_set_travel_mode(value); @@ -3304,19 +4573,37 @@ inline void DirectionsLeg_Maneuver::set_travel_mode(::valhalla::TravelMode value } // .valhalla.VehicleType vehicle_type = 25; +inline bool DirectionsLeg_Maneuver::_internal_has_vehicle_type() const { + return has_vehicle_type_case() == kVehicleType; +} +inline bool DirectionsLeg_Maneuver::has_vehicle_type() const { + return _internal_has_vehicle_type(); +} +inline void DirectionsLeg_Maneuver::set_has_vehicle_type() { + _impl_._oneof_case_[20] = kVehicleType; +} inline void DirectionsLeg_Maneuver::clear_vehicle_type() { - _impl_.vehicle_type_ = 0; + if (_internal_has_vehicle_type()) { + _impl_.has_vehicle_type_.vehicle_type_ = 0; + clear_has_has_vehicle_type(); + } } inline ::valhalla::VehicleType DirectionsLeg_Maneuver::_internal_vehicle_type() const { - return static_cast< ::valhalla::VehicleType >(_impl_.vehicle_type_); + if (_internal_has_vehicle_type()) { + return static_cast< ::valhalla::VehicleType >(_impl_.has_vehicle_type_.vehicle_type_); + } + return static_cast< ::valhalla::VehicleType >(0); } inline ::valhalla::VehicleType DirectionsLeg_Maneuver::vehicle_type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.vehicle_type) return _internal_vehicle_type(); } inline void DirectionsLeg_Maneuver::_internal_set_vehicle_type(::valhalla::VehicleType value) { - - _impl_.vehicle_type_ = value; + if (!_internal_has_vehicle_type()) { + clear_has_vehicle_type(); + set_has_vehicle_type(); + } + _impl_.has_vehicle_type_.vehicle_type_ = value; } inline void DirectionsLeg_Maneuver::set_vehicle_type(::valhalla::VehicleType value) { _internal_set_vehicle_type(value); @@ -3324,19 +4611,37 @@ inline void DirectionsLeg_Maneuver::set_vehicle_type(::valhalla::VehicleType val } // .valhalla.PedestrianType pedestrian_type = 26; +inline bool DirectionsLeg_Maneuver::_internal_has_pedestrian_type() const { + return has_pedestrian_type_case() == kPedestrianType; +} +inline bool DirectionsLeg_Maneuver::has_pedestrian_type() const { + return _internal_has_pedestrian_type(); +} +inline void DirectionsLeg_Maneuver::set_has_pedestrian_type() { + _impl_._oneof_case_[21] = kPedestrianType; +} inline void DirectionsLeg_Maneuver::clear_pedestrian_type() { - _impl_.pedestrian_type_ = 0; + if (_internal_has_pedestrian_type()) { + _impl_.has_pedestrian_type_.pedestrian_type_ = 0; + clear_has_has_pedestrian_type(); + } } inline ::valhalla::PedestrianType DirectionsLeg_Maneuver::_internal_pedestrian_type() const { - return static_cast< ::valhalla::PedestrianType >(_impl_.pedestrian_type_); + if (_internal_has_pedestrian_type()) { + return static_cast< ::valhalla::PedestrianType >(_impl_.has_pedestrian_type_.pedestrian_type_); + } + return static_cast< ::valhalla::PedestrianType >(0); } inline ::valhalla::PedestrianType DirectionsLeg_Maneuver::pedestrian_type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.pedestrian_type) return _internal_pedestrian_type(); } inline void DirectionsLeg_Maneuver::_internal_set_pedestrian_type(::valhalla::PedestrianType value) { - - _impl_.pedestrian_type_ = value; + if (!_internal_has_pedestrian_type()) { + clear_has_pedestrian_type(); + set_has_pedestrian_type(); + } + _impl_.has_pedestrian_type_.pedestrian_type_ = value; } inline void DirectionsLeg_Maneuver::set_pedestrian_type(::valhalla::PedestrianType value) { _internal_set_pedestrian_type(value); @@ -3344,19 +4649,37 @@ inline void DirectionsLeg_Maneuver::set_pedestrian_type(::valhalla::PedestrianTy } // .valhalla.BicycleType bicycle_type = 27; +inline bool DirectionsLeg_Maneuver::_internal_has_bicycle_type() const { + return has_bicycle_type_case() == kBicycleType; +} +inline bool DirectionsLeg_Maneuver::has_bicycle_type() const { + return _internal_has_bicycle_type(); +} +inline void DirectionsLeg_Maneuver::set_has_bicycle_type() { + _impl_._oneof_case_[22] = kBicycleType; +} inline void DirectionsLeg_Maneuver::clear_bicycle_type() { - _impl_.bicycle_type_ = 0; + if (_internal_has_bicycle_type()) { + _impl_.has_bicycle_type_.bicycle_type_ = 0; + clear_has_has_bicycle_type(); + } } inline ::valhalla::BicycleType DirectionsLeg_Maneuver::_internal_bicycle_type() const { - return static_cast< ::valhalla::BicycleType >(_impl_.bicycle_type_); + if (_internal_has_bicycle_type()) { + return static_cast< ::valhalla::BicycleType >(_impl_.has_bicycle_type_.bicycle_type_); + } + return static_cast< ::valhalla::BicycleType >(0); } inline ::valhalla::BicycleType DirectionsLeg_Maneuver::bicycle_type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.bicycle_type) return _internal_bicycle_type(); } inline void DirectionsLeg_Maneuver::_internal_set_bicycle_type(::valhalla::BicycleType value) { - - _impl_.bicycle_type_ = value; + if (!_internal_has_bicycle_type()) { + clear_has_bicycle_type(); + set_has_bicycle_type(); + } + _impl_.has_bicycle_type_.bicycle_type_ = value; } inline void DirectionsLeg_Maneuver::set_bicycle_type(::valhalla::BicycleType value) { _internal_set_bicycle_type(value); @@ -3364,19 +4687,37 @@ inline void DirectionsLeg_Maneuver::set_bicycle_type(::valhalla::BicycleType val } // .valhalla.TransitType transit_type = 28; +inline bool DirectionsLeg_Maneuver::_internal_has_transit_type() const { + return has_transit_type_case() == kTransitType; +} +inline bool DirectionsLeg_Maneuver::has_transit_type() const { + return _internal_has_transit_type(); +} +inline void DirectionsLeg_Maneuver::set_has_transit_type() { + _impl_._oneof_case_[23] = kTransitType; +} inline void DirectionsLeg_Maneuver::clear_transit_type() { - _impl_.transit_type_ = 0; + if (_internal_has_transit_type()) { + _impl_.has_transit_type_.transit_type_ = 0; + clear_has_has_transit_type(); + } } inline ::valhalla::TransitType DirectionsLeg_Maneuver::_internal_transit_type() const { - return static_cast< ::valhalla::TransitType >(_impl_.transit_type_); + if (_internal_has_transit_type()) { + return static_cast< ::valhalla::TransitType >(_impl_.has_transit_type_.transit_type_); + } + return static_cast< ::valhalla::TransitType >(0); } inline ::valhalla::TransitType DirectionsLeg_Maneuver::transit_type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.transit_type) return _internal_transit_type(); } inline void DirectionsLeg_Maneuver::_internal_set_transit_type(::valhalla::TransitType value) { - - _impl_.transit_type_ = value; + if (!_internal_has_transit_type()) { + clear_has_transit_type(); + set_has_transit_type(); + } + _impl_.has_transit_type_.transit_type_ = value; } inline void DirectionsLeg_Maneuver::set_transit_type(::valhalla::TransitType value) { _internal_set_transit_type(value); @@ -3384,60 +4725,114 @@ inline void DirectionsLeg_Maneuver::set_transit_type(::valhalla::TransitType val } // uint32 begin_path_index = 29; +inline bool DirectionsLeg_Maneuver::_internal_has_begin_path_index() const { + return has_begin_path_index_case() == kBeginPathIndex; +} +inline bool DirectionsLeg_Maneuver::has_begin_path_index() const { + return _internal_has_begin_path_index(); +} +inline void DirectionsLeg_Maneuver::set_has_begin_path_index() { + _impl_._oneof_case_[24] = kBeginPathIndex; +} inline void DirectionsLeg_Maneuver::clear_begin_path_index() { - _impl_.begin_path_index_ = 0u; + if (_internal_has_begin_path_index()) { + _impl_.has_begin_path_index_.begin_path_index_ = 0u; + clear_has_has_begin_path_index(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_begin_path_index() const { - return _impl_.begin_path_index_; + if (_internal_has_begin_path_index()) { + return _impl_.has_begin_path_index_.begin_path_index_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_begin_path_index(uint32_t value) { + if (!_internal_has_begin_path_index()) { + clear_has_begin_path_index(); + set_has_begin_path_index(); + } + _impl_.has_begin_path_index_.begin_path_index_ = value; } inline uint32_t DirectionsLeg_Maneuver::begin_path_index() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.begin_path_index) return _internal_begin_path_index(); } -inline void DirectionsLeg_Maneuver::_internal_set_begin_path_index(uint32_t value) { - - _impl_.begin_path_index_ = value; -} inline void DirectionsLeg_Maneuver::set_begin_path_index(uint32_t value) { _internal_set_begin_path_index(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.begin_path_index) } // uint32 end_path_index = 30; +inline bool DirectionsLeg_Maneuver::_internal_has_end_path_index() const { + return has_end_path_index_case() == kEndPathIndex; +} +inline bool DirectionsLeg_Maneuver::has_end_path_index() const { + return _internal_has_end_path_index(); +} +inline void DirectionsLeg_Maneuver::set_has_end_path_index() { + _impl_._oneof_case_[25] = kEndPathIndex; +} inline void DirectionsLeg_Maneuver::clear_end_path_index() { - _impl_.end_path_index_ = 0u; + if (_internal_has_end_path_index()) { + _impl_.has_end_path_index_.end_path_index_ = 0u; + clear_has_has_end_path_index(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_end_path_index() const { - return _impl_.end_path_index_; + if (_internal_has_end_path_index()) { + return _impl_.has_end_path_index_.end_path_index_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_end_path_index(uint32_t value) { + if (!_internal_has_end_path_index()) { + clear_has_end_path_index(); + set_has_end_path_index(); + } + _impl_.has_end_path_index_.end_path_index_ = value; } inline uint32_t DirectionsLeg_Maneuver::end_path_index() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.end_path_index) return _internal_end_path_index(); } -inline void DirectionsLeg_Maneuver::_internal_set_end_path_index(uint32_t value) { - - _impl_.end_path_index_ = value; -} inline void DirectionsLeg_Maneuver::set_end_path_index(uint32_t value) { _internal_set_end_path_index(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.end_path_index) } // bool to_stay_on = 31; +inline bool DirectionsLeg_Maneuver::_internal_has_to_stay_on() const { + return has_to_stay_on_case() == kToStayOn; +} +inline bool DirectionsLeg_Maneuver::has_to_stay_on() const { + return _internal_has_to_stay_on(); +} +inline void DirectionsLeg_Maneuver::set_has_to_stay_on() { + _impl_._oneof_case_[26] = kToStayOn; +} inline void DirectionsLeg_Maneuver::clear_to_stay_on() { - _impl_.to_stay_on_ = false; + if (_internal_has_to_stay_on()) { + _impl_.has_to_stay_on_.to_stay_on_ = false; + clear_has_has_to_stay_on(); + } } inline bool DirectionsLeg_Maneuver::_internal_to_stay_on() const { - return _impl_.to_stay_on_; + if (_internal_has_to_stay_on()) { + return _impl_.has_to_stay_on_.to_stay_on_; + } + return false; +} +inline void DirectionsLeg_Maneuver::_internal_set_to_stay_on(bool value) { + if (!_internal_has_to_stay_on()) { + clear_has_to_stay_on(); + set_has_to_stay_on(); + } + _impl_.has_to_stay_on_.to_stay_on_ = value; } inline bool DirectionsLeg_Maneuver::to_stay_on() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.to_stay_on) return _internal_to_stay_on(); } -inline void DirectionsLeg_Maneuver::_internal_set_to_stay_on(bool value) { - - _impl_.to_stay_on_ = value; -} inline void DirectionsLeg_Maneuver::set_to_stay_on(bool value) { _internal_set_to_stay_on(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.to_stay_on) @@ -3481,40 +4876,76 @@ DirectionsLeg_Maneuver::roundabout_exit_street_names() const { } // uint32 turn_degree = 33; +inline bool DirectionsLeg_Maneuver::_internal_has_turn_degree() const { + return has_turn_degree_case() == kTurnDegree; +} +inline bool DirectionsLeg_Maneuver::has_turn_degree() const { + return _internal_has_turn_degree(); +} +inline void DirectionsLeg_Maneuver::set_has_turn_degree() { + _impl_._oneof_case_[27] = kTurnDegree; +} inline void DirectionsLeg_Maneuver::clear_turn_degree() { - _impl_.turn_degree_ = 0u; + if (_internal_has_turn_degree()) { + _impl_.has_turn_degree_.turn_degree_ = 0u; + clear_has_has_turn_degree(); + } } inline uint32_t DirectionsLeg_Maneuver::_internal_turn_degree() const { - return _impl_.turn_degree_; + if (_internal_has_turn_degree()) { + return _impl_.has_turn_degree_.turn_degree_; + } + return 0u; +} +inline void DirectionsLeg_Maneuver::_internal_set_turn_degree(uint32_t value) { + if (!_internal_has_turn_degree()) { + clear_has_turn_degree(); + set_has_turn_degree(); + } + _impl_.has_turn_degree_.turn_degree_ = value; } inline uint32_t DirectionsLeg_Maneuver::turn_degree() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.turn_degree) return _internal_turn_degree(); } -inline void DirectionsLeg_Maneuver::_internal_set_turn_degree(uint32_t value) { - - _impl_.turn_degree_ = value; -} inline void DirectionsLeg_Maneuver::set_turn_degree(uint32_t value) { _internal_set_turn_degree(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.turn_degree) } // bool has_time_restrictions = 34; +inline bool DirectionsLeg_Maneuver::_internal_has_has_time_restrictions() const { + return has_has_time_restrictions_case() == kHasTimeRestrictions; +} +inline bool DirectionsLeg_Maneuver::has_has_time_restrictions() const { + return _internal_has_has_time_restrictions(); +} +inline void DirectionsLeg_Maneuver::set_has_has_time_restrictions() { + _impl_._oneof_case_[28] = kHasTimeRestrictions; +} inline void DirectionsLeg_Maneuver::clear_has_time_restrictions() { - _impl_.has_time_restrictions_ = false; + if (_internal_has_has_time_restrictions()) { + _impl_.has_has_time_restrictions_.has_time_restrictions_ = false; + clear_has_has_has_time_restrictions(); + } } inline bool DirectionsLeg_Maneuver::_internal_has_time_restrictions() const { - return _impl_.has_time_restrictions_; + if (_internal_has_has_time_restrictions()) { + return _impl_.has_has_time_restrictions_.has_time_restrictions_; + } + return false; +} +inline void DirectionsLeg_Maneuver::_internal_set_has_time_restrictions(bool value) { + if (!_internal_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + set_has_has_time_restrictions(); + } + _impl_.has_has_time_restrictions_.has_time_restrictions_ = value; } inline bool DirectionsLeg_Maneuver::has_time_restrictions() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.has_time_restrictions) return _internal_has_time_restrictions(); } -inline void DirectionsLeg_Maneuver::_internal_set_has_time_restrictions(bool value) { - - _impl_.has_time_restrictions_ = value; -} inline void DirectionsLeg_Maneuver::set_has_time_restrictions(bool value) { _internal_set_has_time_restrictions(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.has_time_restrictions) @@ -3561,19 +4992,37 @@ DirectionsLeg_Maneuver::guidance_views() const { } // .valhalla.DirectionsLeg.Maneuver.BssManeuverType bss_maneuver_type = 36; +inline bool DirectionsLeg_Maneuver::_internal_has_bss_maneuver_type() const { + return has_bss_maneuver_type_case() == kBssManeuverType; +} +inline bool DirectionsLeg_Maneuver::has_bss_maneuver_type() const { + return _internal_has_bss_maneuver_type(); +} +inline void DirectionsLeg_Maneuver::set_has_bss_maneuver_type() { + _impl_._oneof_case_[29] = kBssManeuverType; +} inline void DirectionsLeg_Maneuver::clear_bss_maneuver_type() { - _impl_.bss_maneuver_type_ = 0; + if (_internal_has_bss_maneuver_type()) { + _impl_.has_bss_maneuver_type_.bss_maneuver_type_ = 0; + clear_has_has_bss_maneuver_type(); + } } inline ::valhalla::DirectionsLeg_Maneuver_BssManeuverType DirectionsLeg_Maneuver::_internal_bss_maneuver_type() const { - return static_cast< ::valhalla::DirectionsLeg_Maneuver_BssManeuverType >(_impl_.bss_maneuver_type_); + if (_internal_has_bss_maneuver_type()) { + return static_cast< ::valhalla::DirectionsLeg_Maneuver_BssManeuverType >(_impl_.has_bss_maneuver_type_.bss_maneuver_type_); + } + return static_cast< ::valhalla::DirectionsLeg_Maneuver_BssManeuverType >(0); } inline ::valhalla::DirectionsLeg_Maneuver_BssManeuverType DirectionsLeg_Maneuver::bss_maneuver_type() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.bss_maneuver_type) return _internal_bss_maneuver_type(); } inline void DirectionsLeg_Maneuver::_internal_set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value) { - - _impl_.bss_maneuver_type_ = value; + if (!_internal_has_bss_maneuver_type()) { + clear_has_bss_maneuver_type(); + set_has_bss_maneuver_type(); + } + _impl_.has_bss_maneuver_type_.bss_maneuver_type_ = value; } inline void DirectionsLeg_Maneuver::set_bss_maneuver_type(::valhalla::DirectionsLeg_Maneuver_BssManeuverType value) { _internal_set_bss_maneuver_type(value); @@ -3581,18 +5030,33 @@ inline void DirectionsLeg_Maneuver::set_bss_maneuver_type(::valhalla::Directions } // string verbal_succinct_transition_instruction = 37; +inline bool DirectionsLeg_Maneuver::_internal_has_verbal_succinct_transition_instruction() const { + return has_verbal_succinct_transition_instruction_case() == kVerbalSuccinctTransitionInstruction; +} +inline bool DirectionsLeg_Maneuver::has_verbal_succinct_transition_instruction() const { + return _internal_has_verbal_succinct_transition_instruction(); +} +inline void DirectionsLeg_Maneuver::set_has_verbal_succinct_transition_instruction() { + _impl_._oneof_case_[30] = kVerbalSuccinctTransitionInstruction; +} inline void DirectionsLeg_Maneuver::clear_verbal_succinct_transition_instruction() { - _impl_.verbal_succinct_transition_instruction_.ClearToEmpty(); + if (_internal_has_verbal_succinct_transition_instruction()) { + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Destroy(); + clear_has_has_verbal_succinct_transition_instruction(); + } } inline const std::string& DirectionsLeg_Maneuver::verbal_succinct_transition_instruction() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.verbal_succinct_transition_instruction) return _internal_verbal_succinct_transition_instruction(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg_Maneuver::set_verbal_succinct_transition_instruction(ArgT0&& arg0, ArgT... args) { - - _impl_.verbal_succinct_transition_instruction_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg_Maneuver::set_verbal_succinct_transition_instruction(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_verbal_succinct_transition_instruction()) { + clear_has_verbal_succinct_transition_instruction(); + set_has_verbal_succinct_transition_instruction(); + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.verbal_succinct_transition_instruction) } inline std::string* DirectionsLeg_Maneuver::mutable_verbal_succinct_transition_instruction() { @@ -3601,32 +5065,44 @@ inline std::string* DirectionsLeg_Maneuver::mutable_verbal_succinct_transition_i return _s; } inline const std::string& DirectionsLeg_Maneuver::_internal_verbal_succinct_transition_instruction() const { - return _impl_.verbal_succinct_transition_instruction_.Get(); + if (_internal_has_verbal_succinct_transition_instruction()) { + return _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg_Maneuver::_internal_set_verbal_succinct_transition_instruction(const std::string& value) { - - _impl_.verbal_succinct_transition_instruction_.Set(value, GetArenaForAllocation()); + if (!_internal_has_verbal_succinct_transition_instruction()) { + clear_has_verbal_succinct_transition_instruction(); + set_has_verbal_succinct_transition_instruction(); + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.InitDefault(); + } + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::_internal_mutable_verbal_succinct_transition_instruction() { - - return _impl_.verbal_succinct_transition_instruction_.Mutable(GetArenaForAllocation()); + if (!_internal_has_verbal_succinct_transition_instruction()) { + clear_has_verbal_succinct_transition_instruction(); + set_has_verbal_succinct_transition_instruction(); + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.InitDefault(); + } + return _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg_Maneuver::release_verbal_succinct_transition_instruction() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.Maneuver.verbal_succinct_transition_instruction) - return _impl_.verbal_succinct_transition_instruction_.Release(); + if (_internal_has_verbal_succinct_transition_instruction()) { + clear_has_has_verbal_succinct_transition_instruction(); + return _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg_Maneuver::set_allocated_verbal_succinct_transition_instruction(std::string* verbal_succinct_transition_instruction) { - if (verbal_succinct_transition_instruction != nullptr) { - - } else { - + if (has_has_verbal_succinct_transition_instruction()) { + clear_has_verbal_succinct_transition_instruction(); } - _impl_.verbal_succinct_transition_instruction_.SetAllocated(verbal_succinct_transition_instruction, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.verbal_succinct_transition_instruction_.IsDefault()) { - _impl_.verbal_succinct_transition_instruction_.Set("", GetArenaForAllocation()); + if (verbal_succinct_transition_instruction != nullptr) { + set_has_verbal_succinct_transition_instruction(); + _impl_.has_verbal_succinct_transition_instruction_.verbal_succinct_transition_instruction_.InitAllocated(verbal_succinct_transition_instruction, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.verbal_succinct_transition_instruction) } @@ -3715,105 +5191,398 @@ inline void DirectionsLeg_Maneuver::set_allocated_bss_info(::valhalla::BikeShare // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.Maneuver.bss_info) } -// bool portions_highway = 39; -inline void DirectionsLeg_Maneuver::clear_portions_highway() { - _impl_.portions_highway_ = false; +inline bool DirectionsLeg_Maneuver::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; } -inline bool DirectionsLeg_Maneuver::_internal_portions_highway() const { - return _impl_.portions_highway_; +inline void DirectionsLeg_Maneuver::clear_has_has_type() { + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; } -inline bool DirectionsLeg_Maneuver::portions_highway() const { - // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.portions_highway) - return _internal_portions_highway(); +inline bool DirectionsLeg_Maneuver::has_has_text_instruction() const { + return has_text_instruction_case() != HAS_TEXT_INSTRUCTION_NOT_SET; } -inline void DirectionsLeg_Maneuver::_internal_set_portions_highway(bool value) { - - _impl_.portions_highway_ = value; +inline void DirectionsLeg_Maneuver::clear_has_has_text_instruction() { + _impl_._oneof_case_[1] = HAS_TEXT_INSTRUCTION_NOT_SET; } -inline void DirectionsLeg_Maneuver::set_portions_highway(bool value) { - _internal_set_portions_highway(value); - // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.portions_highway) +inline bool DirectionsLeg_Maneuver::has_has_length() const { + return has_length_case() != HAS_LENGTH_NOT_SET; } - -// bool portions_ferry = 40; -inline void DirectionsLeg_Maneuver::clear_portions_ferry() { - _impl_.portions_ferry_ = false; +inline void DirectionsLeg_Maneuver::clear_has_has_length() { + _impl_._oneof_case_[2] = HAS_LENGTH_NOT_SET; } -inline bool DirectionsLeg_Maneuver::_internal_portions_ferry() const { - return _impl_.portions_ferry_; +inline bool DirectionsLeg_Maneuver::has_has_time() const { + return has_time_case() != HAS_TIME_NOT_SET; } -inline bool DirectionsLeg_Maneuver::portions_ferry() const { - // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.Maneuver.portions_ferry) - return _internal_portions_ferry(); +inline void DirectionsLeg_Maneuver::clear_has_has_time() { + _impl_._oneof_case_[3] = HAS_TIME_NOT_SET; } -inline void DirectionsLeg_Maneuver::_internal_set_portions_ferry(bool value) { - - _impl_.portions_ferry_ = value; +inline bool DirectionsLeg_Maneuver::has_has_begin_cardinal_direction() const { + return has_begin_cardinal_direction_case() != HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET; } -inline void DirectionsLeg_Maneuver::set_portions_ferry(bool value) { - _internal_set_portions_ferry(value); - // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.Maneuver.portions_ferry) +inline void DirectionsLeg_Maneuver::clear_has_has_begin_cardinal_direction() { + _impl_._oneof_case_[4] = HAS_BEGIN_CARDINAL_DIRECTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_begin_heading() const { + return has_begin_heading_case() != HAS_BEGIN_HEADING_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_begin_heading() { + _impl_._oneof_case_[5] = HAS_BEGIN_HEADING_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_begin_shape_index() const { + return has_begin_shape_index_case() != HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_begin_shape_index() { + _impl_._oneof_case_[6] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_end_shape_index() const { + return has_end_shape_index_case() != HAS_END_SHAPE_INDEX_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_end_shape_index() { + _impl_._oneof_case_[7] = HAS_END_SHAPE_INDEX_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_portions_toll() const { + return has_portions_toll_case() != HAS_PORTIONS_TOLL_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_portions_toll() { + _impl_._oneof_case_[8] = HAS_PORTIONS_TOLL_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_portions_unpaved() const { + return has_portions_unpaved_case() != HAS_PORTIONS_UNPAVED_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_portions_unpaved() { + _impl_._oneof_case_[9] = HAS_PORTIONS_UNPAVED_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_transition_alert_instruction() const { + return has_verbal_transition_alert_instruction_case() != HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_transition_alert_instruction() { + _impl_._oneof_case_[10] = HAS_VERBAL_TRANSITION_ALERT_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_pre_transition_instruction() const { + return has_verbal_pre_transition_instruction_case() != HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_pre_transition_instruction() { + _impl_._oneof_case_[11] = HAS_VERBAL_PRE_TRANSITION_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_post_transition_instruction() const { + return has_verbal_post_transition_instruction_case() != HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_post_transition_instruction() { + _impl_._oneof_case_[12] = HAS_VERBAL_POST_TRANSITION_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_roundabout_exit_count() const { + return has_roundabout_exit_count_case() != HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_roundabout_exit_count() { + _impl_._oneof_case_[13] = HAS_ROUNDABOUT_EXIT_COUNT_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_depart_instruction() const { + return has_depart_instruction_case() != HAS_DEPART_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_depart_instruction() { + _impl_._oneof_case_[14] = HAS_DEPART_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_depart_instruction() const { + return has_verbal_depart_instruction_case() != HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_depart_instruction() { + _impl_._oneof_case_[15] = HAS_VERBAL_DEPART_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_arrive_instruction() const { + return has_arrive_instruction_case() != HAS_ARRIVE_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_arrive_instruction() { + _impl_._oneof_case_[16] = HAS_ARRIVE_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_arrive_instruction() const { + return has_verbal_arrive_instruction_case() != HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_arrive_instruction() { + _impl_._oneof_case_[17] = HAS_VERBAL_ARRIVE_INSTRUCTION_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_multi_cue() const { + return has_verbal_multi_cue_case() != HAS_VERBAL_MULTI_CUE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_multi_cue() { + _impl_._oneof_case_[18] = HAS_VERBAL_MULTI_CUE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_travel_mode() const { + return has_travel_mode_case() != HAS_TRAVEL_MODE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_travel_mode() { + _impl_._oneof_case_[19] = HAS_TRAVEL_MODE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_vehicle_type() const { + return has_vehicle_type_case() != HAS_VEHICLE_TYPE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_vehicle_type() { + _impl_._oneof_case_[20] = HAS_VEHICLE_TYPE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_pedestrian_type() const { + return has_pedestrian_type_case() != HAS_PEDESTRIAN_TYPE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_pedestrian_type() { + _impl_._oneof_case_[21] = HAS_PEDESTRIAN_TYPE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_bicycle_type() const { + return has_bicycle_type_case() != HAS_BICYCLE_TYPE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_bicycle_type() { + _impl_._oneof_case_[22] = HAS_BICYCLE_TYPE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_transit_type() const { + return has_transit_type_case() != HAS_TRANSIT_TYPE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_transit_type() { + _impl_._oneof_case_[23] = HAS_TRANSIT_TYPE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_begin_path_index() const { + return has_begin_path_index_case() != HAS_BEGIN_PATH_INDEX_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_begin_path_index() { + _impl_._oneof_case_[24] = HAS_BEGIN_PATH_INDEX_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_end_path_index() const { + return has_end_path_index_case() != HAS_END_PATH_INDEX_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_end_path_index() { + _impl_._oneof_case_[25] = HAS_END_PATH_INDEX_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_to_stay_on() const { + return has_to_stay_on_case() != HAS_TO_STAY_ON_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_to_stay_on() { + _impl_._oneof_case_[26] = HAS_TO_STAY_ON_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_turn_degree() const { + return has_turn_degree_case() != HAS_TURN_DEGREE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_turn_degree() { + _impl_._oneof_case_[27] = HAS_TURN_DEGREE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_has_time_restrictions() const { + return has_has_time_restrictions_case() != HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_has_time_restrictions() { + _impl_._oneof_case_[28] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_bss_maneuver_type() const { + return has_bss_maneuver_type_case() != HAS_BSS_MANEUVER_TYPE_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_bss_maneuver_type() { + _impl_._oneof_case_[29] = HAS_BSS_MANEUVER_TYPE_NOT_SET; +} +inline bool DirectionsLeg_Maneuver::has_has_verbal_succinct_transition_instruction() const { + return has_verbal_succinct_transition_instruction_case() != HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET; +} +inline void DirectionsLeg_Maneuver::clear_has_has_verbal_succinct_transition_instruction() { + _impl_._oneof_case_[30] = HAS_VERBAL_SUCCINCT_TRANSITION_INSTRUCTION_NOT_SET; +} +inline DirectionsLeg_Maneuver::HasTypeCase DirectionsLeg_Maneuver::has_type_case() const { + return DirectionsLeg_Maneuver::HasTypeCase(_impl_._oneof_case_[0]); +} +inline DirectionsLeg_Maneuver::HasTextInstructionCase DirectionsLeg_Maneuver::has_text_instruction_case() const { + return DirectionsLeg_Maneuver::HasTextInstructionCase(_impl_._oneof_case_[1]); +} +inline DirectionsLeg_Maneuver::HasLengthCase DirectionsLeg_Maneuver::has_length_case() const { + return DirectionsLeg_Maneuver::HasLengthCase(_impl_._oneof_case_[2]); +} +inline DirectionsLeg_Maneuver::HasTimeCase DirectionsLeg_Maneuver::has_time_case() const { + return DirectionsLeg_Maneuver::HasTimeCase(_impl_._oneof_case_[3]); +} +inline DirectionsLeg_Maneuver::HasBeginCardinalDirectionCase DirectionsLeg_Maneuver::has_begin_cardinal_direction_case() const { + return DirectionsLeg_Maneuver::HasBeginCardinalDirectionCase(_impl_._oneof_case_[4]); +} +inline DirectionsLeg_Maneuver::HasBeginHeadingCase DirectionsLeg_Maneuver::has_begin_heading_case() const { + return DirectionsLeg_Maneuver::HasBeginHeadingCase(_impl_._oneof_case_[5]); +} +inline DirectionsLeg_Maneuver::HasBeginShapeIndexCase DirectionsLeg_Maneuver::has_begin_shape_index_case() const { + return DirectionsLeg_Maneuver::HasBeginShapeIndexCase(_impl_._oneof_case_[6]); +} +inline DirectionsLeg_Maneuver::HasEndShapeIndexCase DirectionsLeg_Maneuver::has_end_shape_index_case() const { + return DirectionsLeg_Maneuver::HasEndShapeIndexCase(_impl_._oneof_case_[7]); +} +inline DirectionsLeg_Maneuver::HasPortionsTollCase DirectionsLeg_Maneuver::has_portions_toll_case() const { + return DirectionsLeg_Maneuver::HasPortionsTollCase(_impl_._oneof_case_[8]); +} +inline DirectionsLeg_Maneuver::HasPortionsUnpavedCase DirectionsLeg_Maneuver::has_portions_unpaved_case() const { + return DirectionsLeg_Maneuver::HasPortionsUnpavedCase(_impl_._oneof_case_[9]); +} +inline DirectionsLeg_Maneuver::HasVerbalTransitionAlertInstructionCase DirectionsLeg_Maneuver::has_verbal_transition_alert_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalTransitionAlertInstructionCase(_impl_._oneof_case_[10]); +} +inline DirectionsLeg_Maneuver::HasVerbalPreTransitionInstructionCase DirectionsLeg_Maneuver::has_verbal_pre_transition_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalPreTransitionInstructionCase(_impl_._oneof_case_[11]); +} +inline DirectionsLeg_Maneuver::HasVerbalPostTransitionInstructionCase DirectionsLeg_Maneuver::has_verbal_post_transition_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalPostTransitionInstructionCase(_impl_._oneof_case_[12]); +} +inline DirectionsLeg_Maneuver::HasRoundaboutExitCountCase DirectionsLeg_Maneuver::has_roundabout_exit_count_case() const { + return DirectionsLeg_Maneuver::HasRoundaboutExitCountCase(_impl_._oneof_case_[13]); +} +inline DirectionsLeg_Maneuver::HasDepartInstructionCase DirectionsLeg_Maneuver::has_depart_instruction_case() const { + return DirectionsLeg_Maneuver::HasDepartInstructionCase(_impl_._oneof_case_[14]); +} +inline DirectionsLeg_Maneuver::HasVerbalDepartInstructionCase DirectionsLeg_Maneuver::has_verbal_depart_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalDepartInstructionCase(_impl_._oneof_case_[15]); +} +inline DirectionsLeg_Maneuver::HasArriveInstructionCase DirectionsLeg_Maneuver::has_arrive_instruction_case() const { + return DirectionsLeg_Maneuver::HasArriveInstructionCase(_impl_._oneof_case_[16]); +} +inline DirectionsLeg_Maneuver::HasVerbalArriveInstructionCase DirectionsLeg_Maneuver::has_verbal_arrive_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalArriveInstructionCase(_impl_._oneof_case_[17]); +} +inline DirectionsLeg_Maneuver::HasVerbalMultiCueCase DirectionsLeg_Maneuver::has_verbal_multi_cue_case() const { + return DirectionsLeg_Maneuver::HasVerbalMultiCueCase(_impl_._oneof_case_[18]); +} +inline DirectionsLeg_Maneuver::HasTravelModeCase DirectionsLeg_Maneuver::has_travel_mode_case() const { + return DirectionsLeg_Maneuver::HasTravelModeCase(_impl_._oneof_case_[19]); +} +inline DirectionsLeg_Maneuver::HasVehicleTypeCase DirectionsLeg_Maneuver::has_vehicle_type_case() const { + return DirectionsLeg_Maneuver::HasVehicleTypeCase(_impl_._oneof_case_[20]); +} +inline DirectionsLeg_Maneuver::HasPedestrianTypeCase DirectionsLeg_Maneuver::has_pedestrian_type_case() const { + return DirectionsLeg_Maneuver::HasPedestrianTypeCase(_impl_._oneof_case_[21]); +} +inline DirectionsLeg_Maneuver::HasBicycleTypeCase DirectionsLeg_Maneuver::has_bicycle_type_case() const { + return DirectionsLeg_Maneuver::HasBicycleTypeCase(_impl_._oneof_case_[22]); +} +inline DirectionsLeg_Maneuver::HasTransitTypeCase DirectionsLeg_Maneuver::has_transit_type_case() const { + return DirectionsLeg_Maneuver::HasTransitTypeCase(_impl_._oneof_case_[23]); +} +inline DirectionsLeg_Maneuver::HasBeginPathIndexCase DirectionsLeg_Maneuver::has_begin_path_index_case() const { + return DirectionsLeg_Maneuver::HasBeginPathIndexCase(_impl_._oneof_case_[24]); +} +inline DirectionsLeg_Maneuver::HasEndPathIndexCase DirectionsLeg_Maneuver::has_end_path_index_case() const { + return DirectionsLeg_Maneuver::HasEndPathIndexCase(_impl_._oneof_case_[25]); +} +inline DirectionsLeg_Maneuver::HasToStayOnCase DirectionsLeg_Maneuver::has_to_stay_on_case() const { + return DirectionsLeg_Maneuver::HasToStayOnCase(_impl_._oneof_case_[26]); +} +inline DirectionsLeg_Maneuver::HasTurnDegreeCase DirectionsLeg_Maneuver::has_turn_degree_case() const { + return DirectionsLeg_Maneuver::HasTurnDegreeCase(_impl_._oneof_case_[27]); +} +inline DirectionsLeg_Maneuver::HasHasTimeRestrictionsCase DirectionsLeg_Maneuver::has_has_time_restrictions_case() const { + return DirectionsLeg_Maneuver::HasHasTimeRestrictionsCase(_impl_._oneof_case_[28]); +} +inline DirectionsLeg_Maneuver::HasBssManeuverTypeCase DirectionsLeg_Maneuver::has_bss_maneuver_type_case() const { + return DirectionsLeg_Maneuver::HasBssManeuverTypeCase(_impl_._oneof_case_[29]); +} +inline DirectionsLeg_Maneuver::HasVerbalSuccinctTransitionInstructionCase DirectionsLeg_Maneuver::has_verbal_succinct_transition_instruction_case() const { + return DirectionsLeg_Maneuver::HasVerbalSuccinctTransitionInstructionCase(_impl_._oneof_case_[30]); } - // ------------------------------------------------------------------- // DirectionsLeg // uint64 trip_id = 1; +inline bool DirectionsLeg::_internal_has_trip_id() const { + return has_trip_id_case() == kTripId; +} +inline bool DirectionsLeg::has_trip_id() const { + return _internal_has_trip_id(); +} +inline void DirectionsLeg::set_has_trip_id() { + _impl_._oneof_case_[0] = kTripId; +} inline void DirectionsLeg::clear_trip_id() { - _impl_.trip_id_ = uint64_t{0u}; + if (_internal_has_trip_id()) { + _impl_.has_trip_id_.trip_id_ = uint64_t{0u}; + clear_has_has_trip_id(); + } } inline uint64_t DirectionsLeg::_internal_trip_id() const { - return _impl_.trip_id_; + if (_internal_has_trip_id()) { + return _impl_.has_trip_id_.trip_id_; + } + return uint64_t{0u}; +} +inline void DirectionsLeg::_internal_set_trip_id(uint64_t value) { + if (!_internal_has_trip_id()) { + clear_has_trip_id(); + set_has_trip_id(); + } + _impl_.has_trip_id_.trip_id_ = value; } inline uint64_t DirectionsLeg::trip_id() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.trip_id) return _internal_trip_id(); } -inline void DirectionsLeg::_internal_set_trip_id(uint64_t value) { - - _impl_.trip_id_ = value; -} inline void DirectionsLeg::set_trip_id(uint64_t value) { _internal_set_trip_id(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.trip_id) } // uint32 leg_id = 2; +inline bool DirectionsLeg::_internal_has_leg_id() const { + return has_leg_id_case() == kLegId; +} +inline bool DirectionsLeg::has_leg_id() const { + return _internal_has_leg_id(); +} +inline void DirectionsLeg::set_has_leg_id() { + _impl_._oneof_case_[1] = kLegId; +} inline void DirectionsLeg::clear_leg_id() { - _impl_.leg_id_ = 0u; + if (_internal_has_leg_id()) { + _impl_.has_leg_id_.leg_id_ = 0u; + clear_has_has_leg_id(); + } } inline uint32_t DirectionsLeg::_internal_leg_id() const { - return _impl_.leg_id_; + if (_internal_has_leg_id()) { + return _impl_.has_leg_id_.leg_id_; + } + return 0u; +} +inline void DirectionsLeg::_internal_set_leg_id(uint32_t value) { + if (!_internal_has_leg_id()) { + clear_has_leg_id(); + set_has_leg_id(); + } + _impl_.has_leg_id_.leg_id_ = value; } inline uint32_t DirectionsLeg::leg_id() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.leg_id) return _internal_leg_id(); } -inline void DirectionsLeg::_internal_set_leg_id(uint32_t value) { - - _impl_.leg_id_ = value; -} inline void DirectionsLeg::set_leg_id(uint32_t value) { _internal_set_leg_id(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.leg_id) } // uint32 leg_count = 3; +inline bool DirectionsLeg::_internal_has_leg_count() const { + return has_leg_count_case() == kLegCount; +} +inline bool DirectionsLeg::has_leg_count() const { + return _internal_has_leg_count(); +} +inline void DirectionsLeg::set_has_leg_count() { + _impl_._oneof_case_[2] = kLegCount; +} inline void DirectionsLeg::clear_leg_count() { - _impl_.leg_count_ = 0u; + if (_internal_has_leg_count()) { + _impl_.has_leg_count_.leg_count_ = 0u; + clear_has_has_leg_count(); + } } inline uint32_t DirectionsLeg::_internal_leg_count() const { - return _impl_.leg_count_; + if (_internal_has_leg_count()) { + return _impl_.has_leg_count_.leg_count_; + } + return 0u; +} +inline void DirectionsLeg::_internal_set_leg_count(uint32_t value) { + if (!_internal_has_leg_count()) { + clear_has_leg_count(); + set_has_leg_count(); + } + _impl_.has_leg_count_.leg_count_ = value; } inline uint32_t DirectionsLeg::leg_count() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.leg_count) return _internal_leg_count(); } -inline void DirectionsLeg::_internal_set_leg_count(uint32_t value) { - - _impl_.leg_count_ = value; -} inline void DirectionsLeg::set_leg_count(uint32_t value) { _internal_set_leg_count(value); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.leg_count) @@ -3987,18 +5756,33 @@ DirectionsLeg::maneuver() const { } // string shape = 7; +inline bool DirectionsLeg::_internal_has_shape() const { + return has_shape_case() == kShape; +} +inline bool DirectionsLeg::has_shape() const { + return _internal_has_shape(); +} +inline void DirectionsLeg::set_has_shape() { + _impl_._oneof_case_[3] = kShape; +} inline void DirectionsLeg::clear_shape() { - _impl_.shape_.ClearToEmpty(); + if (_internal_has_shape()) { + _impl_.has_shape_.shape_.Destroy(); + clear_has_has_shape(); + } } inline const std::string& DirectionsLeg::shape() const { // @@protoc_insertion_point(field_get:valhalla.DirectionsLeg.shape) return _internal_shape(); } template -inline PROTOBUF_ALWAYS_INLINE -void DirectionsLeg::set_shape(ArgT0&& arg0, ArgT... args) { - - _impl_.shape_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void DirectionsLeg::set_shape(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + _impl_.has_shape_.shape_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.DirectionsLeg.shape) } inline std::string* DirectionsLeg::mutable_shape() { @@ -4007,35 +5791,83 @@ inline std::string* DirectionsLeg::mutable_shape() { return _s; } inline const std::string& DirectionsLeg::_internal_shape() const { - return _impl_.shape_.Get(); + if (_internal_has_shape()) { + return _impl_.has_shape_.shape_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void DirectionsLeg::_internal_set_shape(const std::string& value) { - - _impl_.shape_.Set(value, GetArenaForAllocation()); + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + _impl_.has_shape_.shape_.Set(value, GetArenaForAllocation()); } inline std::string* DirectionsLeg::_internal_mutable_shape() { - - return _impl_.shape_.Mutable(GetArenaForAllocation()); + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + return _impl_.has_shape_.shape_.Mutable( GetArenaForAllocation()); } inline std::string* DirectionsLeg::release_shape() { // @@protoc_insertion_point(field_release:valhalla.DirectionsLeg.shape) - return _impl_.shape_.Release(); + if (_internal_has_shape()) { + clear_has_has_shape(); + return _impl_.has_shape_.shape_.Release(); + } else { + return nullptr; + } } inline void DirectionsLeg::set_allocated_shape(std::string* shape) { - if (shape != nullptr) { - - } else { - + if (has_has_shape()) { + clear_has_shape(); } - _impl_.shape_.SetAllocated(shape, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.shape_.IsDefault()) { - _impl_.shape_.Set("", GetArenaForAllocation()); + if (shape != nullptr) { + set_has_shape(); + _impl_.has_shape_.shape_.InitAllocated(shape, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.DirectionsLeg.shape) } +inline bool DirectionsLeg::has_has_trip_id() const { + return has_trip_id_case() != HAS_TRIP_ID_NOT_SET; +} +inline void DirectionsLeg::clear_has_has_trip_id() { + _impl_._oneof_case_[0] = HAS_TRIP_ID_NOT_SET; +} +inline bool DirectionsLeg::has_has_leg_id() const { + return has_leg_id_case() != HAS_LEG_ID_NOT_SET; +} +inline void DirectionsLeg::clear_has_has_leg_id() { + _impl_._oneof_case_[1] = HAS_LEG_ID_NOT_SET; +} +inline bool DirectionsLeg::has_has_leg_count() const { + return has_leg_count_case() != HAS_LEG_COUNT_NOT_SET; +} +inline void DirectionsLeg::clear_has_has_leg_count() { + _impl_._oneof_case_[2] = HAS_LEG_COUNT_NOT_SET; +} +inline bool DirectionsLeg::has_has_shape() const { + return has_shape_case() != HAS_SHAPE_NOT_SET; +} +inline void DirectionsLeg::clear_has_has_shape() { + _impl_._oneof_case_[3] = HAS_SHAPE_NOT_SET; +} +inline DirectionsLeg::HasTripIdCase DirectionsLeg::has_trip_id_case() const { + return DirectionsLeg::HasTripIdCase(_impl_._oneof_case_[0]); +} +inline DirectionsLeg::HasLegIdCase DirectionsLeg::has_leg_id_case() const { + return DirectionsLeg::HasLegIdCase(_impl_._oneof_case_[1]); +} +inline DirectionsLeg::HasLegCountCase DirectionsLeg::has_leg_count_case() const { + return DirectionsLeg::HasLegCountCase(_impl_._oneof_case_[2]); +} +inline DirectionsLeg::HasShapeCase DirectionsLeg::has_shape_case() const { + return DirectionsLeg::HasShapeCase(_impl_._oneof_case_[3]); +} // ------------------------------------------------------------------- // DirectionsRoute diff --git a/include/linux/valhalla/proto/info.pb.cc b/include/linux/valhalla/proto/info.pb.cc index 6798dd9..fb8e849 100644 --- a/include/linux/valhalla/proto/info.pb.cc +++ b/include/linux/valhalla/proto/info.pb.cc @@ -20,11 +20,12 @@ namespace _pbi = _pb::internal; namespace valhalla { PROTOBUF_CONSTEXPR Statistic::Statistic( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.value_)*/0 - , /*decltype(_impl_.frequency_)*/0 - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_key_)*/{} + , /*decltype(_impl_.has_value_)*/{} + , /*decltype(_impl_.has_frequency_)*/{} + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct StatisticDefaultTypeInternal { PROTOBUF_CONSTEXPR StatisticDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -36,9 +37,10 @@ struct StatisticDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatisticDefaultTypeInternal _Statistic_default_instance_; PROTOBUF_CONSTEXPR CodedDescription::CodedDescription( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.code_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_description_)*/{} + , /*decltype(_impl_.has_code_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct CodedDescriptionDefaultTypeInternal { PROTOBUF_CONSTEXPR CodedDescriptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -53,7 +55,6 @@ PROTOBUF_CONSTEXPR Info::Info( /*decltype(_impl_.statistics_)*/{} , /*decltype(_impl_.errors_)*/{} , /*decltype(_impl_.warnings_)*/{} - , /*decltype(_impl_.is_service_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct InfoDefaultTypeInternal { PROTOBUF_CONSTEXPR InfoDefaultTypeInternal() @@ -142,24 +143,54 @@ Statistic::Statistic(const Statistic& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { Statistic* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){} - , decltype(_impl_.frequency_){} - , decltype(_impl_.type_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_key_){} + , decltype(_impl_.has_value_){} + , decltype(_impl_.has_frequency_){} + , decltype(_impl_.has_type_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_key().empty()) { - _this->_impl_.key_.Set(from._internal_key(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.value_, &from._impl_.value_, - static_cast(reinterpret_cast(&_impl_.type_) - - reinterpret_cast(&_impl_.value_)) + sizeof(_impl_.type_)); + clear_has_has_key(); + switch (from.has_key_case()) { + case kKey: { + _this->_internal_set_key(from._internal_key()); + break; + } + case HAS_KEY_NOT_SET: { + break; + } + } + clear_has_has_value(); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + clear_has_has_frequency(); + switch (from.has_frequency_case()) { + case kFrequency: { + _this->_internal_set_frequency(from._internal_frequency()); + break; + } + case HAS_FREQUENCY_NOT_SET: { + break; + } + } + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.Statistic) } @@ -168,16 +199,17 @@ inline void Statistic::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.key_){} - , decltype(_impl_.value_){0} - , decltype(_impl_.frequency_){0} - , decltype(_impl_.type_){0} + decltype(_impl_.has_key_){} + , decltype(_impl_.has_value_){} + , decltype(_impl_.has_frequency_){} + , decltype(_impl_.has_type_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.key_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.key_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_key(); + clear_has_has_value(); + clear_has_has_frequency(); + clear_has_has_type(); } Statistic::~Statistic() { @@ -191,23 +223,91 @@ Statistic::~Statistic() { inline void Statistic::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.key_.Destroy(); + if (has_has_key()) { + clear_has_key(); + } + if (has_has_value()) { + clear_has_value(); + } + if (has_has_frequency()) { + clear_has_frequency(); + } + if (has_has_type()) { + clear_has_type(); + } } void Statistic::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void Statistic::clear_has_key() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Statistic) + switch (has_key_case()) { + case kKey: { + _impl_.has_key_.key_.Destroy(); + break; + } + case HAS_KEY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_KEY_NOT_SET; +} + +void Statistic::clear_has_value() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Statistic) + switch (has_value_case()) { + case kValue: { + // No need to clear + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_VALUE_NOT_SET; +} + +void Statistic::clear_has_frequency() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Statistic) + switch (has_frequency_case()) { + case kFrequency: { + // No need to clear + break; + } + case HAS_FREQUENCY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_FREQUENCY_NOT_SET; +} + +void Statistic::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Statistic) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_TYPE_NOT_SET; +} + + void Statistic::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.Statistic) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.key_.ClearToEmpty(); - ::memset(&_impl_.value_, 0, static_cast( - reinterpret_cast(&_impl_.type_) - - reinterpret_cast(&_impl_.value_)) + sizeof(_impl_.type_)); + clear_has_key(); + clear_has_value(); + clear_has_frequency(); + clear_has_type(); _internal_metadata_.Clear(); } @@ -230,7 +330,7 @@ const char* Statistic::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx // double value = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; @@ -238,7 +338,7 @@ const char* Statistic::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx // float frequency = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { - _impl_.frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_frequency(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -282,7 +382,7 @@ uint8_t* Statistic::_InternalSerialize( (void) cached_has_bits; // string key = 1; - if (!this->_internal_key().empty()) { + if (_internal_has_key()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_key().data(), static_cast(this->_internal_key().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -292,27 +392,19 @@ uint8_t* Statistic::_InternalSerialize( } // double value = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_value = this->_internal_value(); - uint64_t raw_value; - memcpy(&raw_value, &tmp_value, sizeof(tmp_value)); - if (raw_value != 0) { + if (_internal_has_value()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_value(), target); } // float frequency = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_frequency = this->_internal_frequency(); - uint32_t raw_frequency; - memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency)); - if (raw_frequency != 0) { + if (_internal_has_frequency()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_frequency(), target); } // .valhalla.StatisticType type = 4; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 4, this->_internal_type(), target); @@ -334,37 +426,49 @@ size_t Statistic::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string key = 1; - if (!this->_internal_key().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_key()); + switch (has_key_case()) { + // string key = 1; + case kKey: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_key()); + break; + } + case HAS_KEY_NOT_SET: { + break; + } } - - // double value = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_value = this->_internal_value(); - uint64_t raw_value; - memcpy(&raw_value, &tmp_value, sizeof(tmp_value)); - if (raw_value != 0) { - total_size += 1 + 8; + switch (has_value_case()) { + // double value = 2; + case kValue: { + total_size += 1 + 8; + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } - - // float frequency = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_frequency = this->_internal_frequency(); - uint32_t raw_frequency; - memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency)); - if (raw_frequency != 0) { - total_size += 1 + 4; + switch (has_frequency_case()) { + // float frequency = 3; + case kFrequency: { + total_size += 1 + 4; + break; + } + case HAS_FREQUENCY_NOT_SET: { + break; + } } - - // .valhalla.StatisticType type = 4; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_type_case()) { + // .valhalla.StatisticType type = 4; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -386,25 +490,41 @@ void Statistic::MergeFrom(const Statistic& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_key().empty()) { - _this->_internal_set_key(from._internal_key()); + switch (from.has_key_case()) { + case kKey: { + _this->_internal_set_key(from._internal_key()); + break; + } + case HAS_KEY_NOT_SET: { + break; + } } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_value = from._internal_value(); - uint64_t raw_value; - memcpy(&raw_value, &tmp_value, sizeof(tmp_value)); - if (raw_value != 0) { - _this->_internal_set_value(from._internal_value()); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_frequency = from._internal_frequency(); - uint32_t raw_frequency; - memcpy(&raw_frequency, &tmp_frequency, sizeof(tmp_frequency)); - if (raw_frequency != 0) { - _this->_internal_set_frequency(from._internal_frequency()); + switch (from.has_frequency_case()) { + case kFrequency: { + _this->_internal_set_frequency(from._internal_frequency()); + break; + } + case HAS_FREQUENCY_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -422,19 +542,15 @@ bool Statistic::IsInitialized() const { void Statistic::InternalSwap(Statistic* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.key_, lhs_arena, - &other->_impl_.key_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Statistic, _impl_.type_) - + sizeof(Statistic::_impl_.type_) - - PROTOBUF_FIELD_OFFSET(Statistic, _impl_.value_)>( - reinterpret_cast(&_impl_.value_), - reinterpret_cast(&other->_impl_.value_)); + swap(_impl_.has_key_, other->_impl_.has_key_); + swap(_impl_.has_value_, other->_impl_.has_value_); + swap(_impl_.has_frequency_, other->_impl_.has_frequency_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); } std::string Statistic::GetTypeName() const { @@ -458,20 +574,32 @@ CodedDescription::CodedDescription(const CodedDescription& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { CodedDescription* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.description_){} - , decltype(_impl_.code_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_description_){} + , decltype(_impl_.has_code_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_description().empty()) { - _this->_impl_.description_.Set(from._internal_description(), - _this->GetArenaForAllocation()); - } - _this->_impl_.code_ = from._impl_.code_; + clear_has_has_description(); + switch (from.has_description_case()) { + case kDescription: { + _this->_internal_set_description(from._internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } + } + clear_has_has_code(); + switch (from.has_code_case()) { + case kCode: { + _this->_internal_set_code(from._internal_code()); + break; + } + case HAS_CODE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.CodedDescription) } @@ -480,14 +608,13 @@ inline void CodedDescription::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.description_){} - , decltype(_impl_.code_){uint64_t{0u}} + decltype(_impl_.has_description_){} + , decltype(_impl_.has_code_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_description(); + clear_has_has_code(); } CodedDescription::~CodedDescription() { @@ -501,21 +628,55 @@ CodedDescription::~CodedDescription() { inline void CodedDescription::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.description_.Destroy(); + if (has_has_description()) { + clear_has_description(); + } + if (has_has_code()) { + clear_has_code(); + } } void CodedDescription::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void CodedDescription::clear_has_description() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CodedDescription) + switch (has_description_case()) { + case kDescription: { + _impl_.has_description_.description_.Destroy(); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_DESCRIPTION_NOT_SET; +} + +void CodedDescription::clear_has_code() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CodedDescription) + switch (has_code_case()) { + case kCode: { + // No need to clear + break; + } + case HAS_CODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_CODE_NOT_SET; +} + + void CodedDescription::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.CodedDescription) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.description_.ClearToEmpty(); - _impl_.code_ = uint64_t{0u}; + clear_has_description(); + clear_has_code(); _internal_metadata_.Clear(); } @@ -538,7 +699,7 @@ const char* CodedDescription::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint64 code = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_code(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -573,7 +734,7 @@ uint8_t* CodedDescription::_InternalSerialize( (void) cached_has_bits; // string description = 1; - if (!this->_internal_description().empty()) { + if (_internal_has_description()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_description().data(), static_cast(this->_internal_description().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -583,7 +744,7 @@ uint8_t* CodedDescription::_InternalSerialize( } // uint64 code = 2; - if (this->_internal_code() != 0) { + if (_internal_has_code()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_code(), target); } @@ -604,18 +765,28 @@ size_t CodedDescription::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string description = 1; - if (!this->_internal_description().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_description()); + switch (has_description_case()) { + // string description = 1; + case kDescription: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } } - - // uint64 code = 2; - if (this->_internal_code() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_code()); + switch (has_code_case()) { + // uint64 code = 2; + case kCode: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_code()); + break; + } + case HAS_CODE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -637,11 +808,23 @@ void CodedDescription::MergeFrom(const CodedDescription& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_description().empty()) { - _this->_internal_set_description(from._internal_description()); + switch (from.has_description_case()) { + case kDescription: { + _this->_internal_set_description(from._internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } } - if (from._internal_code() != 0) { - _this->_internal_set_code(from._internal_code()); + switch (from.has_code_case()) { + case kCode: { + _this->_internal_set_code(from._internal_code()); + break; + } + case HAS_CODE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -659,14 +842,11 @@ bool CodedDescription::IsInitialized() const { void CodedDescription::InternalSwap(CodedDescription* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.description_, lhs_arena, - &other->_impl_.description_, rhs_arena - ); - swap(_impl_.code_, other->_impl_.code_); + swap(_impl_.has_description_, other->_impl_.has_description_); + swap(_impl_.has_code_, other->_impl_.has_code_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string CodedDescription::GetTypeName() const { @@ -693,11 +873,9 @@ Info::Info(const Info& from) decltype(_impl_.statistics_){from._impl_.statistics_} , decltype(_impl_.errors_){from._impl_.errors_} , decltype(_impl_.warnings_){from._impl_.warnings_} - , decltype(_impl_.is_service_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _this->_impl_.is_service_ = from._impl_.is_service_; // @@protoc_insertion_point(copy_constructor:valhalla.Info) } @@ -709,7 +887,6 @@ inline void Info::SharedCtor( decltype(_impl_.statistics_){arena} , decltype(_impl_.errors_){arena} , decltype(_impl_.warnings_){arena} - , decltype(_impl_.is_service_){false} , /*decltype(_impl_._cached_size_)*/{} }; } @@ -743,7 +920,6 @@ void Info::Clear() { _impl_.statistics_.Clear(); _impl_.errors_.Clear(); _impl_.warnings_.Clear(); - _impl_.is_service_ = false; _internal_metadata_.Clear(); } @@ -792,14 +968,6 @@ const char* Info::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { } else goto handle_unusual; continue; - // bool is_service = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.is_service_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -853,12 +1021,6 @@ uint8_t* Info::_InternalSerialize( InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); } - // bool is_service = 4; - if (this->_internal_is_service() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_is_service(), target); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); @@ -896,11 +1058,6 @@ size_t Info::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // bool is_service = 4; - if (this->_internal_is_service() != 0) { - total_size += 1 + 1; - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -925,9 +1082,6 @@ void Info::MergeFrom(const Info& from) { _this->_impl_.statistics_.MergeFrom(from._impl_.statistics_); _this->_impl_.errors_.MergeFrom(from._impl_.errors_); _this->_impl_.warnings_.MergeFrom(from._impl_.warnings_); - if (from._internal_is_service() != 0) { - _this->_internal_set_is_service(from._internal_is_service()); - } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -948,7 +1102,6 @@ void Info::InternalSwap(Info* other) { _impl_.statistics_.InternalSwap(&other->_impl_.statistics_); _impl_.errors_.InternalSwap(&other->_impl_.errors_); _impl_.warnings_.InternalSwap(&other->_impl_.warnings_); - swap(_impl_.is_service_, other->_impl_.is_service_); } std::string Info::GetTypeName() const { diff --git a/include/linux/valhalla/proto/info.pb.h b/include/linux/valhalla/proto/info.pb.h index c811a32..158a163 100644 --- a/include/linux/valhalla/proto/info.pb.h +++ b/include/linux/valhalla/proto/info.pb.h @@ -119,6 +119,26 @@ class Statistic final : static const Statistic& default_instance() { return *internal_default_instance(); } + enum HasKeyCase { + kKey = 1, + HAS_KEY_NOT_SET = 0, + }; + + enum HasValueCase { + kValue = 2, + HAS_VALUE_NOT_SET = 0, + }; + + enum HasFrequencyCase { + kFrequency = 3, + HAS_FREQUENCY_NOT_SET = 0, + }; + + enum HasTypeCase { + kType = 4, + HAS_TYPE_NOT_SET = 0, + }; + static inline const Statistic* internal_default_instance() { return reinterpret_cast( &_Statistic_default_instance_); @@ -194,6 +214,10 @@ class Statistic final : kTypeFieldNumber = 4, }; // string key = 1; + bool has_key() const; + private: + bool _internal_has_key() const; + public: void clear_key(); const std::string& key() const; template @@ -208,6 +232,10 @@ class Statistic final : public: // double value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: void clear_value(); double value() const; void set_value(double value); @@ -217,6 +245,10 @@ class Statistic final : public: // float frequency = 3; + bool has_frequency() const; + private: + bool _internal_has_frequency() const; + public: void clear_frequency(); float frequency() const; void set_frequency(float value); @@ -226,6 +258,10 @@ class Statistic final : public: // .valhalla.StatisticType type = 4; + bool has_type() const; + private: + bool _internal_has_type() const; + public: void clear_type(); ::valhalla::StatisticType type() const; void set_type(::valhalla::StatisticType value); @@ -234,19 +270,61 @@ class Statistic final : void _internal_set_type(::valhalla::StatisticType value); public: + void clear_has_key(); + HasKeyCase has_key_case() const; + void clear_has_value(); + HasValueCase has_value_case() const; + void clear_has_frequency(); + HasFrequencyCase has_frequency_case() const; + void clear_has_type(); + HasTypeCase has_type_case() const; // @@protoc_insertion_point(class_scope:valhalla.Statistic) private: class _Internal; + void set_has_key(); + void set_has_value(); + void set_has_frequency(); + void set_has_type(); + + inline bool has_has_key() const; + inline void clear_has_has_key(); + + inline bool has_has_value() const; + inline void clear_has_has_value(); + + inline bool has_has_frequency() const; + inline void clear_has_has_frequency(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; - double value_; - float frequency_; - int type_; + union HasKeyUnion { + constexpr HasKeyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + } has_key_; + union HasValueUnion { + constexpr HasValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double value_; + } has_value_; + union HasFrequencyUnion { + constexpr HasFrequencyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float frequency_; + } has_frequency_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[4]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_info_2eproto; @@ -287,6 +365,16 @@ class CodedDescription final : static const CodedDescription& default_instance() { return *internal_default_instance(); } + enum HasDescriptionCase { + kDescription = 1, + HAS_DESCRIPTION_NOT_SET = 0, + }; + + enum HasCodeCase { + kCode = 2, + HAS_CODE_NOT_SET = 0, + }; + static inline const CodedDescription* internal_default_instance() { return reinterpret_cast( &_CodedDescription_default_instance_); @@ -360,6 +448,10 @@ class CodedDescription final : kCodeFieldNumber = 2, }; // string description = 1; + bool has_description() const; + private: + bool _internal_has_description() const; + public: void clear_description(); const std::string& description() const; template @@ -374,6 +466,10 @@ class CodedDescription final : public: // uint64 code = 2; + bool has_code() const; + private: + bool _internal_has_code() const; + public: void clear_code(); uint64_t code() const; void set_code(uint64_t value); @@ -382,17 +478,39 @@ class CodedDescription final : void _internal_set_code(uint64_t value); public: + void clear_has_description(); + HasDescriptionCase has_description_case() const; + void clear_has_code(); + HasCodeCase has_code_case() const; // @@protoc_insertion_point(class_scope:valhalla.CodedDescription) private: class _Internal; + void set_has_description(); + void set_has_code(); + + inline bool has_has_description() const; + inline void clear_has_has_description(); + + inline bool has_has_code() const; + inline void clear_has_has_code(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; - uint64_t code_; + union HasDescriptionUnion { + constexpr HasDescriptionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + } has_description_; + union HasCodeUnion { + constexpr HasCodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t code_; + } has_code_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_info_2eproto; @@ -505,7 +623,6 @@ class Info final : kStatisticsFieldNumber = 1, kErrorsFieldNumber = 2, kWarningsFieldNumber = 3, - kIsServiceFieldNumber = 4, }; // repeated .valhalla.Statistic statistics = 1; int statistics_size() const; @@ -561,15 +678,6 @@ class Info final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CodedDescription >& warnings() const; - // bool is_service = 4; - void clear_is_service(); - bool is_service() const; - void set_is_service(bool value); - private: - bool _internal_is_service() const; - void _internal_set_is_service(bool value); - public: - // @@protoc_insertion_point(class_scope:valhalla.Info) private: class _Internal; @@ -581,7 +689,6 @@ class Info final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Statistic > statistics_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CodedDescription > errors_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CodedDescription > warnings_; - bool is_service_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -599,18 +706,33 @@ class Info final : // Statistic // string key = 1; +inline bool Statistic::_internal_has_key() const { + return has_key_case() == kKey; +} +inline bool Statistic::has_key() const { + return _internal_has_key(); +} +inline void Statistic::set_has_key() { + _impl_._oneof_case_[0] = kKey; +} inline void Statistic::clear_key() { - _impl_.key_.ClearToEmpty(); + if (_internal_has_key()) { + _impl_.has_key_.key_.Destroy(); + clear_has_has_key(); + } } inline const std::string& Statistic::key() const { // @@protoc_insertion_point(field_get:valhalla.Statistic.key) return _internal_key(); } template -inline PROTOBUF_ALWAYS_INLINE -void Statistic::set_key(ArgT0&& arg0, ArgT... args) { - - _impl_.key_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Statistic::set_key(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_key()) { + clear_has_key(); + set_has_key(); + _impl_.has_key_.key_.InitDefault(); + } + _impl_.has_key_.key_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Statistic.key) } inline std::string* Statistic::mutable_key() { @@ -619,112 +741,229 @@ inline std::string* Statistic::mutable_key() { return _s; } inline const std::string& Statistic::_internal_key() const { - return _impl_.key_.Get(); + if (_internal_has_key()) { + return _impl_.has_key_.key_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Statistic::_internal_set_key(const std::string& value) { - - _impl_.key_.Set(value, GetArenaForAllocation()); + if (!_internal_has_key()) { + clear_has_key(); + set_has_key(); + _impl_.has_key_.key_.InitDefault(); + } + _impl_.has_key_.key_.Set(value, GetArenaForAllocation()); } inline std::string* Statistic::_internal_mutable_key() { - - return _impl_.key_.Mutable(GetArenaForAllocation()); + if (!_internal_has_key()) { + clear_has_key(); + set_has_key(); + _impl_.has_key_.key_.InitDefault(); + } + return _impl_.has_key_.key_.Mutable( GetArenaForAllocation()); } inline std::string* Statistic::release_key() { // @@protoc_insertion_point(field_release:valhalla.Statistic.key) - return _impl_.key_.Release(); + if (_internal_has_key()) { + clear_has_has_key(); + return _impl_.has_key_.key_.Release(); + } else { + return nullptr; + } } inline void Statistic::set_allocated_key(std::string* key) { - if (key != nullptr) { - - } else { - + if (has_has_key()) { + clear_has_key(); } - _impl_.key_.SetAllocated(key, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.key_.IsDefault()) { - _impl_.key_.Set("", GetArenaForAllocation()); + if (key != nullptr) { + set_has_key(); + _impl_.has_key_.key_.InitAllocated(key, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.Statistic.key) } // double value = 2; +inline bool Statistic::_internal_has_value() const { + return has_value_case() == kValue; +} +inline bool Statistic::has_value() const { + return _internal_has_value(); +} +inline void Statistic::set_has_value() { + _impl_._oneof_case_[1] = kValue; +} inline void Statistic::clear_value() { - _impl_.value_ = 0; + if (_internal_has_value()) { + _impl_.has_value_.value_ = 0; + clear_has_has_value(); + } } inline double Statistic::_internal_value() const { - return _impl_.value_; + if (_internal_has_value()) { + return _impl_.has_value_.value_; + } + return 0; +} +inline void Statistic::_internal_set_value(double value) { + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + } + _impl_.has_value_.value_ = value; } inline double Statistic::value() const { // @@protoc_insertion_point(field_get:valhalla.Statistic.value) return _internal_value(); } -inline void Statistic::_internal_set_value(double value) { - - _impl_.value_ = value; -} inline void Statistic::set_value(double value) { _internal_set_value(value); // @@protoc_insertion_point(field_set:valhalla.Statistic.value) } // float frequency = 3; +inline bool Statistic::_internal_has_frequency() const { + return has_frequency_case() == kFrequency; +} +inline bool Statistic::has_frequency() const { + return _internal_has_frequency(); +} +inline void Statistic::set_has_frequency() { + _impl_._oneof_case_[2] = kFrequency; +} inline void Statistic::clear_frequency() { - _impl_.frequency_ = 0; + if (_internal_has_frequency()) { + _impl_.has_frequency_.frequency_ = 0; + clear_has_has_frequency(); + } } inline float Statistic::_internal_frequency() const { - return _impl_.frequency_; + if (_internal_has_frequency()) { + return _impl_.has_frequency_.frequency_; + } + return 0; +} +inline void Statistic::_internal_set_frequency(float value) { + if (!_internal_has_frequency()) { + clear_has_frequency(); + set_has_frequency(); + } + _impl_.has_frequency_.frequency_ = value; } inline float Statistic::frequency() const { // @@protoc_insertion_point(field_get:valhalla.Statistic.frequency) return _internal_frequency(); } -inline void Statistic::_internal_set_frequency(float value) { - - _impl_.frequency_ = value; -} inline void Statistic::set_frequency(float value) { _internal_set_frequency(value); // @@protoc_insertion_point(field_set:valhalla.Statistic.frequency) } // .valhalla.StatisticType type = 4; +inline bool Statistic::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool Statistic::has_type() const { + return _internal_has_type(); +} +inline void Statistic::set_has_type() { + _impl_._oneof_case_[3] = kType; +} inline void Statistic::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::StatisticType Statistic::_internal_type() const { - return static_cast< ::valhalla::StatisticType >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::StatisticType >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::StatisticType >(0); } inline ::valhalla::StatisticType Statistic::type() const { // @@protoc_insertion_point(field_get:valhalla.Statistic.type) return _internal_type(); } inline void Statistic::_internal_set_type(::valhalla::StatisticType value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void Statistic::set_type(::valhalla::StatisticType value) { _internal_set_type(value); // @@protoc_insertion_point(field_set:valhalla.Statistic.type) } +inline bool Statistic::has_has_key() const { + return has_key_case() != HAS_KEY_NOT_SET; +} +inline void Statistic::clear_has_has_key() { + _impl_._oneof_case_[0] = HAS_KEY_NOT_SET; +} +inline bool Statistic::has_has_value() const { + return has_value_case() != HAS_VALUE_NOT_SET; +} +inline void Statistic::clear_has_has_value() { + _impl_._oneof_case_[1] = HAS_VALUE_NOT_SET; +} +inline bool Statistic::has_has_frequency() const { + return has_frequency_case() != HAS_FREQUENCY_NOT_SET; +} +inline void Statistic::clear_has_has_frequency() { + _impl_._oneof_case_[2] = HAS_FREQUENCY_NOT_SET; +} +inline bool Statistic::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void Statistic::clear_has_has_type() { + _impl_._oneof_case_[3] = HAS_TYPE_NOT_SET; +} +inline Statistic::HasKeyCase Statistic::has_key_case() const { + return Statistic::HasKeyCase(_impl_._oneof_case_[0]); +} +inline Statistic::HasValueCase Statistic::has_value_case() const { + return Statistic::HasValueCase(_impl_._oneof_case_[1]); +} +inline Statistic::HasFrequencyCase Statistic::has_frequency_case() const { + return Statistic::HasFrequencyCase(_impl_._oneof_case_[2]); +} +inline Statistic::HasTypeCase Statistic::has_type_case() const { + return Statistic::HasTypeCase(_impl_._oneof_case_[3]); +} // ------------------------------------------------------------------- // CodedDescription // string description = 1; +inline bool CodedDescription::_internal_has_description() const { + return has_description_case() == kDescription; +} +inline bool CodedDescription::has_description() const { + return _internal_has_description(); +} +inline void CodedDescription::set_has_description() { + _impl_._oneof_case_[0] = kDescription; +} inline void CodedDescription::clear_description() { - _impl_.description_.ClearToEmpty(); + if (_internal_has_description()) { + _impl_.has_description_.description_.Destroy(); + clear_has_has_description(); + } } inline const std::string& CodedDescription::description() const { // @@protoc_insertion_point(field_get:valhalla.CodedDescription.description) return _internal_description(); } template -inline PROTOBUF_ALWAYS_INLINE -void CodedDescription::set_description(ArgT0&& arg0, ArgT... args) { - - _impl_.description_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void CodedDescription::set_description(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + _impl_.has_description_.description_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.CodedDescription.description) } inline std::string* CodedDescription::mutable_description() { @@ -733,55 +972,103 @@ inline std::string* CodedDescription::mutable_description() { return _s; } inline const std::string& CodedDescription::_internal_description() const { - return _impl_.description_.Get(); + if (_internal_has_description()) { + return _impl_.has_description_.description_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void CodedDescription::_internal_set_description(const std::string& value) { - - _impl_.description_.Set(value, GetArenaForAllocation()); + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + _impl_.has_description_.description_.Set(value, GetArenaForAllocation()); } inline std::string* CodedDescription::_internal_mutable_description() { - - return _impl_.description_.Mutable(GetArenaForAllocation()); + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + return _impl_.has_description_.description_.Mutable( GetArenaForAllocation()); } inline std::string* CodedDescription::release_description() { // @@protoc_insertion_point(field_release:valhalla.CodedDescription.description) - return _impl_.description_.Release(); + if (_internal_has_description()) { + clear_has_has_description(); + return _impl_.has_description_.description_.Release(); + } else { + return nullptr; + } } inline void CodedDescription::set_allocated_description(std::string* description) { - if (description != nullptr) { - - } else { - + if (has_has_description()) { + clear_has_description(); } - _impl_.description_.SetAllocated(description, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.description_.IsDefault()) { - _impl_.description_.Set("", GetArenaForAllocation()); + if (description != nullptr) { + set_has_description(); + _impl_.has_description_.description_.InitAllocated(description, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.CodedDescription.description) } // uint64 code = 2; +inline bool CodedDescription::_internal_has_code() const { + return has_code_case() == kCode; +} +inline bool CodedDescription::has_code() const { + return _internal_has_code(); +} +inline void CodedDescription::set_has_code() { + _impl_._oneof_case_[1] = kCode; +} inline void CodedDescription::clear_code() { - _impl_.code_ = uint64_t{0u}; + if (_internal_has_code()) { + _impl_.has_code_.code_ = uint64_t{0u}; + clear_has_has_code(); + } } inline uint64_t CodedDescription::_internal_code() const { - return _impl_.code_; + if (_internal_has_code()) { + return _impl_.has_code_.code_; + } + return uint64_t{0u}; +} +inline void CodedDescription::_internal_set_code(uint64_t value) { + if (!_internal_has_code()) { + clear_has_code(); + set_has_code(); + } + _impl_.has_code_.code_ = value; } inline uint64_t CodedDescription::code() const { // @@protoc_insertion_point(field_get:valhalla.CodedDescription.code) return _internal_code(); } -inline void CodedDescription::_internal_set_code(uint64_t value) { - - _impl_.code_ = value; -} inline void CodedDescription::set_code(uint64_t value) { _internal_set_code(value); // @@protoc_insertion_point(field_set:valhalla.CodedDescription.code) } +inline bool CodedDescription::has_has_description() const { + return has_description_case() != HAS_DESCRIPTION_NOT_SET; +} +inline void CodedDescription::clear_has_has_description() { + _impl_._oneof_case_[0] = HAS_DESCRIPTION_NOT_SET; +} +inline bool CodedDescription::has_has_code() const { + return has_code_case() != HAS_CODE_NOT_SET; +} +inline void CodedDescription::clear_has_has_code() { + _impl_._oneof_case_[1] = HAS_CODE_NOT_SET; +} +inline CodedDescription::HasDescriptionCase CodedDescription::has_description_case() const { + return CodedDescription::HasDescriptionCase(_impl_._oneof_case_[0]); +} +inline CodedDescription::HasCodeCase CodedDescription::has_code_case() const { + return CodedDescription::HasCodeCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // Info @@ -906,26 +1193,6 @@ Info::warnings() const { return _impl_.warnings_; } -// bool is_service = 4; -inline void Info::clear_is_service() { - _impl_.is_service_ = false; -} -inline bool Info::_internal_is_service() const { - return _impl_.is_service_; -} -inline bool Info::is_service() const { - // @@protoc_insertion_point(field_get:valhalla.Info.is_service) - return _internal_is_service(); -} -inline void Info::_internal_set_is_service(bool value) { - - _impl_.is_service_ = value; -} -inline void Info::set_is_service(bool value) { - _internal_set_is_service(value); - // @@protoc_insertion_point(field_set:valhalla.Info.is_service) -} - #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ diff --git a/include/linux/valhalla/proto/options.pb.cc b/include/linux/valhalla/proto/options.pb.cc index 9acc407..0ac79f1 100644 --- a/include/linux/valhalla/proto/options.pb.cc +++ b/include/linux/valhalla/proto/options.pb.cc @@ -34,35 +34,6 @@ struct ContourDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContourDefaultTypeInternal _Contour_default_instance_; -PROTOBUF_CONSTEXPR Ring::Ring( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.coords_)*/{} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct RingDefaultTypeInternal { - PROTOBUF_CONSTEXPR RingDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~RingDefaultTypeInternal() {} - union { - Ring _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RingDefaultTypeInternal _Ring_default_instance_; -PROTOBUF_CONSTEXPR PbfFieldSelector::PbfFieldSelector( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.options_)*/false - , /*decltype(_impl_.trip_)*/false - , /*decltype(_impl_.directions_)*/false - , /*decltype(_impl_.status_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct PbfFieldSelectorDefaultTypeInternal { - PROTOBUF_CONSTEXPR PbfFieldSelectorDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~PbfFieldSelectorDefaultTypeInternal() {} - union { - PbfFieldSelector _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PbfFieldSelectorDefaultTypeInternal _PbfFieldSelector_default_instance_; PROTOBUF_CONSTEXPR AvoidEdge::AvoidEdge( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.has_id_)*/{} @@ -78,7 +49,7 @@ struct AvoidEdgeDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AvoidEdgeDefaultTypeInternal _AvoidEdge_default_instance_; -PROTOBUF_CONSTEXPR Costing_Options::Costing_Options( +PROTOBUF_CONSTEXPR CostingOptions::CostingOptions( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.filter_stop_ids_)*/{} , /*decltype(_impl_.filter_operator_ids_)*/{} @@ -87,10 +58,6 @@ PROTOBUF_CONSTEXPR Costing_Options::Costing_Options( , /*decltype(_impl_.filter_stop_action_)*/0 , /*decltype(_impl_.filter_operator_action_)*/0 , /*decltype(_impl_.filter_route_action_)*/0 - , /*decltype(_impl_.fixed_speed_)*/0u - , /*decltype(_impl_.axle_count_)*/0u - , /*decltype(_impl_.use_lit_)*/0 - , /*decltype(_impl_.disable_hierarchy_pruning_)*/false , /*decltype(_impl_.has_maneuver_penalty_)*/{} , /*decltype(_impl_.has_destination_only_penalty_)*/{} , /*decltype(_impl_.has_gate_cost_)*/{} @@ -162,49 +129,47 @@ PROTOBUF_CONSTEXPR Costing_Options::Costing_Options( , /*decltype(_impl_.has_include_hov3_)*/{} , /*decltype(_impl_.has_exclude_cash_only_tolls_)*/{} , /*decltype(_impl_.has_restriction_probability_)*/{} - , /*decltype(_impl_.has_elevator_penalty_)*/{} + , /*decltype(_impl_.has_costing_)*/{} + , /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_.has_filter_closures_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}} {} -struct Costing_OptionsDefaultTypeInternal { - PROTOBUF_CONSTEXPR Costing_OptionsDefaultTypeInternal() +struct CostingOptionsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CostingOptionsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~Costing_OptionsDefaultTypeInternal() {} + ~CostingOptionsDefaultTypeInternal() {} union { - Costing_Options _instance; + CostingOptions _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Costing_OptionsDefaultTypeInternal _Costing_Options_default_instance_; -PROTOBUF_CONSTEXPR Costing::Costing( +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostingOptionsDefaultTypeInternal _CostingOptions_default_instance_; +PROTOBUF_CONSTEXPR Options_Ring::Options_Ring( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_.has_options_)*/{} - , /*decltype(_impl_.has_name_)*/{} - , /*decltype(_impl_.has_filter_closures_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}} {} -struct CostingDefaultTypeInternal { - PROTOBUF_CONSTEXPR CostingDefaultTypeInternal() + /*decltype(_impl_.coords_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct Options_RingDefaultTypeInternal { + PROTOBUF_CONSTEXPR Options_RingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~CostingDefaultTypeInternal() {} + ~Options_RingDefaultTypeInternal() {} union { - Costing _instance; + Options_Ring _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostingDefaultTypeInternal _Costing_default_instance_; -PROTOBUF_CONSTEXPR Options_CostingsEntry_DoNotUse::Options_CostingsEntry_DoNotUse( +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Options_RingDefaultTypeInternal _Options_Ring_default_instance_; +PROTOBUF_CONSTEXPR Options_CostingOptionsEntry_DoNotUse::Options_CostingOptionsEntry_DoNotUse( ::_pbi::ConstantInitialized) {} -struct Options_CostingsEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR Options_CostingsEntry_DoNotUseDefaultTypeInternal() +struct Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~Options_CostingsEntry_DoNotUseDefaultTypeInternal() {} + ~Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal() {} union { - Options_CostingsEntry_DoNotUse _instance; + Options_CostingOptionsEntry_DoNotUse _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Options_CostingsEntry_DoNotUseDefaultTypeInternal _Options_CostingsEntry_DoNotUse_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal _Options_CostingOptionsEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR Options::Options( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.costings_)*/{} + /*decltype(_impl_.costing_options_)*/{} , /*decltype(_impl_.locations_)*/{} , /*decltype(_impl_.exclude_locations_)*/{} , /*decltype(_impl_.sources_)*/{} @@ -217,34 +182,32 @@ PROTOBUF_CONSTEXPR Options::Options( , /*decltype(_impl_.exclude_polygons_)*/{} , /*decltype(_impl_.expansion_properties_)*/{} , /*decltype(_impl_._expansion_properties_cached_byte_size_)*/{0} - , /*decltype(_impl_.pbf_field_selector_)*/nullptr - , /*decltype(_impl_.units_)*/0 - , /*decltype(_impl_.directions_type_)*/0 - , /*decltype(_impl_.format_)*/0 - , /*decltype(_impl_.action_)*/0 - , /*decltype(_impl_.costing_type_)*/0 - , /*decltype(_impl_.date_time_type_)*/0 - , /*decltype(_impl_.shape_match_)*/0 , /*decltype(_impl_.filter_action_)*/0 - , /*decltype(_impl_.shape_format_)*/0 - , /*decltype(_impl_.reverse_)*/false + , /*decltype(_impl_.has_units_)*/{} , /*decltype(_impl_.has_language_)*/{} + , /*decltype(_impl_.has_directions_type_)*/{} + , /*decltype(_impl_.has_format_)*/{} , /*decltype(_impl_.has_id_)*/{} , /*decltype(_impl_.has_jsonp_)*/{} , /*decltype(_impl_.has_encoded_polyline_)*/{} + , /*decltype(_impl_.has_action_)*/{} , /*decltype(_impl_.has_range_)*/{} , /*decltype(_impl_.has_verbose_)*/{} + , /*decltype(_impl_.has_costing_)*/{} + , /*decltype(_impl_.has_date_time_type_)*/{} , /*decltype(_impl_.has_date_time_)*/{} , /*decltype(_impl_.has_resample_distance_)*/{} , /*decltype(_impl_.has_polygons_)*/{} , /*decltype(_impl_.has_denoise_)*/{} , /*decltype(_impl_.has_generalize_)*/{} , /*decltype(_impl_.has_show_locations_)*/{} + , /*decltype(_impl_.has_shape_match_)*/{} , /*decltype(_impl_.has_gps_accuracy_)*/{} , /*decltype(_impl_.has_search_radius_)*/{} , /*decltype(_impl_.has_turn_penalty_factor_)*/{} , /*decltype(_impl_.has_breakage_distance_)*/{} , /*decltype(_impl_.has_use_timestamps_)*/{} + , /*decltype(_impl_.has_shape_format_)*/{} , /*decltype(_impl_.has_alternates_)*/{} , /*decltype(_impl_.has_interpolation_distance_)*/{} , /*decltype(_impl_.has_guidance_views_)*/{} @@ -254,7 +217,6 @@ PROTOBUF_CONSTEXPR Options::Options( , /*decltype(_impl_.has_prioritize_bidirectional_)*/{} , /*decltype(_impl_.has_expansion_action_)*/{} , /*decltype(_impl_.has_skip_opposites_)*/{} - , /*decltype(_impl_.has_matrix_locations_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}} {} struct OptionsDefaultTypeInternal { @@ -268,114 +230,6 @@ struct OptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionsDefaultTypeInternal _Options_default_instance_; } // namespace valhalla namespace valhalla { -bool Costing_Type_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - return true; - default: - return false; - } -} - -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Costing_Type_strings[12] = {}; - -static const char Costing_Type_names[] = - "auto_" - "bicycle" - "bikeshare" - "bus" - "motor_scooter" - "motorcycle" - "multimodal" - "none_" - "pedestrian" - "taxi" - "transit" - "truck"; - -static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Costing_Type_entries[] = { - { {Costing_Type_names + 0, 5}, 10 }, - { {Costing_Type_names + 5, 7}, 1 }, - { {Costing_Type_names + 12, 9}, 11 }, - { {Costing_Type_names + 21, 3}, 2 }, - { {Costing_Type_names + 24, 13}, 3 }, - { {Costing_Type_names + 37, 10}, 8 }, - { {Costing_Type_names + 47, 10}, 4 }, - { {Costing_Type_names + 57, 5}, 0 }, - { {Costing_Type_names + 62, 10}, 5 }, - { {Costing_Type_names + 72, 4}, 9 }, - { {Costing_Type_names + 76, 7}, 6 }, - { {Costing_Type_names + 83, 5}, 7 }, -}; - -static const int Costing_Type_entries_by_number[] = { - 7, // 0 -> none_ - 1, // 1 -> bicycle - 3, // 2 -> bus - 4, // 3 -> motor_scooter - 6, // 4 -> multimodal - 8, // 5 -> pedestrian - 10, // 6 -> transit - 11, // 7 -> truck - 5, // 8 -> motorcycle - 9, // 9 -> taxi - 0, // 10 -> auto_ - 2, // 11 -> bikeshare -}; - -const std::string& Costing_Type_Name( - Costing_Type value) { - static const bool dummy = - ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( - Costing_Type_entries, - Costing_Type_entries_by_number, - 12, Costing_Type_strings); - (void) dummy; - int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( - Costing_Type_entries, - Costing_Type_entries_by_number, - 12, value); - return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : - Costing_Type_strings[idx].get(); -} -bool Costing_Type_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Costing_Type* value) { - int int_value; - bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - Costing_Type_entries, 12, name, &int_value); - if (success) { - *value = static_cast(int_value); - } - return success; -} -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -constexpr Costing_Type Costing::none_; -constexpr Costing_Type Costing::bicycle; -constexpr Costing_Type Costing::bus; -constexpr Costing_Type Costing::motor_scooter; -constexpr Costing_Type Costing::multimodal; -constexpr Costing_Type Costing::pedestrian; -constexpr Costing_Type Costing::transit; -constexpr Costing_Type Costing::truck; -constexpr Costing_Type Costing::motorcycle; -constexpr Costing_Type Costing::taxi; -constexpr Costing_Type Costing::auto_; -constexpr Costing_Type Costing::bikeshare; -constexpr Costing_Type Costing::Type_MIN; -constexpr Costing_Type Costing::Type_MAX; -constexpr int Costing::Type_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) bool Options_Units_IsValid(int value) { switch (value) { case 0: @@ -530,8 +384,8 @@ static const char Options_Action_names[] = "expansion" "height" "isochrone" + "livespeed" "locate" - "no_action" "optimized_route" "route" "sources_to_targets" @@ -541,35 +395,35 @@ static const char Options_Action_names[] = "transit_available"; static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Options_Action_entries[] = { - { {Options_Action_names + 0, 8}, 11 }, - { {Options_Action_names + 8, 9}, 10 }, - { {Options_Action_names + 17, 6}, 8 }, - { {Options_Action_names + 23, 9}, 5 }, - { {Options_Action_names + 32, 6}, 2 }, - { {Options_Action_names + 38, 9}, 0 }, - { {Options_Action_names + 47, 15}, 4 }, - { {Options_Action_names + 62, 5}, 1 }, - { {Options_Action_names + 67, 18}, 3 }, - { {Options_Action_names + 85, 6}, 12 }, - { {Options_Action_names + 91, 16}, 7 }, - { {Options_Action_names + 107, 11}, 6 }, - { {Options_Action_names + 118, 17}, 9 }, + { {Options_Action_names + 0, 8}, 10 }, + { {Options_Action_names + 8, 9}, 9 }, + { {Options_Action_names + 17, 6}, 7 }, + { {Options_Action_names + 23, 9}, 4 }, + { {Options_Action_names + 32, 9}, 12 }, + { {Options_Action_names + 41, 6}, 1 }, + { {Options_Action_names + 47, 15}, 3 }, + { {Options_Action_names + 62, 5}, 0 }, + { {Options_Action_names + 67, 18}, 2 }, + { {Options_Action_names + 85, 6}, 11 }, + { {Options_Action_names + 91, 16}, 6 }, + { {Options_Action_names + 107, 11}, 5 }, + { {Options_Action_names + 118, 17}, 8 }, }; static const int Options_Action_entries_by_number[] = { - 5, // 0 -> no_action - 7, // 1 -> route - 4, // 2 -> locate - 8, // 3 -> sources_to_targets - 6, // 4 -> optimized_route - 3, // 5 -> isochrone - 11, // 6 -> trace_route - 10, // 7 -> trace_attributes - 2, // 8 -> height - 12, // 9 -> transit_available - 1, // 10 -> expansion - 0, // 11 -> centroid - 9, // 12 -> status + 7, // 0 -> route + 5, // 1 -> locate + 8, // 2 -> sources_to_targets + 6, // 3 -> optimized_route + 3, // 4 -> isochrone + 11, // 5 -> trace_route + 10, // 6 -> trace_attributes + 2, // 7 -> height + 12, // 8 -> transit_available + 1, // 9 -> expansion + 0, // 10 -> centroid + 9, // 11 -> status + 4, // 12 -> livespeed }; const std::string& Options_Action_Name( @@ -598,7 +452,6 @@ bool Options_Action_Parse( return success; } #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -constexpr Options_Action Options::no_action; constexpr Options_Action Options::route; constexpr Options_Action Options::locate; constexpr Options_Action Options::sources_to_targets; @@ -611,6 +464,7 @@ constexpr Options_Action Options::transit_available; constexpr Options_Action Options::expansion; constexpr Options_Action Options::centroid; constexpr Options_Action Options::status; +constexpr Options_Action Options::livespeed; constexpr Options_Action Options::Action_MIN; constexpr Options_Action Options::Action_MAX; constexpr int Options::Action_ARRAYSIZE; @@ -621,36 +475,32 @@ bool Options_DateTimeType_IsValid(int value) { case 1: case 2: case 3: - case 4: return true; default: return false; } } -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Options_DateTimeType_strings[5] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Options_DateTimeType_strings[4] = {}; static const char Options_DateTimeType_names[] = "arrive_by" "current" "depart_at" - "invariant" - "no_time"; + "invariant"; static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Options_DateTimeType_entries[] = { - { {Options_DateTimeType_names + 0, 9}, 3 }, - { {Options_DateTimeType_names + 9, 7}, 1 }, - { {Options_DateTimeType_names + 16, 9}, 2 }, - { {Options_DateTimeType_names + 25, 9}, 4 }, - { {Options_DateTimeType_names + 34, 7}, 0 }, + { {Options_DateTimeType_names + 0, 9}, 2 }, + { {Options_DateTimeType_names + 9, 7}, 0 }, + { {Options_DateTimeType_names + 16, 9}, 1 }, + { {Options_DateTimeType_names + 25, 9}, 3 }, }; static const int Options_DateTimeType_entries_by_number[] = { - 4, // 0 -> no_time - 1, // 1 -> current - 2, // 2 -> depart_at - 0, // 3 -> arrive_by - 3, // 4 -> invariant + 1, // 0 -> current + 2, // 1 -> depart_at + 0, // 2 -> arrive_by + 3, // 3 -> invariant }; const std::string& Options_DateTimeType_Name( @@ -659,12 +509,12 @@ const std::string& Options_DateTimeType_Name( ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( Options_DateTimeType_entries, Options_DateTimeType_entries_by_number, - 5, Options_DateTimeType_strings); + 4, Options_DateTimeType_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( Options_DateTimeType_entries, Options_DateTimeType_entries_by_number, - 5, value); + 4, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : Options_DateTimeType_strings[idx].get(); } @@ -672,14 +522,13 @@ bool Options_DateTimeType_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Options_DateTimeType* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - Options_DateTimeType_entries, 5, name, &int_value); + Options_DateTimeType_entries, 4, name, &int_value); if (success) { *value = static_cast(int_value); } return success; } #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -constexpr Options_DateTimeType Options::no_time; constexpr Options_DateTimeType Options::current; constexpr Options_DateTimeType Options::depart_at; constexpr Options_DateTimeType Options::arrive_by; @@ -981,6 +830,97 @@ bool ShapeFormat_Parse( } return success; } +bool Costing_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Costing_strings[12] = {}; + +static const char Costing_names[] = + "auto_" + "bicycle" + "bikeshare" + "bus" + "motor_scooter" + "motorcycle" + "multimodal" + "none_" + "pedestrian" + "taxi" + "transit" + "truck"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Costing_entries[] = { + { {Costing_names + 0, 5}, 0 }, + { {Costing_names + 5, 7}, 1 }, + { {Costing_names + 12, 9}, 11 }, + { {Costing_names + 21, 3}, 2 }, + { {Costing_names + 24, 13}, 3 }, + { {Costing_names + 37, 10}, 8 }, + { {Costing_names + 47, 10}, 4 }, + { {Costing_names + 57, 5}, 10 }, + { {Costing_names + 62, 10}, 5 }, + { {Costing_names + 72, 4}, 9 }, + { {Costing_names + 76, 7}, 6 }, + { {Costing_names + 83, 5}, 7 }, +}; + +static const int Costing_entries_by_number[] = { + 0, // 0 -> auto_ + 1, // 1 -> bicycle + 3, // 2 -> bus + 4, // 3 -> motor_scooter + 6, // 4 -> multimodal + 8, // 5 -> pedestrian + 10, // 6 -> transit + 11, // 7 -> truck + 5, // 8 -> motorcycle + 9, // 9 -> taxi + 7, // 10 -> none_ + 2, // 11 -> bikeshare +}; + +const std::string& Costing_Name( + Costing value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Costing_entries, + Costing_entries_by_number, + 12, Costing_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Costing_entries, + Costing_entries_by_number, + 12, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Costing_strings[idx].get(); +} +bool Costing_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Costing* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Costing_entries, 12, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} // =================================================================== @@ -1346,42 +1286,65 @@ std::string Contour::GetTypeName() const { // =================================================================== -class Ring::_Internal { +class AvoidEdge::_Internal { public: }; -void Ring::clear_coords() { - _impl_.coords_.Clear(); -} -Ring::Ring(::PROTOBUF_NAMESPACE_ID::Arena* arena, +AvoidEdge::AvoidEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.Ring) + // @@protoc_insertion_point(arena_constructor:valhalla.AvoidEdge) } -Ring::Ring(const Ring& from) +AvoidEdge::AvoidEdge(const AvoidEdge& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - Ring* const _this = this; (void)_this; + AvoidEdge* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.coords_){from._impl_.coords_} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_id_){} + , decltype(_impl_.has_percent_along_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:valhalla.Ring) + clear_has_has_id(); + switch (from.has_id_case()) { + case kId: { + _this->_internal_set_id(from._internal_id()); + break; + } + case HAS_ID_NOT_SET: { + break; + } + } + clear_has_has_percent_along(); + switch (from.has_percent_along_case()) { + case kPercentAlong: { + _this->_internal_set_percent_along(from._internal_percent_along()); + break; + } + case HAS_PERCENT_ALONG_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.AvoidEdge) } -inline void Ring::SharedCtor( +inline void AvoidEdge::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.coords_){arena} + decltype(_impl_.has_id_){} + , decltype(_impl_.has_percent_along_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_id(); + clear_has_has_percent_along(); } -Ring::~Ring() { - // @@protoc_insertion_point(destructor:valhalla.Ring) +AvoidEdge::~AvoidEdge() { + // @@protoc_insertion_point(destructor:valhalla.AvoidEdge) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; @@ -1389,41 +1352,79 @@ Ring::~Ring() { SharedDtor(); } -inline void Ring::SharedDtor() { +inline void AvoidEdge::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.coords_.~RepeatedPtrField(); + if (has_has_id()) { + clear_has_id(); + } + if (has_has_percent_along()) { + clear_has_percent_along(); + } } -void Ring::SetCachedSize(int size) const { +void AvoidEdge::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void Ring::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.Ring) +void AvoidEdge::clear_has_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.AvoidEdge) + switch (has_id_case()) { + case kId: { + // No need to clear + break; + } + case HAS_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ID_NOT_SET; +} + +void AvoidEdge::clear_has_percent_along() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.AvoidEdge) + switch (has_percent_along_case()) { + case kPercentAlong: { + // No need to clear + break; + } + case HAS_PERCENT_ALONG_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_PERCENT_ALONG_NOT_SET; +} + + +void AvoidEdge::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.AvoidEdge) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.coords_.Clear(); + clear_has_id(); + clear_has_percent_along(); _internal_metadata_.Clear(); } -const char* Ring::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* AvoidEdge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // repeated .valhalla.LatLng coords = 1; + // uint64 id = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_coords(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _internal_set_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // float percent_along = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + _internal_set_percent_along(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); } else goto handle_unusual; continue; @@ -1450,521 +1451,9 @@ const char* Ring::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #undef CHK_ } -uint8_t* Ring::_InternalSerialize( +uint8_t* AvoidEdge::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.Ring) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .valhalla.LatLng coords = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_coords_size()); i < n; i++) { - const auto& repfield = this->_internal_coords(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.Ring) - return target; -} - -size_t Ring::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.Ring) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .valhalla.LatLng coords = 1; - total_size += 1UL * this->_internal_coords_size(); - for (const auto& msg : this->_impl_.coords_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Ring::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( - &from)); -} - -void Ring::MergeFrom(const Ring& from) { - Ring* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Ring) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.coords_.MergeFrom(from._impl_.coords_); - _this->_internal_metadata_.MergeFrom(from._internal_metadata_); -} - -void Ring::CopyFrom(const Ring& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Ring) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Ring::IsInitialized() const { - return true; -} - -void Ring::InternalSwap(Ring* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.coords_.InternalSwap(&other->_impl_.coords_); -} - -std::string Ring::GetTypeName() const { - return "valhalla.Ring"; -} - - -// =================================================================== - -class PbfFieldSelector::_Internal { - public: -}; - -PbfFieldSelector::PbfFieldSelector(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.PbfFieldSelector) -} -PbfFieldSelector::PbfFieldSelector(const PbfFieldSelector& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - PbfFieldSelector* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.options_){} - , decltype(_impl_.trip_){} - , decltype(_impl_.directions_){} - , decltype(_impl_.status_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&_impl_.options_, &from._impl_.options_, - static_cast(reinterpret_cast(&_impl_.status_) - - reinterpret_cast(&_impl_.options_)) + sizeof(_impl_.status_)); - // @@protoc_insertion_point(copy_constructor:valhalla.PbfFieldSelector) -} - -inline void PbfFieldSelector::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.options_){false} - , decltype(_impl_.trip_){false} - , decltype(_impl_.directions_){false} - , decltype(_impl_.status_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -PbfFieldSelector::~PbfFieldSelector() { - // @@protoc_insertion_point(destructor:valhalla.PbfFieldSelector) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void PbfFieldSelector::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); -} - -void PbfFieldSelector::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void PbfFieldSelector::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.PbfFieldSelector) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&_impl_.options_, 0, static_cast( - reinterpret_cast(&_impl_.status_) - - reinterpret_cast(&_impl_.options_)) + sizeof(_impl_.status_)); - _internal_metadata_.Clear(); -} - -const char* PbfFieldSelector::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // bool options = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.options_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool trip = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.trip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool directions = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.directions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool status = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* PbfFieldSelector::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.PbfFieldSelector) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // bool options = 1; - if (this->_internal_options() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_options(), target); - } - - // bool trip = 2; - if (this->_internal_trip() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_trip(), target); - } - - // bool directions = 3; - if (this->_internal_directions() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_directions(), target); - } - - // bool status = 4; - if (this->_internal_status() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_status(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.PbfFieldSelector) - return target; -} - -size_t PbfFieldSelector::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.PbfFieldSelector) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bool options = 1; - if (this->_internal_options() != 0) { - total_size += 1 + 1; - } - - // bool trip = 2; - if (this->_internal_trip() != 0) { - total_size += 1 + 1; - } - - // bool directions = 3; - if (this->_internal_directions() != 0) { - total_size += 1 + 1; - } - - // bool status = 4; - if (this->_internal_status() != 0) { - total_size += 1 + 1; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void PbfFieldSelector::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( - &from)); -} - -void PbfFieldSelector::MergeFrom(const PbfFieldSelector& from) { - PbfFieldSelector* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.PbfFieldSelector) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (from._internal_options() != 0) { - _this->_internal_set_options(from._internal_options()); - } - if (from._internal_trip() != 0) { - _this->_internal_set_trip(from._internal_trip()); - } - if (from._internal_directions() != 0) { - _this->_internal_set_directions(from._internal_directions()); - } - if (from._internal_status() != 0) { - _this->_internal_set_status(from._internal_status()); - } - _this->_internal_metadata_.MergeFrom(from._internal_metadata_); -} - -void PbfFieldSelector::CopyFrom(const PbfFieldSelector& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.PbfFieldSelector) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool PbfFieldSelector::IsInitialized() const { - return true; -} - -void PbfFieldSelector::InternalSwap(PbfFieldSelector* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(PbfFieldSelector, _impl_.status_) - + sizeof(PbfFieldSelector::_impl_.status_) - - PROTOBUF_FIELD_OFFSET(PbfFieldSelector, _impl_.options_)>( - reinterpret_cast(&_impl_.options_), - reinterpret_cast(&other->_impl_.options_)); -} - -std::string PbfFieldSelector::GetTypeName() const { - return "valhalla.PbfFieldSelector"; -} - - -// =================================================================== - -class AvoidEdge::_Internal { - public: -}; - -AvoidEdge::AvoidEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.AvoidEdge) -} -AvoidEdge::AvoidEdge(const AvoidEdge& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - AvoidEdge* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.has_id_){} - , decltype(_impl_.has_percent_along_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}}; - - _internal_metadata_.MergeFrom(from._internal_metadata_); - clear_has_has_id(); - switch (from.has_id_case()) { - case kId: { - _this->_internal_set_id(from._internal_id()); - break; - } - case HAS_ID_NOT_SET: { - break; - } - } - clear_has_has_percent_along(); - switch (from.has_percent_along_case()) { - case kPercentAlong: { - _this->_internal_set_percent_along(from._internal_percent_along()); - break; - } - case HAS_PERCENT_ALONG_NOT_SET: { - break; - } - } - // @@protoc_insertion_point(copy_constructor:valhalla.AvoidEdge) -} - -inline void AvoidEdge::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.has_id_){} - , decltype(_impl_.has_percent_along_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{} - }; - clear_has_has_id(); - clear_has_has_percent_along(); -} - -AvoidEdge::~AvoidEdge() { - // @@protoc_insertion_point(destructor:valhalla.AvoidEdge) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void AvoidEdge::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_has_id()) { - clear_has_id(); - } - if (has_has_percent_along()) { - clear_has_percent_along(); - } -} - -void AvoidEdge::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void AvoidEdge::clear_has_id() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.AvoidEdge) - switch (has_id_case()) { - case kId: { - // No need to clear - break; - } - case HAS_ID_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = HAS_ID_NOT_SET; -} - -void AvoidEdge::clear_has_percent_along() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.AvoidEdge) - switch (has_percent_along_case()) { - case kPercentAlong: { - // No need to clear - break; - } - case HAS_PERCENT_ALONG_NOT_SET: { - break; - } - } - _impl_._oneof_case_[1] = HAS_PERCENT_ALONG_NOT_SET; -} - - -void AvoidEdge::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.AvoidEdge) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_has_id(); - clear_has_percent_along(); - _internal_metadata_.Clear(); -} - -const char* AvoidEdge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _internal_set_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // float percent_along = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { - _internal_set_percent_along(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); - ptr += sizeof(float); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* AvoidEdge::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.AvoidEdge) + // @@protoc_insertion_point(serialize_to_array_start:valhalla.AvoidEdge) uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -2085,19 +1574,19 @@ std::string AvoidEdge::GetTypeName() const { // =================================================================== -class Costing_Options::_Internal { +class CostingOptions::_Internal { public: }; -Costing_Options::Costing_Options(::PROTOBUF_NAMESPACE_ID::Arena* arena, +CostingOptions::CostingOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.Costing.Options) + // @@protoc_insertion_point(arena_constructor:valhalla.CostingOptions) } -Costing_Options::Costing_Options(const Costing_Options& from) +CostingOptions::CostingOptions(const CostingOptions& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - Costing_Options* const _this = this; (void)_this; + CostingOptions* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.filter_stop_ids_){from._impl_.filter_stop_ids_} , decltype(_impl_.filter_operator_ids_){from._impl_.filter_operator_ids_} @@ -2106,10 +1595,6 @@ Costing_Options::Costing_Options(const Costing_Options& from) , decltype(_impl_.filter_stop_action_){} , decltype(_impl_.filter_operator_action_){} , decltype(_impl_.filter_route_action_){} - , decltype(_impl_.fixed_speed_){} - , decltype(_impl_.axle_count_){} - , decltype(_impl_.use_lit_){} - , decltype(_impl_.disable_hierarchy_pruning_){} , decltype(_impl_.has_maneuver_penalty_){} , decltype(_impl_.has_destination_only_penalty_){} , decltype(_impl_.has_gate_cost_){} @@ -2181,14 +1666,16 @@ Costing_Options::Costing_Options(const Costing_Options& from) , decltype(_impl_.has_include_hov3_){} , decltype(_impl_.has_exclude_cash_only_tolls_){} , decltype(_impl_.has_restriction_probability_){} - , decltype(_impl_.has_elevator_penalty_){} + , decltype(_impl_.has_costing_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_filter_closures_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&_impl_.filter_stop_action_, &from._impl_.filter_stop_action_, - static_cast(reinterpret_cast(&_impl_.disable_hierarchy_pruning_) - - reinterpret_cast(&_impl_.filter_stop_action_)) + sizeof(_impl_.disable_hierarchy_pruning_)); + static_cast(reinterpret_cast(&_impl_.filter_route_action_) - + reinterpret_cast(&_impl_.filter_stop_action_)) + sizeof(_impl_.filter_route_action_)); clear_has_has_maneuver_penalty(); switch (from.has_maneuver_penalty_case()) { case kManeuverPenalty: { @@ -2899,20 +2386,40 @@ Costing_Options::Costing_Options(const Costing_Options& from) break; } } - clear_has_has_elevator_penalty(); - switch (from.has_elevator_penalty_case()) { - case kElevatorPenalty: { - _this->_internal_set_elevator_penalty(from._internal_elevator_penalty()); + clear_has_has_costing(); + switch (from.has_costing_case()) { + case kCosting: { + _this->_internal_set_costing(from._internal_costing()); break; } - case HAS_ELEVATOR_PENALTY_NOT_SET: { + case HAS_COSTING_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:valhalla.Costing.Options) + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + clear_has_has_filter_closures(); + switch (from.has_filter_closures_case()) { + case kFilterClosures: { + _this->_internal_set_filter_closures(from._internal_filter_closures()); + break; + } + case HAS_FILTER_CLOSURES_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.CostingOptions) } -inline void Costing_Options::SharedCtor( +inline void CostingOptions::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; @@ -2924,10 +2431,6 @@ inline void Costing_Options::SharedCtor( , decltype(_impl_.filter_stop_action_){0} , decltype(_impl_.filter_operator_action_){0} , decltype(_impl_.filter_route_action_){0} - , decltype(_impl_.fixed_speed_){0u} - , decltype(_impl_.axle_count_){0u} - , decltype(_impl_.use_lit_){0} - , decltype(_impl_.disable_hierarchy_pruning_){false} , decltype(_impl_.has_maneuver_penalty_){} , decltype(_impl_.has_destination_only_penalty_){} , decltype(_impl_.has_gate_cost_){} @@ -2999,7 +2502,9 @@ inline void Costing_Options::SharedCtor( , decltype(_impl_.has_include_hov3_){} , decltype(_impl_.has_exclude_cash_only_tolls_){} , decltype(_impl_.has_restriction_probability_){} - , decltype(_impl_.has_elevator_penalty_){} + , decltype(_impl_.has_costing_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_filter_closures_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; @@ -3074,11 +2579,13 @@ inline void Costing_Options::SharedCtor( clear_has_has_include_hov3(); clear_has_has_exclude_cash_only_tolls(); clear_has_has_restriction_probability(); - clear_has_has_elevator_penalty(); + clear_has_has_costing(); + clear_has_has_name(); + clear_has_has_filter_closures(); } -Costing_Options::~Costing_Options() { - // @@protoc_insertion_point(destructor:valhalla.Costing.Options) +CostingOptions::~CostingOptions() { + // @@protoc_insertion_point(destructor:valhalla.CostingOptions) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; @@ -3086,7 +2593,7 @@ Costing_Options::~Costing_Options() { SharedDtor(); } -inline void Costing_Options::SharedDtor() { +inline void CostingOptions::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.filter_stop_ids_.~RepeatedPtrField(); _impl_.filter_operator_ids_.~RepeatedPtrField(); @@ -3305,17 +2812,23 @@ inline void Costing_Options::SharedDtor() { if (has_has_restriction_probability()) { clear_has_restriction_probability(); } - if (has_has_elevator_penalty()) { - clear_has_elevator_penalty(); + if (has_has_costing()) { + clear_has_costing(); + } + if (has_has_name()) { + clear_has_name(); + } + if (has_has_filter_closures()) { + clear_has_filter_closures(); } } -void Costing_Options::SetCachedSize(int size) const { +void CostingOptions::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void Costing_Options::clear_has_maneuver_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_maneuver_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_maneuver_penalty_case()) { case kManeuverPenalty: { // No need to clear @@ -3328,8 +2841,8 @@ void Costing_Options::clear_has_maneuver_penalty() { _impl_._oneof_case_[0] = HAS_MANEUVER_PENALTY_NOT_SET; } -void Costing_Options::clear_has_destination_only_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_destination_only_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_destination_only_penalty_case()) { case kDestinationOnlyPenalty: { // No need to clear @@ -3342,8 +2855,8 @@ void Costing_Options::clear_has_destination_only_penalty() { _impl_._oneof_case_[1] = HAS_DESTINATION_ONLY_PENALTY_NOT_SET; } -void Costing_Options::clear_has_gate_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_gate_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_gate_cost_case()) { case kGateCost: { // No need to clear @@ -3356,8 +2869,8 @@ void Costing_Options::clear_has_gate_cost() { _impl_._oneof_case_[2] = HAS_GATE_COST_NOT_SET; } -void Costing_Options::clear_has_gate_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_gate_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_gate_penalty_case()) { case kGatePenalty: { // No need to clear @@ -3370,8 +2883,8 @@ void Costing_Options::clear_has_gate_penalty() { _impl_._oneof_case_[3] = HAS_GATE_PENALTY_NOT_SET; } -void Costing_Options::clear_has_toll_booth_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_toll_booth_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_toll_booth_cost_case()) { case kTollBoothCost: { // No need to clear @@ -3384,8 +2897,8 @@ void Costing_Options::clear_has_toll_booth_cost() { _impl_._oneof_case_[4] = HAS_TOLL_BOOTH_COST_NOT_SET; } -void Costing_Options::clear_has_toll_booth_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_toll_booth_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_toll_booth_penalty_case()) { case kTollBoothPenalty: { // No need to clear @@ -3398,8 +2911,8 @@ void Costing_Options::clear_has_toll_booth_penalty() { _impl_._oneof_case_[5] = HAS_TOLL_BOOTH_PENALTY_NOT_SET; } -void Costing_Options::clear_has_alley_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_alley_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_alley_penalty_case()) { case kAlleyPenalty: { // No need to clear @@ -3412,8 +2925,8 @@ void Costing_Options::clear_has_alley_penalty() { _impl_._oneof_case_[6] = HAS_ALLEY_PENALTY_NOT_SET; } -void Costing_Options::clear_has_country_crossing_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_country_crossing_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_country_crossing_cost_case()) { case kCountryCrossingCost: { // No need to clear @@ -3426,8 +2939,8 @@ void Costing_Options::clear_has_country_crossing_cost() { _impl_._oneof_case_[7] = HAS_COUNTRY_CROSSING_COST_NOT_SET; } -void Costing_Options::clear_has_country_crossing_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_country_crossing_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_country_crossing_penalty_case()) { case kCountryCrossingPenalty: { // No need to clear @@ -3440,8 +2953,8 @@ void Costing_Options::clear_has_country_crossing_penalty() { _impl_._oneof_case_[8] = HAS_COUNTRY_CROSSING_PENALTY_NOT_SET; } -void Costing_Options::clear_has_ferry_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_ferry_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_ferry_cost_case()) { case kFerryCost: { // No need to clear @@ -3454,8 +2967,8 @@ void Costing_Options::clear_has_ferry_cost() { _impl_._oneof_case_[9] = HAS_FERRY_COST_NOT_SET; } -void Costing_Options::clear_has_avoid_bad_surfaces() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_avoid_bad_surfaces() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_avoid_bad_surfaces_case()) { case kAvoidBadSurfaces: { // No need to clear @@ -3468,8 +2981,8 @@ void Costing_Options::clear_has_avoid_bad_surfaces() { _impl_._oneof_case_[10] = HAS_AVOID_BAD_SURFACES_NOT_SET; } -void Costing_Options::clear_has_use_ferry() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_ferry() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_ferry_case()) { case kUseFerry: { // No need to clear @@ -3482,8 +2995,8 @@ void Costing_Options::clear_has_use_ferry() { _impl_._oneof_case_[11] = HAS_USE_FERRY_NOT_SET; } -void Costing_Options::clear_has_use_highways() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_highways() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_highways_case()) { case kUseHighways: { // No need to clear @@ -3496,8 +3009,8 @@ void Costing_Options::clear_has_use_highways() { _impl_._oneof_case_[12] = HAS_USE_HIGHWAYS_NOT_SET; } -void Costing_Options::clear_has_use_tolls() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_tolls() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_tolls_case()) { case kUseTolls: { // No need to clear @@ -3510,8 +3023,8 @@ void Costing_Options::clear_has_use_tolls() { _impl_._oneof_case_[13] = HAS_USE_TOLLS_NOT_SET; } -void Costing_Options::clear_has_use_roads() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_roads() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_roads_case()) { case kUseRoads: { // No need to clear @@ -3524,8 +3037,8 @@ void Costing_Options::clear_has_use_roads() { _impl_._oneof_case_[14] = HAS_USE_ROADS_NOT_SET; } -void Costing_Options::clear_has_max_distance() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_max_distance() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_max_distance_case()) { case kMaxDistance: { // No need to clear @@ -3538,8 +3051,8 @@ void Costing_Options::clear_has_max_distance() { _impl_._oneof_case_[15] = HAS_MAX_DISTANCE_NOT_SET; } -void Costing_Options::clear_has_walking_speed() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_walking_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_walking_speed_case()) { case kWalkingSpeed: { // No need to clear @@ -3552,8 +3065,8 @@ void Costing_Options::clear_has_walking_speed() { _impl_._oneof_case_[16] = HAS_WALKING_SPEED_NOT_SET; } -void Costing_Options::clear_has_step_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_step_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_step_penalty_case()) { case kStepPenalty: { // No need to clear @@ -3566,8 +3079,8 @@ void Costing_Options::clear_has_step_penalty() { _impl_._oneof_case_[17] = HAS_STEP_PENALTY_NOT_SET; } -void Costing_Options::clear_has_max_grade() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_max_grade() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_max_grade_case()) { case kMaxGrade: { // No need to clear @@ -3580,8 +3093,8 @@ void Costing_Options::clear_has_max_grade() { _impl_._oneof_case_[18] = HAS_MAX_GRADE_NOT_SET; } -void Costing_Options::clear_has_max_hiking_difficulty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_max_hiking_difficulty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_max_hiking_difficulty_case()) { case kMaxHikingDifficulty: { // No need to clear @@ -3594,8 +3107,8 @@ void Costing_Options::clear_has_max_hiking_difficulty() { _impl_._oneof_case_[19] = HAS_MAX_HIKING_DIFFICULTY_NOT_SET; } -void Costing_Options::clear_has_mode_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_mode_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_mode_factor_case()) { case kModeFactor: { // No need to clear @@ -3608,8 +3121,8 @@ void Costing_Options::clear_has_mode_factor() { _impl_._oneof_case_[20] = HAS_MODE_FACTOR_NOT_SET; } -void Costing_Options::clear_has_walkway_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_walkway_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_walkway_factor_case()) { case kWalkwayFactor: { // No need to clear @@ -3622,8 +3135,8 @@ void Costing_Options::clear_has_walkway_factor() { _impl_._oneof_case_[21] = HAS_WALKWAY_FACTOR_NOT_SET; } -void Costing_Options::clear_has_sidewalk_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_sidewalk_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_sidewalk_factor_case()) { case kSidewalkFactor: { // No need to clear @@ -3636,8 +3149,8 @@ void Costing_Options::clear_has_sidewalk_factor() { _impl_._oneof_case_[22] = HAS_SIDEWALK_FACTOR_NOT_SET; } -void Costing_Options::clear_has_alley_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_alley_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_alley_factor_case()) { case kAlleyFactor: { // No need to clear @@ -3650,8 +3163,8 @@ void Costing_Options::clear_has_alley_factor() { _impl_._oneof_case_[23] = HAS_ALLEY_FACTOR_NOT_SET; } -void Costing_Options::clear_has_driveway_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_driveway_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_driveway_factor_case()) { case kDrivewayFactor: { // No need to clear @@ -3664,8 +3177,8 @@ void Costing_Options::clear_has_driveway_factor() { _impl_._oneof_case_[24] = HAS_DRIVEWAY_FACTOR_NOT_SET; } -void Costing_Options::clear_has_driveway_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_driveway_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_driveway_penalty_case()) { case kDrivewayPenalty: { // No need to clear @@ -3678,8 +3191,8 @@ void Costing_Options::clear_has_driveway_penalty() { _impl_._oneof_case_[25] = HAS_DRIVEWAY_PENALTY_NOT_SET; } -void Costing_Options::clear_has_transit_start_end_max_distance() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_transit_start_end_max_distance() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_transit_start_end_max_distance_case()) { case kTransitStartEndMaxDistance: { // No need to clear @@ -3692,8 +3205,8 @@ void Costing_Options::clear_has_transit_start_end_max_distance() { _impl_._oneof_case_[26] = HAS_TRANSIT_START_END_MAX_DISTANCE_NOT_SET; } -void Costing_Options::clear_has_transit_transfer_max_distance() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_transit_transfer_max_distance() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_transit_transfer_max_distance_case()) { case kTransitTransferMaxDistance: { // No need to clear @@ -3706,8 +3219,8 @@ void Costing_Options::clear_has_transit_transfer_max_distance() { _impl_._oneof_case_[27] = HAS_TRANSIT_TRANSFER_MAX_DISTANCE_NOT_SET; } -void Costing_Options::clear_has_transport_type() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_transport_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_transport_type_case()) { case kTransportType: { _impl_.has_transport_type_.transport_type_.Destroy(); @@ -3720,8 +3233,8 @@ void Costing_Options::clear_has_transport_type() { _impl_._oneof_case_[28] = HAS_TRANSPORT_TYPE_NOT_SET; } -void Costing_Options::clear_has_top_speed() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_top_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_top_speed_case()) { case kTopSpeed: { // No need to clear @@ -3734,8 +3247,8 @@ void Costing_Options::clear_has_top_speed() { _impl_._oneof_case_[29] = HAS_TOP_SPEED_NOT_SET; } -void Costing_Options::clear_has_use_hills() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_hills() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_hills_case()) { case kUseHills: { // No need to clear @@ -3748,8 +3261,8 @@ void Costing_Options::clear_has_use_hills() { _impl_._oneof_case_[30] = HAS_USE_HILLS_NOT_SET; } -void Costing_Options::clear_has_use_primary() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_primary() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_primary_case()) { case kUsePrimary: { // No need to clear @@ -3762,8 +3275,8 @@ void Costing_Options::clear_has_use_primary() { _impl_._oneof_case_[31] = HAS_USE_PRIMARY_NOT_SET; } -void Costing_Options::clear_has_use_trails() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_trails() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_trails_case()) { case kUseTrails: { // No need to clear @@ -3776,8 +3289,8 @@ void Costing_Options::clear_has_use_trails() { _impl_._oneof_case_[32] = HAS_USE_TRAILS_NOT_SET; } -void Costing_Options::clear_has_low_class_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_low_class_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_low_class_penalty_case()) { case kLowClassPenalty: { // No need to clear @@ -3790,8 +3303,8 @@ void Costing_Options::clear_has_low_class_penalty() { _impl_._oneof_case_[33] = HAS_LOW_CLASS_PENALTY_NOT_SET; } -void Costing_Options::clear_has_hazmat() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_hazmat() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_hazmat_case()) { case kHazmat: { // No need to clear @@ -3804,8 +3317,8 @@ void Costing_Options::clear_has_hazmat() { _impl_._oneof_case_[34] = HAS_HAZMAT_NOT_SET; } -void Costing_Options::clear_has_weight() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_weight() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_weight_case()) { case kWeight: { // No need to clear @@ -3818,8 +3331,8 @@ void Costing_Options::clear_has_weight() { _impl_._oneof_case_[35] = HAS_WEIGHT_NOT_SET; } -void Costing_Options::clear_has_axle_load() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_axle_load() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_axle_load_case()) { case kAxleLoad: { // No need to clear @@ -3832,8 +3345,8 @@ void Costing_Options::clear_has_axle_load() { _impl_._oneof_case_[36] = HAS_AXLE_LOAD_NOT_SET; } -void Costing_Options::clear_has_height() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_height() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_height_case()) { case kHeight: { // No need to clear @@ -3846,8 +3359,8 @@ void Costing_Options::clear_has_height() { _impl_._oneof_case_[37] = HAS_HEIGHT_NOT_SET; } -void Costing_Options::clear_has_width() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_width() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_width_case()) { case kWidth: { // No need to clear @@ -3860,8 +3373,8 @@ void Costing_Options::clear_has_width() { _impl_._oneof_case_[38] = HAS_WIDTH_NOT_SET; } -void Costing_Options::clear_has_length() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_length() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_length_case()) { case kLength: { // No need to clear @@ -3874,8 +3387,8 @@ void Costing_Options::clear_has_length() { _impl_._oneof_case_[39] = HAS_LENGTH_NOT_SET; } -void Costing_Options::clear_has_cycling_speed() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_cycling_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_cycling_speed_case()) { case kCyclingSpeed: { // No need to clear @@ -3888,8 +3401,8 @@ void Costing_Options::clear_has_cycling_speed() { _impl_._oneof_case_[40] = HAS_CYCLING_SPEED_NOT_SET; } -void Costing_Options::clear_has_wheelchair() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_wheelchair() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_wheelchair_case()) { case kWheelchair: { // No need to clear @@ -3902,8 +3415,8 @@ void Costing_Options::clear_has_wheelchair() { _impl_._oneof_case_[41] = HAS_WHEELCHAIR_NOT_SET; } -void Costing_Options::clear_has_bicycle() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_bicycle() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_bicycle_case()) { case kBicycle: { // No need to clear @@ -3916,8 +3429,8 @@ void Costing_Options::clear_has_bicycle() { _impl_._oneof_case_[42] = HAS_BICYCLE_NOT_SET; } -void Costing_Options::clear_has_use_bus() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_bus() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_bus_case()) { case kUseBus: { // No need to clear @@ -3930,8 +3443,8 @@ void Costing_Options::clear_has_use_bus() { _impl_._oneof_case_[43] = HAS_USE_BUS_NOT_SET; } -void Costing_Options::clear_has_use_rail() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_rail() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_rail_case()) { case kUseRail: { // No need to clear @@ -3944,8 +3457,8 @@ void Costing_Options::clear_has_use_rail() { _impl_._oneof_case_[44] = HAS_USE_RAIL_NOT_SET; } -void Costing_Options::clear_has_use_transfers() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_transfers() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_transfers_case()) { case kUseTransfers: { // No need to clear @@ -3958,8 +3471,8 @@ void Costing_Options::clear_has_use_transfers() { _impl_._oneof_case_[45] = HAS_USE_TRANSFERS_NOT_SET; } -void Costing_Options::clear_has_transfer_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_transfer_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_transfer_cost_case()) { case kTransferCost: { // No need to clear @@ -3972,8 +3485,8 @@ void Costing_Options::clear_has_transfer_cost() { _impl_._oneof_case_[46] = HAS_TRANSFER_COST_NOT_SET; } -void Costing_Options::clear_has_transfer_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_transfer_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_transfer_penalty_case()) { case kTransferPenalty: { // No need to clear @@ -3986,8 +3499,8 @@ void Costing_Options::clear_has_transfer_penalty() { _impl_._oneof_case_[47] = HAS_TRANSFER_PENALTY_NOT_SET; } -void Costing_Options::clear_has_flow_mask() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_flow_mask() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_flow_mask_case()) { case kFlowMask: { // No need to clear @@ -4000,8 +3513,8 @@ void Costing_Options::clear_has_flow_mask() { _impl_._oneof_case_[48] = HAS_FLOW_MASK_NOT_SET; } -void Costing_Options::clear_has_bike_share_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_bike_share_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_bike_share_cost_case()) { case kBikeShareCost: { // No need to clear @@ -4014,8 +3527,8 @@ void Costing_Options::clear_has_bike_share_cost() { _impl_._oneof_case_[49] = HAS_BIKE_SHARE_COST_NOT_SET; } -void Costing_Options::clear_has_bike_share_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_bike_share_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_bike_share_penalty_case()) { case kBikeSharePenalty: { // No need to clear @@ -4028,8 +3541,8 @@ void Costing_Options::clear_has_bike_share_penalty() { _impl_._oneof_case_[50] = HAS_BIKE_SHARE_PENALTY_NOT_SET; } -void Costing_Options::clear_has_rail_ferry_cost() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_rail_ferry_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_rail_ferry_cost_case()) { case kRailFerryCost: { // No need to clear @@ -4042,8 +3555,8 @@ void Costing_Options::clear_has_rail_ferry_cost() { _impl_._oneof_case_[51] = HAS_RAIL_FERRY_COST_NOT_SET; } -void Costing_Options::clear_has_use_rail_ferry() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_rail_ferry() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_rail_ferry_case()) { case kUseRailFerry: { // No need to clear @@ -4056,8 +3569,8 @@ void Costing_Options::clear_has_use_rail_ferry() { _impl_._oneof_case_[52] = HAS_USE_RAIL_FERRY_NOT_SET; } -void Costing_Options::clear_has_ignore_restrictions() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_ignore_restrictions() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_ignore_restrictions_case()) { case kIgnoreRestrictions: { // No need to clear @@ -4070,8 +3583,8 @@ void Costing_Options::clear_has_ignore_restrictions() { _impl_._oneof_case_[53] = HAS_IGNORE_RESTRICTIONS_NOT_SET; } -void Costing_Options::clear_has_ignore_oneways() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_ignore_oneways() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_ignore_oneways_case()) { case kIgnoreOneways: { // No need to clear @@ -4084,8 +3597,8 @@ void Costing_Options::clear_has_ignore_oneways() { _impl_._oneof_case_[54] = HAS_IGNORE_ONEWAYS_NOT_SET; } -void Costing_Options::clear_has_ignore_access() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_ignore_access() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_ignore_access_case()) { case kIgnoreAccess: { // No need to clear @@ -4098,8 +3611,8 @@ void Costing_Options::clear_has_ignore_access() { _impl_._oneof_case_[55] = HAS_IGNORE_ACCESS_NOT_SET; } -void Costing_Options::clear_has_ignore_closures() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_ignore_closures() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_ignore_closures_case()) { case kIgnoreClosures: { // No need to clear @@ -4112,8 +3625,8 @@ void Costing_Options::clear_has_ignore_closures() { _impl_._oneof_case_[56] = HAS_IGNORE_CLOSURES_NOT_SET; } -void Costing_Options::clear_has_shortest() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_shortest() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_shortest_case()) { case kShortest: { // No need to clear @@ -4126,8 +3639,8 @@ void Costing_Options::clear_has_shortest() { _impl_._oneof_case_[57] = HAS_SHORTEST_NOT_SET; } -void Costing_Options::clear_has_service_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_service_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_service_penalty_case()) { case kServicePenalty: { // No need to clear @@ -4140,8 +3653,8 @@ void Costing_Options::clear_has_service_penalty() { _impl_._oneof_case_[58] = HAS_SERVICE_PENALTY_NOT_SET; } -void Costing_Options::clear_has_use_tracks() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_tracks() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_tracks_case()) { case kUseTracks: { // No need to clear @@ -4154,8 +3667,8 @@ void Costing_Options::clear_has_use_tracks() { _impl_._oneof_case_[59] = HAS_USE_TRACKS_NOT_SET; } -void Costing_Options::clear_has_use_distance() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_distance() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_distance_case()) { case kUseDistance: { // No need to clear @@ -4168,8 +3681,8 @@ void Costing_Options::clear_has_use_distance() { _impl_._oneof_case_[60] = HAS_USE_DISTANCE_NOT_SET; } -void Costing_Options::clear_has_use_living_streets() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_use_living_streets() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_use_living_streets_case()) { case kUseLivingStreets: { // No need to clear @@ -4182,8 +3695,8 @@ void Costing_Options::clear_has_use_living_streets() { _impl_._oneof_case_[61] = HAS_USE_LIVING_STREETS_NOT_SET; } -void Costing_Options::clear_has_service_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_service_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_service_factor_case()) { case kServiceFactor: { // No need to clear @@ -4196,8 +3709,8 @@ void Costing_Options::clear_has_service_factor() { _impl_._oneof_case_[62] = HAS_SERVICE_FACTOR_NOT_SET; } -void Costing_Options::clear_has_closure_factor() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_closure_factor() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_closure_factor_case()) { case kClosureFactor: { // No need to clear @@ -4210,8 +3723,8 @@ void Costing_Options::clear_has_closure_factor() { _impl_._oneof_case_[63] = HAS_CLOSURE_FACTOR_NOT_SET; } -void Costing_Options::clear_has_private_access_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_private_access_penalty() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_private_access_penalty_case()) { case kPrivateAccessPenalty: { // No need to clear @@ -4224,8 +3737,8 @@ void Costing_Options::clear_has_private_access_penalty() { _impl_._oneof_case_[64] = HAS_PRIVATE_ACCESS_PENALTY_NOT_SET; } -void Costing_Options::clear_has_exclude_unpaved() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_exclude_unpaved() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_exclude_unpaved_case()) { case kExcludeUnpaved: { // No need to clear @@ -4238,8 +3751,8 @@ void Costing_Options::clear_has_exclude_unpaved() { _impl_._oneof_case_[65] = HAS_EXCLUDE_UNPAVED_NOT_SET; } -void Costing_Options::clear_has_include_hot() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_include_hot() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_include_hot_case()) { case kIncludeHot: { // No need to clear @@ -4252,8 +3765,8 @@ void Costing_Options::clear_has_include_hot() { _impl_._oneof_case_[66] = HAS_INCLUDE_HOT_NOT_SET; } -void Costing_Options::clear_has_include_hov2() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_include_hov2() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_include_hov2_case()) { case kIncludeHov2: { // No need to clear @@ -4266,8 +3779,8 @@ void Costing_Options::clear_has_include_hov2() { _impl_._oneof_case_[67] = HAS_INCLUDE_HOV2_NOT_SET; } -void Costing_Options::clear_has_include_hov3() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_include_hov3() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_include_hov3_case()) { case kIncludeHov3: { // No need to clear @@ -4280,8 +3793,8 @@ void Costing_Options::clear_has_include_hov3() { _impl_._oneof_case_[68] = HAS_INCLUDE_HOV3_NOT_SET; } -void Costing_Options::clear_has_exclude_cash_only_tolls() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_exclude_cash_only_tolls() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_exclude_cash_only_tolls_case()) { case kExcludeCashOnlyTolls: { // No need to clear @@ -4294,8 +3807,8 @@ void Costing_Options::clear_has_exclude_cash_only_tolls() { _impl_._oneof_case_[69] = HAS_EXCLUDE_CASH_ONLY_TOLLS_NOT_SET; } -void Costing_Options::clear_has_restriction_probability() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) +void CostingOptions::clear_has_restriction_probability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) switch (has_restriction_probability_case()) { case kRestrictionProbability: { // No need to clear @@ -4308,23 +3821,51 @@ void Costing_Options::clear_has_restriction_probability() { _impl_._oneof_case_[70] = HAS_RESTRICTION_PROBABILITY_NOT_SET; } -void Costing_Options::clear_has_elevator_penalty() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing.Options) - switch (has_elevator_penalty_case()) { - case kElevatorPenalty: { +void CostingOptions::clear_has_costing() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) + switch (has_costing_case()) { + case kCosting: { + // No need to clear + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[71] = HAS_COSTING_NOT_SET; +} + +void CostingOptions::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[72] = HAS_NAME_NOT_SET; +} + +void CostingOptions::clear_has_filter_closures() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.CostingOptions) + switch (has_filter_closures_case()) { + case kFilterClosures: { // No need to clear break; } - case HAS_ELEVATOR_PENALTY_NOT_SET: { + case HAS_FILTER_CLOSURES_NOT_SET: { break; } } - _impl_._oneof_case_[71] = HAS_ELEVATOR_PENALTY_NOT_SET; + _impl_._oneof_case_[73] = HAS_FILTER_CLOSURES_NOT_SET; } -void Costing_Options::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.Costing.Options) +void CostingOptions::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.CostingOptions) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4334,8 +3875,8 @@ void Costing_Options::Clear() { _impl_.filter_route_ids_.Clear(); _impl_.exclude_edges_.Clear(); ::memset(&_impl_.filter_stop_action_, 0, static_cast( - reinterpret_cast(&_impl_.disable_hierarchy_pruning_) - - reinterpret_cast(&_impl_.filter_stop_action_)) + sizeof(_impl_.disable_hierarchy_pruning_)); + reinterpret_cast(&_impl_.filter_route_action_) - + reinterpret_cast(&_impl_.filter_stop_action_)) + sizeof(_impl_.filter_route_action_)); clear_has_maneuver_penalty(); clear_has_destination_only_penalty(); clear_has_gate_cost(); @@ -4407,11 +3948,13 @@ void Costing_Options::Clear() { clear_has_include_hov3(); clear_has_exclude_cash_only_tolls(); clear_has_restriction_probability(); - clear_has_elevator_penalty(); + clear_has_costing(); + clear_has_name(); + clear_has_filter_closures(); _internal_metadata_.Clear(); } -const char* Costing_Options::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* CostingOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; @@ -5059,55 +4602,42 @@ const char* Costing_Options::_InternalParse(const char* ptr, ::_pbi::ParseContex } else goto handle_unusual; continue; - // repeated .valhalla.AvoidEdge exclude_edges = 78; - case 78: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { - ptr -= 2; - do { - ptr += 2; - ptr = ctx->ParseMessage(_internal_add_exclude_edges(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<626>(ptr)); - } else - goto handle_unusual; - continue; - // float elevator_penalty = 79; - case 79: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 125)) { - _internal_set_elevator_penalty(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); - ptr += sizeof(float); - } else - goto handle_unusual; - continue; - // uint32 fixed_speed = 80; - case 80: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { - _impl_.fixed_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + // .valhalla.Costing costing = 90; + case 90: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 208)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); + _internal_set_costing(static_cast<::valhalla::Costing>(val)); } else goto handle_unusual; continue; - // uint32 axle_count = 81; - case 81: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _impl_.axle_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + // string name = 91; + case 91: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 218)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); } else goto handle_unusual; continue; - // float use_lit = 82; - case 82: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 149)) { - _impl_.use_lit_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); + // repeated .valhalla.AvoidEdge exclude_edges = 92; + case 92: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 226)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_exclude_edges(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<738>(ptr)); } else goto handle_unusual; continue; - // bool disable_hierarchy_pruning = 83; - case 83: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 152)) { - _impl_.disable_hierarchy_pruning_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + // bool filter_closures = 93; + case 93: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 232)) { + _internal_set_filter_closures(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -5135,9 +4665,9 @@ const char* Costing_Options::_InternalParse(const char* ptr, ::_pbi::ParseContex #undef CHK_ } -uint8_t* Costing_Options::_InternalSerialize( +uint8_t* CostingOptions::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.Costing.Options) + // @@protoc_insertion_point(serialize_to_array_start:valhalla.CostingOptions) uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -5314,7 +4844,7 @@ uint8_t* Costing_Options::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_transport_type().data(), static_cast(this->_internal_transport_type().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Costing.Options.transport_type"); + "valhalla.CostingOptions.transport_type"); target = stream->WriteStringMaybeAliased( 29, this->_internal_transport_type(), target); } @@ -5446,7 +4976,7 @@ uint8_t* Costing_Options::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Costing.Options.filter_stop_ids"); + "valhalla.CostingOptions.filter_stop_ids"); target = stream->WriteString(50, s, target); } @@ -5463,7 +4993,7 @@ uint8_t* Costing_Options::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Costing.Options.filter_operator_ids"); + "valhalla.CostingOptions.filter_operator_ids"); target = stream->WriteString(52, s, target); } @@ -5480,7 +5010,7 @@ uint8_t* Costing_Options::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( s.data(), static_cast(s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Costing.Options.filter_route_ids"); + "valhalla.CostingOptions.filter_route_ids"); target = stream->WriteString(54, s, target); } @@ -5622,58 +5152,47 @@ uint8_t* Costing_Options::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteUInt32ToArray(77, this->_internal_restriction_probability(), target); } - // repeated .valhalla.AvoidEdge exclude_edges = 78; - for (unsigned i = 0, - n = static_cast(this->_internal_exclude_edges_size()); i < n; i++) { - const auto& repfield = this->_internal_exclude_edges(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(78, repfield, repfield.GetCachedSize(), target, stream); - } - - // float elevator_penalty = 79; - if (_internal_has_elevator_penalty()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray(79, this->_internal_elevator_penalty(), target); - } - - // uint32 fixed_speed = 80; - if (this->_internal_fixed_speed() != 0) { + // .valhalla.Costing costing = 90; + if (_internal_has_costing()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(80, this->_internal_fixed_speed(), target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 90, this->_internal_costing(), target); } - // uint32 axle_count = 81; - if (this->_internal_axle_count() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(81, this->_internal_axle_count(), target); + // string name = 91; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.CostingOptions.name"); + target = stream->WriteStringMaybeAliased( + 91, this->_internal_name(), target); } - // float use_lit = 82; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_use_lit = this->_internal_use_lit(); - uint32_t raw_use_lit; - memcpy(&raw_use_lit, &tmp_use_lit, sizeof(tmp_use_lit)); - if (raw_use_lit != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray(82, this->_internal_use_lit(), target); + // repeated .valhalla.AvoidEdge exclude_edges = 92; + for (unsigned i = 0, + n = static_cast(this->_internal_exclude_edges_size()); i < n; i++) { + const auto& repfield = this->_internal_exclude_edges(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(92, repfield, repfield.GetCachedSize(), target, stream); } - // bool disable_hierarchy_pruning = 83; - if (this->_internal_disable_hierarchy_pruning() != 0) { + // bool filter_closures = 93; + if (_internal_has_filter_closures()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(83, this->_internal_disable_hierarchy_pruning(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(93, this->_internal_filter_closures(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.Costing.Options) + // @@protoc_insertion_point(serialize_to_array_end:valhalla.CostingOptions) return target; } -size_t Costing_Options::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.Costing.Options) +size_t CostingOptions::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:valhalla.CostingOptions) size_t total_size = 0; uint32_t cached_has_bits = 0; @@ -5704,7 +5223,7 @@ size_t Costing_Options::ByteSizeLong() const { _impl_.filter_route_ids_.Get(i)); } - // repeated .valhalla.AvoidEdge exclude_edges = 78; + // repeated .valhalla.AvoidEdge exclude_edges = 92; total_size += 2UL * this->_internal_exclude_edges_size(); for (const auto& msg : this->_impl_.exclude_edges_) { total_size += @@ -5729,34 +5248,6 @@ size_t Costing_Options::ByteSizeLong() const { ::_pbi::WireFormatLite::EnumSize(this->_internal_filter_route_action()); } - // uint32 fixed_speed = 80; - if (this->_internal_fixed_speed() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_fixed_speed()); - } - - // uint32 axle_count = 81; - if (this->_internal_axle_count() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_axle_count()); - } - - // float use_lit = 82; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_use_lit = this->_internal_use_lit(); - uint32_t raw_use_lit; - memcpy(&raw_use_lit, &tmp_use_lit, sizeof(tmp_use_lit)); - if (raw_use_lit != 0) { - total_size += 2 + 4; - } - - // bool disable_hierarchy_pruning = 83; - if (this->_internal_disable_hierarchy_pruning() != 0) { - total_size += 2 + 1; - } - switch (has_maneuver_penalty_case()) { // float maneuver_penalty = 1; case kManeuverPenalty: { @@ -6483,13 +5974,36 @@ size_t Costing_Options::ByteSizeLong() const { break; } } - switch (has_elevator_penalty_case()) { - // float elevator_penalty = 79; - case kElevatorPenalty: { - total_size += 2 + 4; + switch (has_costing_case()) { + // .valhalla.Costing costing = 90; + case kCosting: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_costing()); + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + switch (has_name_case()) { + // string name = 91; + case kName: { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + switch (has_filter_closures_case()) { + // bool filter_closures = 93; + case kFilterClosures: { + total_size += 2 + 1; break; } - case HAS_ELEVATOR_PENALTY_NOT_SET: { + case HAS_FILTER_CLOSURES_NOT_SET: { break; } } @@ -6501,15 +6015,15 @@ size_t Costing_Options::ByteSizeLong() const { return total_size; } -void Costing_Options::CheckTypeAndMergeFrom( +void CostingOptions::CheckTypeAndMergeFrom( const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( + MergeFrom(*::_pbi::DownCast( &from)); } -void Costing_Options::MergeFrom(const Costing_Options& from) { - Costing_Options* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Costing.Options) +void CostingOptions::MergeFrom(const CostingOptions& from) { + CostingOptions* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.CostingOptions) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; @@ -6527,22 +6041,6 @@ void Costing_Options::MergeFrom(const Costing_Options& from) { if (from._internal_filter_route_action() != 0) { _this->_internal_set_filter_route_action(from._internal_filter_route_action()); } - if (from._internal_fixed_speed() != 0) { - _this->_internal_set_fixed_speed(from._internal_fixed_speed()); - } - if (from._internal_axle_count() != 0) { - _this->_internal_set_axle_count(from._internal_axle_count()); - } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_use_lit = from._internal_use_lit(); - uint32_t raw_use_lit; - memcpy(&raw_use_lit, &tmp_use_lit, sizeof(tmp_use_lit)); - if (raw_use_lit != 0) { - _this->_internal_set_use_lit(from._internal_use_lit()); - } - if (from._internal_disable_hierarchy_pruning() != 0) { - _this->_internal_set_disable_hierarchy_pruning(from._internal_disable_hierarchy_pruning()); - } switch (from.has_maneuver_penalty_case()) { case kManeuverPenalty: { _this->_internal_set_maneuver_penalty(from._internal_maneuver_penalty()); @@ -7178,34 +6676,52 @@ void Costing_Options::MergeFrom(const Costing_Options& from) { _this->_internal_set_restriction_probability(from._internal_restriction_probability()); break; } - case HAS_RESTRICTION_PROBABILITY_NOT_SET: { + case HAS_RESTRICTION_PROBABILITY_NOT_SET: { + break; + } + } + switch (from.has_costing_case()) { + case kCosting: { + _this->_internal_set_costing(from._internal_costing()); + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { break; } } - switch (from.has_elevator_penalty_case()) { - case kElevatorPenalty: { - _this->_internal_set_elevator_penalty(from._internal_elevator_penalty()); + switch (from.has_filter_closures_case()) { + case kFilterClosures: { + _this->_internal_set_filter_closures(from._internal_filter_closures()); break; } - case HAS_ELEVATOR_PENALTY_NOT_SET: { + case HAS_FILTER_CLOSURES_NOT_SET: { break; } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } -void Costing_Options::CopyFrom(const Costing_Options& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Costing.Options) +void CostingOptions::CopyFrom(const CostingOptions& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.CostingOptions) if (&from == this) return; Clear(); MergeFrom(from); } -bool Costing_Options::IsInitialized() const { +bool CostingOptions::IsInitialized() const { return true; } -void Costing_Options::InternalSwap(Costing_Options* other) { +void CostingOptions::InternalSwap(CostingOptions* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.filter_stop_ids_.InternalSwap(&other->_impl_.filter_stop_ids_); @@ -7213,9 +6729,9 @@ void Costing_Options::InternalSwap(Costing_Options* other) { _impl_.filter_route_ids_.InternalSwap(&other->_impl_.filter_route_ids_); _impl_.exclude_edges_.InternalSwap(&other->_impl_.exclude_edges_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Costing_Options, _impl_.disable_hierarchy_pruning_) - + sizeof(Costing_Options::_impl_.disable_hierarchy_pruning_) - - PROTOBUF_FIELD_OFFSET(Costing_Options, _impl_.filter_stop_action_)>( + PROTOBUF_FIELD_OFFSET(CostingOptions, _impl_.filter_route_action_) + + sizeof(CostingOptions::_impl_.filter_route_action_) + - PROTOBUF_FIELD_OFFSET(CostingOptions, _impl_.filter_stop_action_)>( reinterpret_cast(&_impl_.filter_stop_action_), reinterpret_cast(&other->_impl_.filter_stop_action_)); swap(_impl_.has_maneuver_penalty_, other->_impl_.has_maneuver_penalty_); @@ -7289,7 +6805,9 @@ void Costing_Options::InternalSwap(Costing_Options* other) { swap(_impl_.has_include_hov3_, other->_impl_.has_include_hov3_); swap(_impl_.has_exclude_cash_only_tolls_, other->_impl_.has_exclude_cash_only_tolls_); swap(_impl_.has_restriction_probability_, other->_impl_.has_restriction_probability_); - swap(_impl_.has_elevator_penalty_, other->_impl_.has_elevator_penalty_); + swap(_impl_.has_costing_, other->_impl_.has_costing_); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_.has_filter_closures_, other->_impl_.has_filter_closures_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); @@ -7362,111 +6880,53 @@ void Costing_Options::InternalSwap(Costing_Options* other) { swap(_impl_._oneof_case_[69], other->_impl_._oneof_case_[69]); swap(_impl_._oneof_case_[70], other->_impl_._oneof_case_[70]); swap(_impl_._oneof_case_[71], other->_impl_._oneof_case_[71]); + swap(_impl_._oneof_case_[72], other->_impl_._oneof_case_[72]); + swap(_impl_._oneof_case_[73], other->_impl_._oneof_case_[73]); } -std::string Costing_Options::GetTypeName() const { - return "valhalla.Costing.Options"; +std::string CostingOptions::GetTypeName() const { + return "valhalla.CostingOptions"; } // =================================================================== -class Costing::_Internal { +class Options_Ring::_Internal { public: - static const ::valhalla::Costing_Options& options(const Costing* msg); }; -const ::valhalla::Costing_Options& -Costing::_Internal::options(const Costing* msg) { - return *msg->_impl_.has_options_.options_; -} -void Costing::set_allocated_options(::valhalla::Costing_Options* options) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - clear_has_options(); - if (options) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(options); - if (message_arena != submessage_arena) { - options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, options, submessage_arena); - } - set_has_options(); - _impl_.has_options_.options_ = options; - } - // @@protoc_insertion_point(field_set_allocated:valhalla.Costing.options) +void Options_Ring::clear_coords() { + _impl_.coords_.Clear(); } -Costing::Costing(::PROTOBUF_NAMESPACE_ID::Arena* arena, +Options_Ring::Options_Ring(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.Costing) + // @@protoc_insertion_point(arena_constructor:valhalla.Options.Ring) } -Costing::Costing(const Costing& from) +Options_Ring::Options_Ring(const Options_Ring& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - Costing* const _this = this; (void)_this; + Options_Ring* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.type_){} - , decltype(_impl_.has_options_){} - , decltype(_impl_.has_name_){} - , decltype(_impl_.has_filter_closures_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}}; + decltype(_impl_.coords_){from._impl_.coords_} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _this->_impl_.type_ = from._impl_.type_; - clear_has_has_options(); - switch (from.has_options_case()) { - case kOptions: { - _this->_internal_mutable_options()->::valhalla::Costing_Options::MergeFrom( - from._internal_options()); - break; - } - case HAS_OPTIONS_NOT_SET: { - break; - } - } - clear_has_has_name(); - switch (from.has_name_case()) { - case kName: { - _this->_internal_set_name(from._internal_name()); - break; - } - case HAS_NAME_NOT_SET: { - break; - } - } - clear_has_has_filter_closures(); - switch (from.has_filter_closures_case()) { - case kFilterClosures: { - _this->_internal_set_filter_closures(from._internal_filter_closures()); - break; - } - case HAS_FILTER_CLOSURES_NOT_SET: { - break; - } - } - // @@protoc_insertion_point(copy_constructor:valhalla.Costing) + // @@protoc_insertion_point(copy_constructor:valhalla.Options.Ring) } -inline void Costing::SharedCtor( +inline void Options_Ring::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.type_){0} - , decltype(_impl_.has_options_){} - , decltype(_impl_.has_name_){} - , decltype(_impl_.has_filter_closures_){} + decltype(_impl_.coords_){arena} , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{} }; - clear_has_has_options(); - clear_has_has_name(); - clear_has_has_filter_closures(); } -Costing::~Costing() { - // @@protoc_insertion_point(destructor:valhalla.Costing) +Options_Ring::~Options_Ring() { + // @@protoc_insertion_point(destructor:valhalla.Options.Ring) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; @@ -7474,119 +6934,41 @@ Costing::~Costing() { SharedDtor(); } -inline void Costing::SharedDtor() { +inline void Options_Ring::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_has_options()) { - clear_has_options(); - } - if (has_has_name()) { - clear_has_name(); - } - if (has_has_filter_closures()) { - clear_has_filter_closures(); - } + _impl_.coords_.~RepeatedPtrField(); } -void Costing::SetCachedSize(int size) const { +void Options_Ring::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void Costing::clear_has_options() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing) - switch (has_options_case()) { - case kOptions: { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.has_options_.options_; - } - break; - } - case HAS_OPTIONS_NOT_SET: { - break; - } - } - _impl_._oneof_case_[0] = HAS_OPTIONS_NOT_SET; -} - -void Costing::clear_has_name() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing) - switch (has_name_case()) { - case kName: { - _impl_.has_name_.name_.Destroy(); - break; - } - case HAS_NAME_NOT_SET: { - break; - } - } - _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; -} - -void Costing::clear_has_filter_closures() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Costing) - switch (has_filter_closures_case()) { - case kFilterClosures: { - // No need to clear - break; - } - case HAS_FILTER_CLOSURES_NOT_SET: { - break; - } - } - _impl_._oneof_case_[2] = HAS_FILTER_CLOSURES_NOT_SET; -} - - -void Costing::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.Costing) +void Options_Ring::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.Options.Ring) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.type_ = 0; - clear_has_options(); - clear_has_name(); - clear_has_filter_closures(); + _impl_.coords_.Clear(); _internal_metadata_.Clear(); } -const char* Costing::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* Options_Ring::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // .valhalla.Costing.Options options = 1; + // repeated .valhalla.LatLng coords = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .valhalla.Costing.Type type = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_type(static_cast<::valhalla::Costing_Type>(val)); - } else - goto handle_unusual; - continue; - // string name = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, nullptr)); - } else - goto handle_unusual; - continue; - // bool filter_closures = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _internal_set_filter_closures(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); - CHK_(ptr); + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_coords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); } else goto handle_unusual; continue; @@ -7613,98 +6995,43 @@ const char* Costing::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) #undef CHK_ } -uint8_t* Costing::_InternalSerialize( +uint8_t* Options_Ring::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.Costing) + // @@protoc_insertion_point(serialize_to_array_start:valhalla.Options.Ring) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // .valhalla.Costing.Options options = 1; - if (_internal_has_options()) { + // repeated .valhalla.LatLng coords = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_coords_size()); i < n; i++) { + const auto& repfield = this->_internal_coords(i); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::options(this), - _Internal::options(this).GetCachedSize(), target, stream); - } - - // .valhalla.Costing.Type type = 2; - if (this->_internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_type(), target); - } - - // string name = 3; - if (_internal_has_name()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Costing.name"); - target = stream->WriteStringMaybeAliased( - 3, this->_internal_name(), target); - } - - // bool filter_closures = 4; - if (_internal_has_filter_closures()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_filter_closures(), target); + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.Costing) + // @@protoc_insertion_point(serialize_to_array_end:valhalla.Options.Ring) return target; } -size_t Costing::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.Costing) +size_t Options_Ring::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:valhalla.Options.Ring) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // .valhalla.Costing.Type type = 2; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + // repeated .valhalla.LatLng coords = 1; + total_size += 1UL * this->_internal_coords_size(); + for (const auto& msg : this->_impl_.coords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - switch (has_options_case()) { - // .valhalla.Costing.Options options = 1; - case kOptions: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.has_options_.options_); - break; - } - case HAS_OPTIONS_NOT_SET: { - break; - } - } - switch (has_name_case()) { - // string name = 3; - case kName: { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - break; - } - case HAS_NAME_NOT_SET: { - break; - } - } - switch (has_filter_closures_case()) { - // bool filter_closures = 4; - case kFilterClosures: { - total_size += 1 + 1; - break; - } - case HAS_FILTER_CLOSURES_NOT_SET: { - break; - } - } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -7713,87 +7040,51 @@ size_t Costing::ByteSizeLong() const { return total_size; } -void Costing::CheckTypeAndMergeFrom( +void Options_Ring::CheckTypeAndMergeFrom( const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( + MergeFrom(*::_pbi::DownCast( &from)); } -void Costing::MergeFrom(const Costing& from) { - Costing* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Costing) +void Options_Ring::MergeFrom(const Options_Ring& from) { + Options_Ring* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Options.Ring) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); - } - switch (from.has_options_case()) { - case kOptions: { - _this->_internal_mutable_options()->::valhalla::Costing_Options::MergeFrom( - from._internal_options()); - break; - } - case HAS_OPTIONS_NOT_SET: { - break; - } - } - switch (from.has_name_case()) { - case kName: { - _this->_internal_set_name(from._internal_name()); - break; - } - case HAS_NAME_NOT_SET: { - break; - } - } - switch (from.has_filter_closures_case()) { - case kFilterClosures: { - _this->_internal_set_filter_closures(from._internal_filter_closures()); - break; - } - case HAS_FILTER_CLOSURES_NOT_SET: { - break; - } - } + _this->_impl_.coords_.MergeFrom(from._impl_.coords_); _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } -void Costing::CopyFrom(const Costing& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Costing) +void Options_Ring::CopyFrom(const Options_Ring& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Options.Ring) if (&from == this) return; Clear(); MergeFrom(from); } -bool Costing::IsInitialized() const { +bool Options_Ring::IsInitialized() const { return true; } -void Costing::InternalSwap(Costing* other) { +void Options_Ring::InternalSwap(Options_Ring* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.type_, other->_impl_.type_); - swap(_impl_.has_options_, other->_impl_.has_options_); - swap(_impl_.has_name_, other->_impl_.has_name_); - swap(_impl_.has_filter_closures_, other->_impl_.has_filter_closures_); - swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); - swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); - swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + _impl_.coords_.InternalSwap(&other->_impl_.coords_); } -std::string Costing::GetTypeName() const { - return "valhalla.Costing"; +std::string Options_Ring::GetTypeName() const { + return "valhalla.Options.Ring"; } // =================================================================== -Options_CostingsEntry_DoNotUse::Options_CostingsEntry_DoNotUse() {} -Options_CostingsEntry_DoNotUse::Options_CostingsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) +Options_CostingOptionsEntry_DoNotUse::Options_CostingOptionsEntry_DoNotUse() {} +Options_CostingOptionsEntry_DoNotUse::Options_CostingOptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : SuperType(arena) {} -void Options_CostingsEntry_DoNotUse::MergeFrom(const Options_CostingsEntry_DoNotUse& other) { +void Options_CostingOptionsEntry_DoNotUse::MergeFrom(const Options_CostingOptionsEntry_DoNotUse& other) { MergeFromInternal(other); } @@ -7801,13 +7092,8 @@ void Options_CostingsEntry_DoNotUse::MergeFrom(const Options_CostingsEntry_DoNot class Options::_Internal { public: - static const ::valhalla::PbfFieldSelector& pbf_field_selector(const Options* msg); }; -const ::valhalla::PbfFieldSelector& -Options::_Internal::pbf_field_selector(const Options* msg) { - return *msg->_impl_.pbf_field_selector_; -} void Options::clear_locations() { _impl_.locations_.Clear(); } @@ -7836,7 +7122,7 @@ Options::Options(const Options& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { Options* const _this = this; (void)_this; new (&_impl_) Impl_{ - /*decltype(_impl_.costings_)*/{} + /*decltype(_impl_.costing_options_)*/{} , decltype(_impl_.locations_){from._impl_.locations_} , decltype(_impl_.exclude_locations_){from._impl_.exclude_locations_} , decltype(_impl_.sources_){from._impl_.sources_} @@ -7849,34 +7135,32 @@ Options::Options(const Options& from) , decltype(_impl_.exclude_polygons_){from._impl_.exclude_polygons_} , decltype(_impl_.expansion_properties_){from._impl_.expansion_properties_} , /*decltype(_impl_._expansion_properties_cached_byte_size_)*/{0} - , decltype(_impl_.pbf_field_selector_){nullptr} - , decltype(_impl_.units_){} - , decltype(_impl_.directions_type_){} - , decltype(_impl_.format_){} - , decltype(_impl_.action_){} - , decltype(_impl_.costing_type_){} - , decltype(_impl_.date_time_type_){} - , decltype(_impl_.shape_match_){} , decltype(_impl_.filter_action_){} - , decltype(_impl_.shape_format_){} - , decltype(_impl_.reverse_){} + , decltype(_impl_.has_units_){} , decltype(_impl_.has_language_){} + , decltype(_impl_.has_directions_type_){} + , decltype(_impl_.has_format_){} , decltype(_impl_.has_id_){} , decltype(_impl_.has_jsonp_){} , decltype(_impl_.has_encoded_polyline_){} + , decltype(_impl_.has_action_){} , decltype(_impl_.has_range_){} , decltype(_impl_.has_verbose_){} + , decltype(_impl_.has_costing_){} + , decltype(_impl_.has_date_time_type_){} , decltype(_impl_.has_date_time_){} , decltype(_impl_.has_resample_distance_){} , decltype(_impl_.has_polygons_){} , decltype(_impl_.has_denoise_){} , decltype(_impl_.has_generalize_){} , decltype(_impl_.has_show_locations_){} + , decltype(_impl_.has_shape_match_){} , decltype(_impl_.has_gps_accuracy_){} , decltype(_impl_.has_search_radius_){} , decltype(_impl_.has_turn_penalty_factor_){} , decltype(_impl_.has_breakage_distance_){} , decltype(_impl_.has_use_timestamps_){} + , decltype(_impl_.has_shape_format_){} , decltype(_impl_.has_alternates_){} , decltype(_impl_.has_interpolation_distance_){} , decltype(_impl_.has_guidance_views_){} @@ -7886,18 +7170,22 @@ Options::Options(const Options& from) , decltype(_impl_.has_prioritize_bidirectional_){} , decltype(_impl_.has_expansion_action_){} , decltype(_impl_.has_skip_opposites_){} - , decltype(_impl_.has_matrix_locations_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _this->_impl_.costings_.MergeFrom(from._impl_.costings_); - if (from._internal_has_pbf_field_selector()) { - _this->_impl_.pbf_field_selector_ = new ::valhalla::PbfFieldSelector(*from._impl_.pbf_field_selector_); + _this->_impl_.costing_options_.MergeFrom(from._impl_.costing_options_); + _this->_impl_.filter_action_ = from._impl_.filter_action_; + clear_has_has_units(); + switch (from.has_units_case()) { + case kUnits: { + _this->_internal_set_units(from._internal_units()); + break; + } + case HAS_UNITS_NOT_SET: { + break; + } } - ::memcpy(&_impl_.units_, &from._impl_.units_, - static_cast(reinterpret_cast(&_impl_.reverse_) - - reinterpret_cast(&_impl_.units_)) + sizeof(_impl_.reverse_)); clear_has_has_language(); switch (from.has_language_case()) { case kLanguage: { @@ -7908,6 +7196,26 @@ Options::Options(const Options& from) break; } } + clear_has_has_directions_type(); + switch (from.has_directions_type_case()) { + case kDirectionsType: { + _this->_internal_set_directions_type(from._internal_directions_type()); + break; + } + case HAS_DIRECTIONS_TYPE_NOT_SET: { + break; + } + } + clear_has_has_format(); + switch (from.has_format_case()) { + case kFormat: { + _this->_internal_set_format(from._internal_format()); + break; + } + case HAS_FORMAT_NOT_SET: { + break; + } + } clear_has_has_id(); switch (from.has_id_case()) { case kId: { @@ -7938,6 +7246,16 @@ Options::Options(const Options& from) break; } } + clear_has_has_action(); + switch (from.has_action_case()) { + case kAction: { + _this->_internal_set_action(from._internal_action()); + break; + } + case HAS_ACTION_NOT_SET: { + break; + } + } clear_has_has_range(); switch (from.has_range_case()) { case kRange: { @@ -7958,6 +7276,26 @@ Options::Options(const Options& from) break; } } + clear_has_has_costing(); + switch (from.has_costing_case()) { + case kCosting: { + _this->_internal_set_costing(from._internal_costing()); + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + clear_has_has_date_time_type(); + switch (from.has_date_time_type_case()) { + case kDateTimeType: { + _this->_internal_set_date_time_type(from._internal_date_time_type()); + break; + } + case HAS_DATE_TIME_TYPE_NOT_SET: { + break; + } + } clear_has_has_date_time(); switch (from.has_date_time_case()) { case kDateTime: { @@ -8018,6 +7356,16 @@ Options::Options(const Options& from) break; } } + clear_has_has_shape_match(); + switch (from.has_shape_match_case()) { + case kShapeMatch: { + _this->_internal_set_shape_match(from._internal_shape_match()); + break; + } + case HAS_SHAPE_MATCH_NOT_SET: { + break; + } + } clear_has_has_gps_accuracy(); switch (from.has_gps_accuracy_case()) { case kGpsAccuracy: { @@ -8068,6 +7416,16 @@ Options::Options(const Options& from) break; } } + clear_has_has_shape_format(); + switch (from.has_shape_format_case()) { + case kShapeFormat: { + _this->_internal_set_shape_format(from._internal_shape_format()); + break; + } + case HAS_SHAPE_FORMAT_NOT_SET: { + break; + } + } clear_has_has_alternates(); switch (from.has_alternates_case()) { case kAlternates: { @@ -8158,16 +7516,6 @@ Options::Options(const Options& from) break; } } - clear_has_has_matrix_locations(); - switch (from.has_matrix_locations_case()) { - case kMatrixLocations: { - _this->_internal_set_matrix_locations(from._internal_matrix_locations()); - break; - } - case HAS_MATRIX_LOCATIONS_NOT_SET: { - break; - } - } // @@protoc_insertion_point(copy_constructor:valhalla.Options) } @@ -8176,7 +7524,7 @@ inline void Options::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - /*decltype(_impl_.costings_)*/{::_pbi::ArenaInitialized(), arena} + /*decltype(_impl_.costing_options_)*/{::_pbi::ArenaInitialized(), arena} , decltype(_impl_.locations_){arena} , decltype(_impl_.exclude_locations_){arena} , decltype(_impl_.sources_){arena} @@ -8189,34 +7537,32 @@ inline void Options::SharedCtor( , decltype(_impl_.exclude_polygons_){arena} , decltype(_impl_.expansion_properties_){arena} , /*decltype(_impl_._expansion_properties_cached_byte_size_)*/{0} - , decltype(_impl_.pbf_field_selector_){nullptr} - , decltype(_impl_.units_){0} - , decltype(_impl_.directions_type_){0} - , decltype(_impl_.format_){0} - , decltype(_impl_.action_){0} - , decltype(_impl_.costing_type_){0} - , decltype(_impl_.date_time_type_){0} - , decltype(_impl_.shape_match_){0} , decltype(_impl_.filter_action_){0} - , decltype(_impl_.shape_format_){0} - , decltype(_impl_.reverse_){false} + , decltype(_impl_.has_units_){} , decltype(_impl_.has_language_){} + , decltype(_impl_.has_directions_type_){} + , decltype(_impl_.has_format_){} , decltype(_impl_.has_id_){} , decltype(_impl_.has_jsonp_){} , decltype(_impl_.has_encoded_polyline_){} + , decltype(_impl_.has_action_){} , decltype(_impl_.has_range_){} , decltype(_impl_.has_verbose_){} + , decltype(_impl_.has_costing_){} + , decltype(_impl_.has_date_time_type_){} , decltype(_impl_.has_date_time_){} , decltype(_impl_.has_resample_distance_){} , decltype(_impl_.has_polygons_){} , decltype(_impl_.has_denoise_){} , decltype(_impl_.has_generalize_){} , decltype(_impl_.has_show_locations_){} + , decltype(_impl_.has_shape_match_){} , decltype(_impl_.has_gps_accuracy_){} , decltype(_impl_.has_search_radius_){} , decltype(_impl_.has_turn_penalty_factor_){} , decltype(_impl_.has_breakage_distance_){} , decltype(_impl_.has_use_timestamps_){} + , decltype(_impl_.has_shape_format_){} , decltype(_impl_.has_alternates_){} , decltype(_impl_.has_interpolation_distance_){} , decltype(_impl_.has_guidance_views_){} @@ -8226,27 +7572,34 @@ inline void Options::SharedCtor( , decltype(_impl_.has_prioritize_bidirectional_){} , decltype(_impl_.has_expansion_action_){} , decltype(_impl_.has_skip_opposites_){} - , decltype(_impl_.has_matrix_locations_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_units(); clear_has_has_language(); + clear_has_has_directions_type(); + clear_has_has_format(); clear_has_has_id(); clear_has_has_jsonp(); clear_has_has_encoded_polyline(); + clear_has_has_action(); clear_has_has_range(); clear_has_has_verbose(); + clear_has_has_costing(); + clear_has_has_date_time_type(); clear_has_has_date_time(); clear_has_has_resample_distance(); clear_has_has_polygons(); clear_has_has_denoise(); clear_has_has_generalize(); clear_has_has_show_locations(); + clear_has_has_shape_match(); clear_has_has_gps_accuracy(); clear_has_has_search_radius(); clear_has_has_turn_penalty_factor(); clear_has_has_breakage_distance(); clear_has_has_use_timestamps(); + clear_has_has_shape_format(); clear_has_has_alternates(); clear_has_has_interpolation_distance(); clear_has_has_guidance_views(); @@ -8256,7 +7609,6 @@ inline void Options::SharedCtor( clear_has_has_prioritize_bidirectional(); clear_has_has_expansion_action(); clear_has_has_skip_opposites(); - clear_has_has_matrix_locations(); } Options::~Options() { @@ -8270,8 +7622,8 @@ Options::~Options() { inline void Options::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.costings_.Destruct(); - _impl_.costings_.~MapFieldLite(); + _impl_.costing_options_.Destruct(); + _impl_.costing_options_.~MapFieldLite(); _impl_.locations_.~RepeatedPtrField(); _impl_.exclude_locations_.~RepeatedPtrField(); _impl_.sources_.~RepeatedPtrField(); @@ -8283,10 +7635,18 @@ inline void Options::SharedDtor() { _impl_.recostings_.~RepeatedPtrField(); _impl_.exclude_polygons_.~RepeatedPtrField(); _impl_.expansion_properties_.~RepeatedField(); - if (this != internal_default_instance()) delete _impl_.pbf_field_selector_; + if (has_has_units()) { + clear_has_units(); + } if (has_has_language()) { clear_has_language(); } + if (has_has_directions_type()) { + clear_has_directions_type(); + } + if (has_has_format()) { + clear_has_format(); + } if (has_has_id()) { clear_has_id(); } @@ -8296,12 +7656,21 @@ inline void Options::SharedDtor() { if (has_has_encoded_polyline()) { clear_has_encoded_polyline(); } + if (has_has_action()) { + clear_has_action(); + } if (has_has_range()) { clear_has_range(); } if (has_has_verbose()) { clear_has_verbose(); } + if (has_has_costing()) { + clear_has_costing(); + } + if (has_has_date_time_type()) { + clear_has_date_time_type(); + } if (has_has_date_time()) { clear_has_date_time(); } @@ -8320,6 +7689,9 @@ inline void Options::SharedDtor() { if (has_has_show_locations()) { clear_has_show_locations(); } + if (has_has_shape_match()) { + clear_has_shape_match(); + } if (has_has_gps_accuracy()) { clear_has_gps_accuracy(); } @@ -8335,6 +7707,9 @@ inline void Options::SharedDtor() { if (has_has_use_timestamps()) { clear_has_use_timestamps(); } + if (has_has_shape_format()) { + clear_has_shape_format(); + } if (has_has_alternates()) { clear_has_alternates(); } @@ -8362,15 +7737,26 @@ inline void Options::SharedDtor() { if (has_has_skip_opposites()) { clear_has_skip_opposites(); } - if (has_has_matrix_locations()) { - clear_has_matrix_locations(); - } } void Options::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void Options::clear_has_units() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_units_case()) { + case kUnits: { + // No need to clear + break; + } + case HAS_UNITS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_UNITS_NOT_SET; +} + void Options::clear_has_language() { // @@protoc_insertion_point(one_of_clear_start:valhalla.Options) switch (has_language_case()) { @@ -8382,7 +7768,35 @@ void Options::clear_has_language() { break; } } - _impl_._oneof_case_[0] = HAS_LANGUAGE_NOT_SET; + _impl_._oneof_case_[1] = HAS_LANGUAGE_NOT_SET; +} + +void Options::clear_has_directions_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_directions_type_case()) { + case kDirectionsType: { + // No need to clear + break; + } + case HAS_DIRECTIONS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_DIRECTIONS_TYPE_NOT_SET; +} + +void Options::clear_has_format() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_format_case()) { + case kFormat: { + // No need to clear + break; + } + case HAS_FORMAT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_FORMAT_NOT_SET; } void Options::clear_has_id() { @@ -8396,7 +7810,7 @@ void Options::clear_has_id() { break; } } - _impl_._oneof_case_[1] = HAS_ID_NOT_SET; + _impl_._oneof_case_[4] = HAS_ID_NOT_SET; } void Options::clear_has_jsonp() { @@ -8410,7 +7824,7 @@ void Options::clear_has_jsonp() { break; } } - _impl_._oneof_case_[2] = HAS_JSONP_NOT_SET; + _impl_._oneof_case_[5] = HAS_JSONP_NOT_SET; } void Options::clear_has_encoded_polyline() { @@ -8424,7 +7838,21 @@ void Options::clear_has_encoded_polyline() { break; } } - _impl_._oneof_case_[3] = HAS_ENCODED_POLYLINE_NOT_SET; + _impl_._oneof_case_[6] = HAS_ENCODED_POLYLINE_NOT_SET; +} + +void Options::clear_has_action() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_action_case()) { + case kAction: { + // No need to clear + break; + } + case HAS_ACTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_ACTION_NOT_SET; } void Options::clear_has_range() { @@ -8438,7 +7866,7 @@ void Options::clear_has_range() { break; } } - _impl_._oneof_case_[4] = HAS_RANGE_NOT_SET; + _impl_._oneof_case_[8] = HAS_RANGE_NOT_SET; } void Options::clear_has_verbose() { @@ -8452,7 +7880,35 @@ void Options::clear_has_verbose() { break; } } - _impl_._oneof_case_[5] = HAS_VERBOSE_NOT_SET; + _impl_._oneof_case_[9] = HAS_VERBOSE_NOT_SET; +} + +void Options::clear_has_costing() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_costing_case()) { + case kCosting: { + // No need to clear + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[10] = HAS_COSTING_NOT_SET; +} + +void Options::clear_has_date_time_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_date_time_type_case()) { + case kDateTimeType: { + // No need to clear + break; + } + case HAS_DATE_TIME_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[11] = HAS_DATE_TIME_TYPE_NOT_SET; } void Options::clear_has_date_time() { @@ -8466,7 +7922,7 @@ void Options::clear_has_date_time() { break; } } - _impl_._oneof_case_[6] = HAS_DATE_TIME_NOT_SET; + _impl_._oneof_case_[12] = HAS_DATE_TIME_NOT_SET; } void Options::clear_has_resample_distance() { @@ -8480,7 +7936,7 @@ void Options::clear_has_resample_distance() { break; } } - _impl_._oneof_case_[7] = HAS_RESAMPLE_DISTANCE_NOT_SET; + _impl_._oneof_case_[13] = HAS_RESAMPLE_DISTANCE_NOT_SET; } void Options::clear_has_polygons() { @@ -8494,7 +7950,7 @@ void Options::clear_has_polygons() { break; } } - _impl_._oneof_case_[8] = HAS_POLYGONS_NOT_SET; + _impl_._oneof_case_[14] = HAS_POLYGONS_NOT_SET; } void Options::clear_has_denoise() { @@ -8508,7 +7964,7 @@ void Options::clear_has_denoise() { break; } } - _impl_._oneof_case_[9] = HAS_DENOISE_NOT_SET; + _impl_._oneof_case_[15] = HAS_DENOISE_NOT_SET; } void Options::clear_has_generalize() { @@ -8522,7 +7978,7 @@ void Options::clear_has_generalize() { break; } } - _impl_._oneof_case_[10] = HAS_GENERALIZE_NOT_SET; + _impl_._oneof_case_[16] = HAS_GENERALIZE_NOT_SET; } void Options::clear_has_show_locations() { @@ -8536,7 +7992,21 @@ void Options::clear_has_show_locations() { break; } } - _impl_._oneof_case_[11] = HAS_SHOW_LOCATIONS_NOT_SET; + _impl_._oneof_case_[17] = HAS_SHOW_LOCATIONS_NOT_SET; +} + +void Options::clear_has_shape_match() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_shape_match_case()) { + case kShapeMatch: { + // No need to clear + break; + } + case HAS_SHAPE_MATCH_NOT_SET: { + break; + } + } + _impl_._oneof_case_[18] = HAS_SHAPE_MATCH_NOT_SET; } void Options::clear_has_gps_accuracy() { @@ -8550,7 +8020,7 @@ void Options::clear_has_gps_accuracy() { break; } } - _impl_._oneof_case_[12] = HAS_GPS_ACCURACY_NOT_SET; + _impl_._oneof_case_[19] = HAS_GPS_ACCURACY_NOT_SET; } void Options::clear_has_search_radius() { @@ -8564,7 +8034,7 @@ void Options::clear_has_search_radius() { break; } } - _impl_._oneof_case_[13] = HAS_SEARCH_RADIUS_NOT_SET; + _impl_._oneof_case_[20] = HAS_SEARCH_RADIUS_NOT_SET; } void Options::clear_has_turn_penalty_factor() { @@ -8578,7 +8048,7 @@ void Options::clear_has_turn_penalty_factor() { break; } } - _impl_._oneof_case_[14] = HAS_TURN_PENALTY_FACTOR_NOT_SET; + _impl_._oneof_case_[21] = HAS_TURN_PENALTY_FACTOR_NOT_SET; } void Options::clear_has_breakage_distance() { @@ -8592,7 +8062,7 @@ void Options::clear_has_breakage_distance() { break; } } - _impl_._oneof_case_[15] = HAS_BREAKAGE_DISTANCE_NOT_SET; + _impl_._oneof_case_[22] = HAS_BREAKAGE_DISTANCE_NOT_SET; } void Options::clear_has_use_timestamps() { @@ -8606,7 +8076,21 @@ void Options::clear_has_use_timestamps() { break; } } - _impl_._oneof_case_[16] = HAS_USE_TIMESTAMPS_NOT_SET; + _impl_._oneof_case_[23] = HAS_USE_TIMESTAMPS_NOT_SET; +} + +void Options::clear_has_shape_format() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) + switch (has_shape_format_case()) { + case kShapeFormat: { + // No need to clear + break; + } + case HAS_SHAPE_FORMAT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[24] = HAS_SHAPE_FORMAT_NOT_SET; } void Options::clear_has_alternates() { @@ -8620,7 +8104,7 @@ void Options::clear_has_alternates() { break; } } - _impl_._oneof_case_[17] = HAS_ALTERNATES_NOT_SET; + _impl_._oneof_case_[25] = HAS_ALTERNATES_NOT_SET; } void Options::clear_has_interpolation_distance() { @@ -8634,7 +8118,7 @@ void Options::clear_has_interpolation_distance() { break; } } - _impl_._oneof_case_[18] = HAS_INTERPOLATION_DISTANCE_NOT_SET; + _impl_._oneof_case_[26] = HAS_INTERPOLATION_DISTANCE_NOT_SET; } void Options::clear_has_guidance_views() { @@ -8648,7 +8132,7 @@ void Options::clear_has_guidance_views() { break; } } - _impl_._oneof_case_[19] = HAS_GUIDANCE_VIEWS_NOT_SET; + _impl_._oneof_case_[27] = HAS_GUIDANCE_VIEWS_NOT_SET; } void Options::clear_has_height_precision() { @@ -8662,7 +8146,7 @@ void Options::clear_has_height_precision() { break; } } - _impl_._oneof_case_[20] = HAS_HEIGHT_PRECISION_NOT_SET; + _impl_._oneof_case_[28] = HAS_HEIGHT_PRECISION_NOT_SET; } void Options::clear_has_roundabout_exits() { @@ -8676,7 +8160,7 @@ void Options::clear_has_roundabout_exits() { break; } } - _impl_._oneof_case_[21] = HAS_ROUNDABOUT_EXITS_NOT_SET; + _impl_._oneof_case_[29] = HAS_ROUNDABOUT_EXITS_NOT_SET; } void Options::clear_has_linear_references() { @@ -8690,7 +8174,7 @@ void Options::clear_has_linear_references() { break; } } - _impl_._oneof_case_[22] = HAS_LINEAR_REFERENCES_NOT_SET; + _impl_._oneof_case_[30] = HAS_LINEAR_REFERENCES_NOT_SET; } void Options::clear_has_prioritize_bidirectional() { @@ -8704,7 +8188,7 @@ void Options::clear_has_prioritize_bidirectional() { break; } } - _impl_._oneof_case_[23] = HAS_PRIORITIZE_BIDIRECTIONAL_NOT_SET; + _impl_._oneof_case_[31] = HAS_PRIORITIZE_BIDIRECTIONAL_NOT_SET; } void Options::clear_has_expansion_action() { @@ -8718,7 +8202,7 @@ void Options::clear_has_expansion_action() { break; } } - _impl_._oneof_case_[24] = HAS_EXPANSION_ACTION_NOT_SET; + _impl_._oneof_case_[32] = HAS_EXPANSION_ACTION_NOT_SET; } void Options::clear_has_skip_opposites() { @@ -8732,21 +8216,7 @@ void Options::clear_has_skip_opposites() { break; } } - _impl_._oneof_case_[25] = HAS_SKIP_OPPOSITES_NOT_SET; -} - -void Options::clear_has_matrix_locations() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.Options) - switch (has_matrix_locations_case()) { - case kMatrixLocations: { - // No need to clear - break; - } - case HAS_MATRIX_LOCATIONS_NOT_SET: { - break; - } - } - _impl_._oneof_case_[26] = HAS_MATRIX_LOCATIONS_NOT_SET; + _impl_._oneof_case_[33] = HAS_SKIP_OPPOSITES_NOT_SET; } @@ -8756,7 +8226,7 @@ void Options::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.costings_.Clear(); + _impl_.costing_options_.Clear(); _impl_.locations_.Clear(); _impl_.exclude_locations_.Clear(); _impl_.sources_.Clear(); @@ -8768,30 +8238,32 @@ void Options::Clear() { _impl_.recostings_.Clear(); _impl_.exclude_polygons_.Clear(); _impl_.expansion_properties_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.pbf_field_selector_ != nullptr) { - delete _impl_.pbf_field_selector_; - } - _impl_.pbf_field_selector_ = nullptr; - ::memset(&_impl_.units_, 0, static_cast( - reinterpret_cast(&_impl_.reverse_) - - reinterpret_cast(&_impl_.units_)) + sizeof(_impl_.reverse_)); + _impl_.filter_action_ = 0; + clear_has_units(); clear_has_language(); + clear_has_directions_type(); + clear_has_format(); clear_has_id(); clear_has_jsonp(); clear_has_encoded_polyline(); + clear_has_action(); clear_has_range(); clear_has_verbose(); + clear_has_costing(); + clear_has_date_time_type(); clear_has_date_time(); clear_has_resample_distance(); clear_has_polygons(); clear_has_denoise(); clear_has_generalize(); clear_has_show_locations(); + clear_has_shape_match(); clear_has_gps_accuracy(); clear_has_search_radius(); clear_has_turn_penalty_factor(); clear_has_breakage_distance(); clear_has_use_timestamps(); + clear_has_shape_format(); clear_has_alternates(); clear_has_interpolation_distance(); clear_has_guidance_views(); @@ -8801,7 +8273,6 @@ void Options::Clear() { clear_has_prioritize_bidirectional(); clear_has_expansion_action(); clear_has_skip_opposites(); - clear_has_matrix_locations(); _internal_metadata_.Clear(); } @@ -8903,22 +8374,22 @@ const char* Options::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // .valhalla.Costing.Type costing_type = 12; + // .valhalla.Costing costing = 12; case 12: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_costing_type(static_cast<::valhalla::Costing_Type>(val)); + _internal_set_costing(static_cast<::valhalla::Costing>(val)); } else goto handle_unusual; continue; - // map costings = 13; + // map costing_options = 13; case 13: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { ptr -= 1; do { ptr += 1; - ptr = ctx->ParseMessage(&_impl_.costings_, ptr); + ptr = ctx->ParseMessage(&_impl_.costing_options_, ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr)); @@ -9205,7 +8676,7 @@ const char* Options::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // repeated .valhalla.Costing recostings = 46; + // repeated .valhalla.CostingOptions recostings = 46; case 46: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { ptr -= 2; @@ -9218,7 +8689,7 @@ const char* Options::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // repeated .valhalla.Ring exclude_polygons = 47; + // repeated .valhalla.Options.Ring exclude_polygons = 47; case 47: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { ptr -= 2; @@ -9268,30 +8739,6 @@ const char* Options::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; - // .valhalla.PbfFieldSelector pbf_field_selector = 52; - case 52: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 162)) { - ptr = ctx->ParseMessage(_internal_mutable_pbf_field_selector(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool reverse = 53; - case 53: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 168)) { - _impl_.reverse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 matrix_locations = 54; - case 54: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { - _internal_set_matrix_locations(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -9322,7 +8769,7 @@ uint8_t* Options::_InternalSerialize( (void) cached_has_bits; // .valhalla.Options.Units units = 1; - if (this->_internal_units() != 0) { + if (_internal_has_units()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 1, this->_internal_units(), target); @@ -9339,14 +8786,14 @@ uint8_t* Options::_InternalSerialize( } // .valhalla.DirectionsType directions_type = 3; - if (this->_internal_directions_type() != 0) { + if (_internal_has_directions_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 3, this->_internal_directions_type(), target); } // .valhalla.Options.Format format = 4; - if (this->_internal_format() != 0) { + if (_internal_has_format()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 4, this->_internal_format(), target); @@ -9383,7 +8830,7 @@ uint8_t* Options::_InternalSerialize( } // .valhalla.Options.Action action = 8; - if (this->_internal_action() != 0) { + if (_internal_has_action()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 8, this->_internal_action(), target); @@ -9401,18 +8848,18 @@ uint8_t* Options::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_verbose(), target); } - // .valhalla.Costing.Type costing_type = 12; - if (this->_internal_costing_type() != 0) { + // .valhalla.Costing costing = 12; + if (_internal_has_costing()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 12, this->_internal_costing_type(), target); + 12, this->_internal_costing(), target); } - // map costings = 13; - if (!this->_internal_costings().empty()) { - using MapType = ::_pb::Map; - using WireHelper = Options_CostingsEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_costings(); + // map costing_options = 13; + if (!this->_internal_costing_options().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Options_CostingOptionsEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_costing_options(); if (stream->IsSerializationDeterministic() && map_field.size() > 1) { for (const auto& entry : ::_pbi::MapSorterFlat(map_field)) { @@ -9458,7 +8905,7 @@ uint8_t* Options::_InternalSerialize( } // .valhalla.Options.DateTimeType date_time_type = 18; - if (this->_internal_date_time_type() != 0) { + if (_internal_has_date_time_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 18, this->_internal_date_time_type(), target); @@ -9529,7 +8976,7 @@ uint8_t* Options::_InternalSerialize( } // .valhalla.ShapeMatch shape_match = 28; - if (this->_internal_shape_match() != 0) { + if (_internal_has_shape_match()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 28, this->_internal_shape_match(), target); @@ -9583,7 +9030,7 @@ uint8_t* Options::_InternalSerialize( } // .valhalla.ShapeFormat shape_format = 38; - if (this->_internal_shape_format() != 0) { + if (_internal_has_shape_format()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 38, this->_internal_shape_format(), target); @@ -9625,7 +9072,7 @@ uint8_t* Options::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteBoolToArray(45, this->_internal_linear_references(), target); } - // repeated .valhalla.Costing recostings = 46; + // repeated .valhalla.CostingOptions recostings = 46; for (unsigned i = 0, n = static_cast(this->_internal_recostings_size()); i < n; i++) { const auto& repfield = this->_internal_recostings(i); @@ -9633,7 +9080,7 @@ uint8_t* Options::_InternalSerialize( InternalWriteMessage(46, repfield, repfield.GetCachedSize(), target, stream); } - // repeated .valhalla.Ring exclude_polygons = 47; + // repeated .valhalla.Options.Ring exclude_polygons = 47; for (unsigned i = 0, n = static_cast(this->_internal_exclude_polygons_size()); i < n; i++) { const auto& repfield = this->_internal_exclude_polygons(i); @@ -9669,25 +9116,6 @@ uint8_t* Options::_InternalSerialize( } } - // .valhalla.PbfFieldSelector pbf_field_selector = 52; - if (this->_internal_has_pbf_field_selector()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(52, _Internal::pbf_field_selector(this), - _Internal::pbf_field_selector(this).GetCachedSize(), target, stream); - } - - // bool reverse = 53; - if (this->_internal_reverse() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(53, this->_internal_reverse(), target); - } - - // uint32 matrix_locations = 54; - if (_internal_has_matrix_locations()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(54, this->_internal_matrix_locations(), target); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); @@ -9704,13 +9132,13 @@ size_t Options::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map costings = 13; + // map costing_options = 13; total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_costings_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >::const_iterator - it = this->_internal_costings().begin(); - it != this->_internal_costings().end(); ++it) { - total_size += Options_CostingsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_costing_options_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >::const_iterator + it = this->_internal_costing_options().begin(); + it != this->_internal_costing_options().end(); ++it) { + total_size += Options_CostingOptionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } // repeated .valhalla.Location locations = 14; @@ -9770,14 +9198,14 @@ size_t Options::ByteSizeLong() const { _impl_.filter_attributes_.Get(i)); } - // repeated .valhalla.Costing recostings = 46; + // repeated .valhalla.CostingOptions recostings = 46; total_size += 2UL * this->_internal_recostings_size(); for (const auto& msg : this->_impl_.recostings_) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // repeated .valhalla.Ring exclude_polygons = 47; + // repeated .valhalla.Options.Ring exclude_polygons = 47; total_size += 2UL * this->_internal_exclude_polygons_size(); for (const auto& msg : this->_impl_.exclude_polygons_) { total_size += @@ -9801,72 +9229,23 @@ size_t Options::ByteSizeLong() const { total_size += data_size; } - // .valhalla.PbfFieldSelector pbf_field_selector = 52; - if (this->_internal_has_pbf_field_selector()) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.pbf_field_selector_); - } - - // .valhalla.Options.Units units = 1; - if (this->_internal_units() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_units()); - } - - // .valhalla.DirectionsType directions_type = 3; - if (this->_internal_directions_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_directions_type()); - } - - // .valhalla.Options.Format format = 4; - if (this->_internal_format() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_format()); - } - - // .valhalla.Options.Action action = 8; - if (this->_internal_action() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_action()); - } - - // .valhalla.Costing.Type costing_type = 12; - if (this->_internal_costing_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_costing_type()); - } - - // .valhalla.Options.DateTimeType date_time_type = 18; - if (this->_internal_date_time_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_date_time_type()); - } - - // .valhalla.ShapeMatch shape_match = 28; - if (this->_internal_shape_match() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_shape_match()); - } - // .valhalla.FilterAction filter_action = 33; if (this->_internal_filter_action() != 0) { total_size += 2 + ::_pbi::WireFormatLite::EnumSize(this->_internal_filter_action()); } - // .valhalla.ShapeFormat shape_format = 38; - if (this->_internal_shape_format() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_shape_format()); - } - - // bool reverse = 53; - if (this->_internal_reverse() != 0) { - total_size += 2 + 1; + switch (has_units_case()) { + // .valhalla.Options.Units units = 1; + case kUnits: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_units()); + break; + } + case HAS_UNITS_NOT_SET: { + break; + } } - switch (has_language_case()) { // string language = 2; case kLanguage: { @@ -9879,6 +9258,28 @@ size_t Options::ByteSizeLong() const { break; } } + switch (has_directions_type_case()) { + // .valhalla.DirectionsType directions_type = 3; + case kDirectionsType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_directions_type()); + break; + } + case HAS_DIRECTIONS_TYPE_NOT_SET: { + break; + } + } + switch (has_format_case()) { + // .valhalla.Options.Format format = 4; + case kFormat: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_format()); + break; + } + case HAS_FORMAT_NOT_SET: { + break; + } + } switch (has_id_case()) { // string id = 5; case kId: { @@ -9915,6 +9316,17 @@ size_t Options::ByteSizeLong() const { break; } } + switch (has_action_case()) { + // .valhalla.Options.Action action = 8; + case kAction: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_action()); + break; + } + case HAS_ACTION_NOT_SET: { + break; + } + } switch (has_range_case()) { // bool range = 10; case kRange: { @@ -9935,6 +9347,28 @@ size_t Options::ByteSizeLong() const { break; } } + switch (has_costing_case()) { + // .valhalla.Costing costing = 12; + case kCosting: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_costing()); + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + switch (has_date_time_type_case()) { + // .valhalla.Options.DateTimeType date_time_type = 18; + case kDateTimeType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_date_time_type()); + break; + } + case HAS_DATE_TIME_TYPE_NOT_SET: { + break; + } + } switch (has_date_time_case()) { // string date_time = 19; case kDateTime: { @@ -9997,6 +9431,17 @@ size_t Options::ByteSizeLong() const { break; } } + switch (has_shape_match_case()) { + // .valhalla.ShapeMatch shape_match = 28; + case kShapeMatch: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_shape_match()); + break; + } + case HAS_SHAPE_MATCH_NOT_SET: { + break; + } + } switch (has_gps_accuracy_case()) { // float gps_accuracy = 30; case kGpsAccuracy: { @@ -10047,6 +9492,17 @@ size_t Options::ByteSizeLong() const { break; } } + switch (has_shape_format_case()) { + // .valhalla.ShapeFormat shape_format = 38; + case kShapeFormat: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_shape_format()); + break; + } + case HAS_SHAPE_FORMAT_NOT_SET: { + break; + } + } switch (has_alternates_case()) { // uint32 alternates = 39; case kAlternates: { @@ -10142,18 +9598,6 @@ size_t Options::ByteSizeLong() const { break; } } - switch (has_matrix_locations_case()) { - // uint32 matrix_locations = 54; - case kMatrixLocations: { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_matrix_locations()); - break; - } - case HAS_MATRIX_LOCATIONS_NOT_SET: { - break; - } - } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -10175,7 +9619,7 @@ void Options::MergeFrom(const Options& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.costings_.MergeFrom(from._impl_.costings_); + _this->_impl_.costing_options_.MergeFrom(from._impl_.costing_options_); _this->_impl_.locations_.MergeFrom(from._impl_.locations_); _this->_impl_.exclude_locations_.MergeFrom(from._impl_.exclude_locations_); _this->_impl_.sources_.MergeFrom(from._impl_.sources_); @@ -10187,39 +9631,17 @@ void Options::MergeFrom(const Options& from) { _this->_impl_.recostings_.MergeFrom(from._impl_.recostings_); _this->_impl_.exclude_polygons_.MergeFrom(from._impl_.exclude_polygons_); _this->_impl_.expansion_properties_.MergeFrom(from._impl_.expansion_properties_); - if (from._internal_has_pbf_field_selector()) { - _this->_internal_mutable_pbf_field_selector()->::valhalla::PbfFieldSelector::MergeFrom( - from._internal_pbf_field_selector()); - } - if (from._internal_units() != 0) { - _this->_internal_set_units(from._internal_units()); - } - if (from._internal_directions_type() != 0) { - _this->_internal_set_directions_type(from._internal_directions_type()); - } - if (from._internal_format() != 0) { - _this->_internal_set_format(from._internal_format()); - } - if (from._internal_action() != 0) { - _this->_internal_set_action(from._internal_action()); - } - if (from._internal_costing_type() != 0) { - _this->_internal_set_costing_type(from._internal_costing_type()); - } - if (from._internal_date_time_type() != 0) { - _this->_internal_set_date_time_type(from._internal_date_time_type()); - } - if (from._internal_shape_match() != 0) { - _this->_internal_set_shape_match(from._internal_shape_match()); - } if (from._internal_filter_action() != 0) { _this->_internal_set_filter_action(from._internal_filter_action()); } - if (from._internal_shape_format() != 0) { - _this->_internal_set_shape_format(from._internal_shape_format()); - } - if (from._internal_reverse() != 0) { - _this->_internal_set_reverse(from._internal_reverse()); + switch (from.has_units_case()) { + case kUnits: { + _this->_internal_set_units(from._internal_units()); + break; + } + case HAS_UNITS_NOT_SET: { + break; + } } switch (from.has_language_case()) { case kLanguage: { @@ -10230,6 +9652,24 @@ void Options::MergeFrom(const Options& from) { break; } } + switch (from.has_directions_type_case()) { + case kDirectionsType: { + _this->_internal_set_directions_type(from._internal_directions_type()); + break; + } + case HAS_DIRECTIONS_TYPE_NOT_SET: { + break; + } + } + switch (from.has_format_case()) { + case kFormat: { + _this->_internal_set_format(from._internal_format()); + break; + } + case HAS_FORMAT_NOT_SET: { + break; + } + } switch (from.has_id_case()) { case kId: { _this->_internal_set_id(from._internal_id()); @@ -10257,6 +9697,15 @@ void Options::MergeFrom(const Options& from) { break; } } + switch (from.has_action_case()) { + case kAction: { + _this->_internal_set_action(from._internal_action()); + break; + } + case HAS_ACTION_NOT_SET: { + break; + } + } switch (from.has_range_case()) { case kRange: { _this->_internal_set_range(from._internal_range()); @@ -10275,6 +9724,24 @@ void Options::MergeFrom(const Options& from) { break; } } + switch (from.has_costing_case()) { + case kCosting: { + _this->_internal_set_costing(from._internal_costing()); + break; + } + case HAS_COSTING_NOT_SET: { + break; + } + } + switch (from.has_date_time_type_case()) { + case kDateTimeType: { + _this->_internal_set_date_time_type(from._internal_date_time_type()); + break; + } + case HAS_DATE_TIME_TYPE_NOT_SET: { + break; + } + } switch (from.has_date_time_case()) { case kDateTime: { _this->_internal_set_date_time(from._internal_date_time()); @@ -10329,6 +9796,15 @@ void Options::MergeFrom(const Options& from) { break; } } + switch (from.has_shape_match_case()) { + case kShapeMatch: { + _this->_internal_set_shape_match(from._internal_shape_match()); + break; + } + case HAS_SHAPE_MATCH_NOT_SET: { + break; + } + } switch (from.has_gps_accuracy_case()) { case kGpsAccuracy: { _this->_internal_set_gps_accuracy(from._internal_gps_accuracy()); @@ -10374,6 +9850,15 @@ void Options::MergeFrom(const Options& from) { break; } } + switch (from.has_shape_format_case()) { + case kShapeFormat: { + _this->_internal_set_shape_format(from._internal_shape_format()); + break; + } + case HAS_SHAPE_FORMAT_NOT_SET: { + break; + } + } switch (from.has_alternates_case()) { case kAlternates: { _this->_internal_set_alternates(from._internal_alternates()); @@ -10455,15 +9940,6 @@ void Options::MergeFrom(const Options& from) { break; } } - switch (from.has_matrix_locations_case()) { - case kMatrixLocations: { - _this->_internal_set_matrix_locations(from._internal_matrix_locations()); - break; - } - case HAS_MATRIX_LOCATIONS_NOT_SET: { - break; - } - } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -10481,7 +9957,7 @@ bool Options::IsInitialized() const { void Options::InternalSwap(Options* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.costings_.InternalSwap(&other->_impl_.costings_); + _impl_.costing_options_.InternalSwap(&other->_impl_.costing_options_); _impl_.locations_.InternalSwap(&other->_impl_.locations_); _impl_.exclude_locations_.InternalSwap(&other->_impl_.exclude_locations_); _impl_.sources_.InternalSwap(&other->_impl_.sources_); @@ -10493,29 +9969,32 @@ void Options::InternalSwap(Options* other) { _impl_.recostings_.InternalSwap(&other->_impl_.recostings_); _impl_.exclude_polygons_.InternalSwap(&other->_impl_.exclude_polygons_); _impl_.expansion_properties_.InternalSwap(&other->_impl_.expansion_properties_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Options, _impl_.reverse_) - + sizeof(Options::_impl_.reverse_) - - PROTOBUF_FIELD_OFFSET(Options, _impl_.pbf_field_selector_)>( - reinterpret_cast(&_impl_.pbf_field_selector_), - reinterpret_cast(&other->_impl_.pbf_field_selector_)); + swap(_impl_.filter_action_, other->_impl_.filter_action_); + swap(_impl_.has_units_, other->_impl_.has_units_); swap(_impl_.has_language_, other->_impl_.has_language_); + swap(_impl_.has_directions_type_, other->_impl_.has_directions_type_); + swap(_impl_.has_format_, other->_impl_.has_format_); swap(_impl_.has_id_, other->_impl_.has_id_); swap(_impl_.has_jsonp_, other->_impl_.has_jsonp_); swap(_impl_.has_encoded_polyline_, other->_impl_.has_encoded_polyline_); + swap(_impl_.has_action_, other->_impl_.has_action_); swap(_impl_.has_range_, other->_impl_.has_range_); swap(_impl_.has_verbose_, other->_impl_.has_verbose_); + swap(_impl_.has_costing_, other->_impl_.has_costing_); + swap(_impl_.has_date_time_type_, other->_impl_.has_date_time_type_); swap(_impl_.has_date_time_, other->_impl_.has_date_time_); swap(_impl_.has_resample_distance_, other->_impl_.has_resample_distance_); swap(_impl_.has_polygons_, other->_impl_.has_polygons_); swap(_impl_.has_denoise_, other->_impl_.has_denoise_); swap(_impl_.has_generalize_, other->_impl_.has_generalize_); swap(_impl_.has_show_locations_, other->_impl_.has_show_locations_); + swap(_impl_.has_shape_match_, other->_impl_.has_shape_match_); swap(_impl_.has_gps_accuracy_, other->_impl_.has_gps_accuracy_); swap(_impl_.has_search_radius_, other->_impl_.has_search_radius_); swap(_impl_.has_turn_penalty_factor_, other->_impl_.has_turn_penalty_factor_); swap(_impl_.has_breakage_distance_, other->_impl_.has_breakage_distance_); swap(_impl_.has_use_timestamps_, other->_impl_.has_use_timestamps_); + swap(_impl_.has_shape_format_, other->_impl_.has_shape_format_); swap(_impl_.has_alternates_, other->_impl_.has_alternates_); swap(_impl_.has_interpolation_distance_, other->_impl_.has_interpolation_distance_); swap(_impl_.has_guidance_views_, other->_impl_.has_guidance_views_); @@ -10525,7 +10004,6 @@ void Options::InternalSwap(Options* other) { swap(_impl_.has_prioritize_bidirectional_, other->_impl_.has_prioritize_bidirectional_); swap(_impl_.has_expansion_action_, other->_impl_.has_expansion_action_); swap(_impl_.has_skip_opposites_, other->_impl_.has_skip_opposites_); - swap(_impl_.has_matrix_locations_, other->_impl_.has_matrix_locations_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); @@ -10553,6 +10031,13 @@ void Options::InternalSwap(Options* other) { swap(_impl_._oneof_case_[24], other->_impl_._oneof_case_[24]); swap(_impl_._oneof_case_[25], other->_impl_._oneof_case_[25]); swap(_impl_._oneof_case_[26], other->_impl_._oneof_case_[26]); + swap(_impl_._oneof_case_[27], other->_impl_._oneof_case_[27]); + swap(_impl_._oneof_case_[28], other->_impl_._oneof_case_[28]); + swap(_impl_._oneof_case_[29], other->_impl_._oneof_case_[29]); + swap(_impl_._oneof_case_[30], other->_impl_._oneof_case_[30]); + swap(_impl_._oneof_case_[31], other->_impl_._oneof_case_[31]); + swap(_impl_._oneof_case_[32], other->_impl_._oneof_case_[32]); + swap(_impl_._oneof_case_[33], other->_impl_._oneof_case_[33]); } std::string Options::GetTypeName() const { @@ -10567,29 +10052,21 @@ template<> PROTOBUF_NOINLINE ::valhalla::Contour* Arena::CreateMaybeMessage< ::valhalla::Contour >(Arena* arena) { return Arena::CreateMessageInternal< ::valhalla::Contour >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::Ring* -Arena::CreateMaybeMessage< ::valhalla::Ring >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::Ring >(arena); -} -template<> PROTOBUF_NOINLINE ::valhalla::PbfFieldSelector* -Arena::CreateMaybeMessage< ::valhalla::PbfFieldSelector >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::PbfFieldSelector >(arena); -} template<> PROTOBUF_NOINLINE ::valhalla::AvoidEdge* Arena::CreateMaybeMessage< ::valhalla::AvoidEdge >(Arena* arena) { return Arena::CreateMessageInternal< ::valhalla::AvoidEdge >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::Costing_Options* -Arena::CreateMaybeMessage< ::valhalla::Costing_Options >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::Costing_Options >(arena); +template<> PROTOBUF_NOINLINE ::valhalla::CostingOptions* +Arena::CreateMaybeMessage< ::valhalla::CostingOptions >(Arena* arena) { + return Arena::CreateMessageInternal< ::valhalla::CostingOptions >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::Costing* -Arena::CreateMaybeMessage< ::valhalla::Costing >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::Costing >(arena); +template<> PROTOBUF_NOINLINE ::valhalla::Options_Ring* +Arena::CreateMaybeMessage< ::valhalla::Options_Ring >(Arena* arena) { + return Arena::CreateMessageInternal< ::valhalla::Options_Ring >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::Options_CostingsEntry_DoNotUse* -Arena::CreateMaybeMessage< ::valhalla::Options_CostingsEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::Options_CostingsEntry_DoNotUse >(arena); +template<> PROTOBUF_NOINLINE ::valhalla::Options_CostingOptionsEntry_DoNotUse* +Arena::CreateMaybeMessage< ::valhalla::Options_CostingOptionsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::valhalla::Options_CostingOptionsEntry_DoNotUse >(arena); } template<> PROTOBUF_NOINLINE ::valhalla::Options* Arena::CreateMaybeMessage< ::valhalla::Options >(Arena* arena) { diff --git a/include/linux/valhalla/proto/options.pb.h b/include/linux/valhalla/proto/options.pb.h index d3357a5..6f3275c 100644 --- a/include/linux/valhalla/proto/options.pb.h +++ b/include/linux/valhalla/proto/options.pb.h @@ -32,7 +32,7 @@ #include #include #include -#include "common.pb.h" +#include "tripcommon.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_options_2eproto @@ -53,68 +53,29 @@ extern AvoidEdgeDefaultTypeInternal _AvoidEdge_default_instance_; class Contour; struct ContourDefaultTypeInternal; extern ContourDefaultTypeInternal _Contour_default_instance_; -class Costing; -struct CostingDefaultTypeInternal; -extern CostingDefaultTypeInternal _Costing_default_instance_; -class Costing_Options; -struct Costing_OptionsDefaultTypeInternal; -extern Costing_OptionsDefaultTypeInternal _Costing_Options_default_instance_; +class CostingOptions; +struct CostingOptionsDefaultTypeInternal; +extern CostingOptionsDefaultTypeInternal _CostingOptions_default_instance_; class Options; struct OptionsDefaultTypeInternal; extern OptionsDefaultTypeInternal _Options_default_instance_; -class Options_CostingsEntry_DoNotUse; -struct Options_CostingsEntry_DoNotUseDefaultTypeInternal; -extern Options_CostingsEntry_DoNotUseDefaultTypeInternal _Options_CostingsEntry_DoNotUse_default_instance_; -class PbfFieldSelector; -struct PbfFieldSelectorDefaultTypeInternal; -extern PbfFieldSelectorDefaultTypeInternal _PbfFieldSelector_default_instance_; -class Ring; -struct RingDefaultTypeInternal; -extern RingDefaultTypeInternal _Ring_default_instance_; +class Options_CostingOptionsEntry_DoNotUse; +struct Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal; +extern Options_CostingOptionsEntry_DoNotUseDefaultTypeInternal _Options_CostingOptionsEntry_DoNotUse_default_instance_; +class Options_Ring; +struct Options_RingDefaultTypeInternal; +extern Options_RingDefaultTypeInternal _Options_Ring_default_instance_; } // namespace valhalla PROTOBUF_NAMESPACE_OPEN template<> ::valhalla::AvoidEdge* Arena::CreateMaybeMessage<::valhalla::AvoidEdge>(Arena*); template<> ::valhalla::Contour* Arena::CreateMaybeMessage<::valhalla::Contour>(Arena*); -template<> ::valhalla::Costing* Arena::CreateMaybeMessage<::valhalla::Costing>(Arena*); -template<> ::valhalla::Costing_Options* Arena::CreateMaybeMessage<::valhalla::Costing_Options>(Arena*); +template<> ::valhalla::CostingOptions* Arena::CreateMaybeMessage<::valhalla::CostingOptions>(Arena*); template<> ::valhalla::Options* Arena::CreateMaybeMessage<::valhalla::Options>(Arena*); -template<> ::valhalla::Options_CostingsEntry_DoNotUse* Arena::CreateMaybeMessage<::valhalla::Options_CostingsEntry_DoNotUse>(Arena*); -template<> ::valhalla::PbfFieldSelector* Arena::CreateMaybeMessage<::valhalla::PbfFieldSelector>(Arena*); -template<> ::valhalla::Ring* Arena::CreateMaybeMessage<::valhalla::Ring>(Arena*); +template<> ::valhalla::Options_CostingOptionsEntry_DoNotUse* Arena::CreateMaybeMessage<::valhalla::Options_CostingOptionsEntry_DoNotUse>(Arena*); +template<> ::valhalla::Options_Ring* Arena::CreateMaybeMessage<::valhalla::Options_Ring>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace valhalla { -enum Costing_Type : int { - Costing_Type_none_ = 0, - Costing_Type_bicycle = 1, - Costing_Type_bus = 2, - Costing_Type_motor_scooter = 3, - Costing_Type_multimodal = 4, - Costing_Type_pedestrian = 5, - Costing_Type_transit = 6, - Costing_Type_truck = 7, - Costing_Type_motorcycle = 8, - Costing_Type_taxi = 9, - Costing_Type_auto_ = 10, - Costing_Type_bikeshare = 11, - Costing_Type_Costing_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - Costing_Type_Costing_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool Costing_Type_IsValid(int value); -constexpr Costing_Type Costing_Type_Type_MIN = Costing_Type_none_; -constexpr Costing_Type Costing_Type_Type_MAX = Costing_Type_bikeshare; -constexpr int Costing_Type_Type_ARRAYSIZE = Costing_Type_Type_MAX + 1; - -const std::string& Costing_Type_Name(Costing_Type value); -template -inline const std::string& Costing_Type_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function Costing_Type_Name."); - return Costing_Type_Name(static_cast(enum_t_value)); -} -bool Costing_Type_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Costing_Type* value); enum Options_Units : int { Options_Units_kilometers = 0, Options_Units_miles = 1, @@ -160,25 +121,25 @@ inline const std::string& Options_Format_Name(T enum_t_value) { bool Options_Format_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Options_Format* value); enum Options_Action : int { - Options_Action_no_action = 0, - Options_Action_route = 1, - Options_Action_locate = 2, - Options_Action_sources_to_targets = 3, - Options_Action_optimized_route = 4, - Options_Action_isochrone = 5, - Options_Action_trace_route = 6, - Options_Action_trace_attributes = 7, - Options_Action_height = 8, - Options_Action_transit_available = 9, - Options_Action_expansion = 10, - Options_Action_centroid = 11, - Options_Action_status = 12, + Options_Action_route = 0, + Options_Action_locate = 1, + Options_Action_sources_to_targets = 2, + Options_Action_optimized_route = 3, + Options_Action_isochrone = 4, + Options_Action_trace_route = 5, + Options_Action_trace_attributes = 6, + Options_Action_height = 7, + Options_Action_transit_available = 8, + Options_Action_expansion = 9, + Options_Action_centroid = 10, + Options_Action_status = 11, + Options_Action_livespeed = 12, Options_Action_Options_Action_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), Options_Action_Options_Action_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool Options_Action_IsValid(int value); -constexpr Options_Action Options_Action_Action_MIN = Options_Action_no_action; -constexpr Options_Action Options_Action_Action_MAX = Options_Action_status; +constexpr Options_Action Options_Action_Action_MIN = Options_Action_route; +constexpr Options_Action Options_Action_Action_MAX = Options_Action_livespeed; constexpr int Options_Action_Action_ARRAYSIZE = Options_Action_Action_MAX + 1; const std::string& Options_Action_Name(Options_Action value); @@ -192,16 +153,15 @@ inline const std::string& Options_Action_Name(T enum_t_value) { bool Options_Action_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Options_Action* value); enum Options_DateTimeType : int { - Options_DateTimeType_no_time = 0, - Options_DateTimeType_current = 1, - Options_DateTimeType_depart_at = 2, - Options_DateTimeType_arrive_by = 3, - Options_DateTimeType_invariant = 4, + Options_DateTimeType_current = 0, + Options_DateTimeType_depart_at = 1, + Options_DateTimeType_arrive_by = 2, + Options_DateTimeType_invariant = 3, Options_DateTimeType_Options_DateTimeType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), Options_DateTimeType_Options_DateTimeType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool Options_DateTimeType_IsValid(int value); -constexpr Options_DateTimeType Options_DateTimeType_DateTimeType_MIN = Options_DateTimeType_no_time; +constexpr Options_DateTimeType Options_DateTimeType_DateTimeType_MIN = Options_DateTimeType_current; constexpr Options_DateTimeType Options_DateTimeType_DateTimeType_MAX = Options_DateTimeType_invariant; constexpr int Options_DateTimeType_DateTimeType_ARRAYSIZE = Options_DateTimeType_DateTimeType_MAX + 1; @@ -327,6 +287,37 @@ inline const std::string& ShapeFormat_Name(T enum_t_value) { } bool ShapeFormat_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ShapeFormat* value); +enum Costing : int { + auto_ = 0, + bicycle = 1, + bus = 2, + motor_scooter = 3, + multimodal = 4, + pedestrian = 5, + transit = 6, + truck = 7, + motorcycle = 8, + taxi = 9, + none_ = 10, + bikeshare = 11, + Costing_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + Costing_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool Costing_IsValid(int value); +constexpr Costing Costing_MIN = auto_; +constexpr Costing Costing_MAX = bikeshare; +constexpr int Costing_ARRAYSIZE = Costing_MAX + 1; + +const std::string& Costing_Name(Costing value); +template +inline const std::string& Costing_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Costing_Name."); + return Costing_Name(static_cast(enum_t_value)); +} +bool Costing_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Costing* value); // =================================================================== class Contour final : @@ -545,308 +536,6 @@ class Contour final : }; // ------------------------------------------------------------------- -class Ring final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Ring) */ { - public: - inline Ring() : Ring(nullptr) {} - ~Ring() override; - explicit PROTOBUF_CONSTEXPR Ring(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Ring(const Ring& from); - Ring(Ring&& from) noexcept - : Ring() { - *this = ::std::move(from); - } - - inline Ring& operator=(const Ring& from) { - CopyFrom(from); - return *this; - } - inline Ring& operator=(Ring&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const Ring& default_instance() { - return *internal_default_instance(); - } - static inline const Ring* internal_default_instance() { - return reinterpret_cast( - &_Ring_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Ring& a, Ring& b) { - a.Swap(&b); - } - inline void Swap(Ring* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Ring* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Ring* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const Ring& from); - void MergeFrom(const Ring& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(Ring* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.Ring"; - } - protected: - explicit Ring(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kCoordsFieldNumber = 1, - }; - // repeated .valhalla.LatLng coords = 1; - int coords_size() const; - private: - int _internal_coords_size() const; - public: - void clear_coords(); - ::valhalla::LatLng* mutable_coords(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >* - mutable_coords(); - private: - const ::valhalla::LatLng& _internal_coords(int index) const; - ::valhalla::LatLng* _internal_add_coords(); - public: - const ::valhalla::LatLng& coords(int index) const; - ::valhalla::LatLng* add_coords(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >& - coords() const; - - // @@protoc_insertion_point(class_scope:valhalla.Ring) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng > coords_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_options_2eproto; -}; -// ------------------------------------------------------------------- - -class PbfFieldSelector final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.PbfFieldSelector) */ { - public: - inline PbfFieldSelector() : PbfFieldSelector(nullptr) {} - ~PbfFieldSelector() override; - explicit PROTOBUF_CONSTEXPR PbfFieldSelector(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - PbfFieldSelector(const PbfFieldSelector& from); - PbfFieldSelector(PbfFieldSelector&& from) noexcept - : PbfFieldSelector() { - *this = ::std::move(from); - } - - inline PbfFieldSelector& operator=(const PbfFieldSelector& from) { - CopyFrom(from); - return *this; - } - inline PbfFieldSelector& operator=(PbfFieldSelector&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const PbfFieldSelector& default_instance() { - return *internal_default_instance(); - } - static inline const PbfFieldSelector* internal_default_instance() { - return reinterpret_cast( - &_PbfFieldSelector_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(PbfFieldSelector& a, PbfFieldSelector& b) { - a.Swap(&b); - } - inline void Swap(PbfFieldSelector* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(PbfFieldSelector* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - PbfFieldSelector* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const PbfFieldSelector& from); - void MergeFrom(const PbfFieldSelector& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(PbfFieldSelector* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.PbfFieldSelector"; - } - protected: - explicit PbfFieldSelector(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kOptionsFieldNumber = 1, - kTripFieldNumber = 2, - kDirectionsFieldNumber = 3, - kStatusFieldNumber = 4, - }; - // bool options = 1; - void clear_options(); - bool options() const; - void set_options(bool value); - private: - bool _internal_options() const; - void _internal_set_options(bool value); - public: - - // bool trip = 2; - void clear_trip(); - bool trip() const; - void set_trip(bool value); - private: - bool _internal_trip() const; - void _internal_set_trip(bool value); - public: - - // bool directions = 3; - void clear_directions(); - bool directions() const; - void set_directions(bool value); - private: - bool _internal_directions() const; - void _internal_set_directions(bool value); - public: - - // bool status = 4; - void clear_status(); - bool status() const; - void set_status(bool value); - private: - bool _internal_status() const; - void _internal_set_status(bool value); - public: - - // @@protoc_insertion_point(class_scope:valhalla.PbfFieldSelector) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - bool options_; - bool trip_; - bool directions_; - bool status_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_options_2eproto; -}; -// ------------------------------------------------------------------- - class AvoidEdge final : public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.AvoidEdge) */ { public: @@ -896,7 +585,7 @@ class AvoidEdge final : &_AvoidEdge_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 1; friend void swap(AvoidEdge& a, AvoidEdge& b) { a.Swap(&b); @@ -1028,24 +717,24 @@ class AvoidEdge final : }; // ------------------------------------------------------------------- -class Costing_Options final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Costing.Options) */ { +class CostingOptions final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.CostingOptions) */ { public: - inline Costing_Options() : Costing_Options(nullptr) {} - ~Costing_Options() override; - explicit PROTOBUF_CONSTEXPR Costing_Options(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline CostingOptions() : CostingOptions(nullptr) {} + ~CostingOptions() override; + explicit PROTOBUF_CONSTEXPR CostingOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - Costing_Options(const Costing_Options& from); - Costing_Options(Costing_Options&& from) noexcept - : Costing_Options() { + CostingOptions(const CostingOptions& from); + CostingOptions(CostingOptions&& from) noexcept + : CostingOptions() { *this = ::std::move(from); } - inline Costing_Options& operator=(const Costing_Options& from) { + inline CostingOptions& operator=(const CostingOptions& from) { CopyFrom(from); return *this; } - inline Costing_Options& operator=(Costing_Options&& from) noexcept { + inline CostingOptions& operator=(CostingOptions&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -1059,7 +748,7 @@ class Costing_Options final : return *this; } - static const Costing_Options& default_instance() { + static const CostingOptions& default_instance() { return *internal_default_instance(); } enum HasManeuverPenaltyCase { @@ -1417,22 +1106,32 @@ class Costing_Options final : HAS_RESTRICTION_PROBABILITY_NOT_SET = 0, }; - enum HasElevatorPenaltyCase { - kElevatorPenalty = 79, - HAS_ELEVATOR_PENALTY_NOT_SET = 0, + enum HasCostingCase { + kCosting = 90, + HAS_COSTING_NOT_SET = 0, + }; + + enum HasNameCase { + kName = 91, + HAS_NAME_NOT_SET = 0, }; - static inline const Costing_Options* internal_default_instance() { - return reinterpret_cast( - &_Costing_Options_default_instance_); + enum HasFilterClosuresCase { + kFilterClosures = 93, + HAS_FILTER_CLOSURES_NOT_SET = 0, + }; + + static inline const CostingOptions* internal_default_instance() { + return reinterpret_cast( + &_CostingOptions_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 2; - friend void swap(Costing_Options& a, Costing_Options& b) { + friend void swap(CostingOptions& a, CostingOptions& b) { a.Swap(&b); } - inline void Swap(Costing_Options* other) { + inline void Swap(CostingOptions* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -1445,7 +1144,7 @@ class Costing_Options final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Costing_Options* other) { + void UnsafeArenaSwap(CostingOptions* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -1453,12 +1152,12 @@ class Costing_Options final : // implements Message ---------------------------------------------- - Costing_Options* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + CostingOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const Costing_Options& from); - void MergeFrom(const Costing_Options& from); + void CopyFrom(const CostingOptions& from); + void MergeFrom(const CostingOptions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1472,15 +1171,15 @@ class Costing_Options final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(Costing_Options* other); + void InternalSwap(CostingOptions* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.Costing.Options"; + return "valhalla.CostingOptions"; } protected: - explicit Costing_Options(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit CostingOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -1494,14 +1193,10 @@ class Costing_Options final : kFilterStopIdsFieldNumber = 50, kFilterOperatorIdsFieldNumber = 52, kFilterRouteIdsFieldNumber = 54, - kExcludeEdgesFieldNumber = 78, + kExcludeEdgesFieldNumber = 92, kFilterStopActionFieldNumber = 49, kFilterOperatorActionFieldNumber = 51, kFilterRouteActionFieldNumber = 53, - kFixedSpeedFieldNumber = 80, - kAxleCountFieldNumber = 81, - kUseLitFieldNumber = 82, - kDisableHierarchyPruningFieldNumber = 83, kManeuverPenaltyFieldNumber = 1, kDestinationOnlyPenaltyFieldNumber = 2, kGateCostFieldNumber = 3, @@ -1573,7 +1268,9 @@ class Costing_Options final : kIncludeHov3FieldNumber = 75, kExcludeCashOnlyTollsFieldNumber = 76, kRestrictionProbabilityFieldNumber = 77, - kElevatorPenaltyFieldNumber = 79, + kCostingFieldNumber = 90, + kNameFieldNumber = 91, + kFilterClosuresFieldNumber = 93, }; // repeated string filter_stop_ids = 50; int filter_stop_ids_size() const; @@ -1647,7 +1344,7 @@ class Costing_Options final : std::string* _internal_add_filter_route_ids(); public: - // repeated .valhalla.AvoidEdge exclude_edges = 78; + // repeated .valhalla.AvoidEdge exclude_edges = 92; int exclude_edges_size() const; private: int _internal_exclude_edges_size() const; @@ -1692,42 +1389,6 @@ class Costing_Options final : void _internal_set_filter_route_action(::valhalla::FilterAction value); public: - // uint32 fixed_speed = 80; - void clear_fixed_speed(); - uint32_t fixed_speed() const; - void set_fixed_speed(uint32_t value); - private: - uint32_t _internal_fixed_speed() const; - void _internal_set_fixed_speed(uint32_t value); - public: - - // uint32 axle_count = 81; - void clear_axle_count(); - uint32_t axle_count() const; - void set_axle_count(uint32_t value); - private: - uint32_t _internal_axle_count() const; - void _internal_set_axle_count(uint32_t value); - public: - - // float use_lit = 82; - void clear_use_lit(); - float use_lit() const; - void set_use_lit(float value); - private: - float _internal_use_lit() const; - void _internal_set_use_lit(float value); - public: - - // bool disable_hierarchy_pruning = 83; - void clear_disable_hierarchy_pruning(); - bool disable_hierarchy_pruning() const; - void set_disable_hierarchy_pruning(bool value); - private: - bool _internal_disable_hierarchy_pruning() const; - void _internal_set_disable_hierarchy_pruning(bool value); - public: - // float maneuver_penalty = 1; bool has_maneuver_penalty() const; private: @@ -2656,17 +2317,48 @@ class Costing_Options final : void _internal_set_restriction_probability(uint32_t value); public: - // float elevator_penalty = 79; - bool has_elevator_penalty() const; + // .valhalla.Costing costing = 90; + bool has_costing() const; private: - bool _internal_has_elevator_penalty() const; + bool _internal_has_costing() const; public: - void clear_elevator_penalty(); - float elevator_penalty() const; - void set_elevator_penalty(float value); + void clear_costing(); + ::valhalla::Costing costing() const; + void set_costing(::valhalla::Costing value); private: - float _internal_elevator_penalty() const; - void _internal_set_elevator_penalty(float value); + ::valhalla::Costing _internal_costing() const; + void _internal_set_costing(::valhalla::Costing value); + public: + + // string name = 91; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bool filter_closures = 93; + bool has_filter_closures() const; + private: + bool _internal_has_filter_closures() const; + public: + void clear_filter_closures(); + bool filter_closures() const; + void set_filter_closures(bool value); + private: + bool _internal_filter_closures() const; + void _internal_set_filter_closures(bool value); public: void clear_has_maneuver_penalty(); @@ -2811,9 +2503,13 @@ class Costing_Options final : HasExcludeCashOnlyTollsCase has_exclude_cash_only_tolls_case() const; void clear_has_restriction_probability(); HasRestrictionProbabilityCase has_restriction_probability_case() const; - void clear_has_elevator_penalty(); - HasElevatorPenaltyCase has_elevator_penalty_case() const; - // @@protoc_insertion_point(class_scope:valhalla.Costing.Options) + void clear_has_costing(); + HasCostingCase has_costing_case() const; + void clear_has_name(); + HasNameCase has_name_case() const; + void clear_has_filter_closures(); + HasFilterClosuresCase has_filter_closures_case() const; + // @@protoc_insertion_point(class_scope:valhalla.CostingOptions) private: class _Internal; void set_has_maneuver_penalty(); @@ -2887,7 +2583,9 @@ class Costing_Options final : void set_has_include_hov3(); void set_has_exclude_cash_only_tolls(); void set_has_restriction_probability(); - void set_has_elevator_penalty(); + void set_has_costing(); + void set_has_name(); + void set_has_filter_closures(); inline bool has_has_maneuver_penalty() const; inline void clear_has_has_maneuver_penalty(); @@ -3102,8 +2800,14 @@ class Costing_Options final : inline bool has_has_restriction_probability() const; inline void clear_has_has_restriction_probability(); - inline bool has_has_elevator_penalty() const; - inline void clear_has_has_elevator_penalty(); + inline bool has_has_costing() const; + inline void clear_has_has_costing(); + + inline bool has_has_name() const; + inline void clear_has_has_name(); + + inline bool has_has_filter_closures() const; + inline void clear_has_has_filter_closures(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -3116,10 +2820,6 @@ class Costing_Options final : int filter_stop_action_; int filter_operator_action_; int filter_route_action_; - uint32_t fixed_speed_; - uint32_t axle_count_; - float use_lit_; - bool disable_hierarchy_pruning_; union HasManeuverPenaltyUnion { constexpr HasManeuverPenaltyUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -3475,13 +3175,23 @@ class Costing_Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; uint32_t restriction_probability_; } has_restriction_probability_; - union HasElevatorPenaltyUnion { - constexpr HasElevatorPenaltyUnion() : _constinit_{} {} + union HasCostingUnion { + constexpr HasCostingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int costing_; + } has_costing_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - float elevator_penalty_; - } has_elevator_penalty_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; + union HasFilterClosuresUnion { + constexpr HasFilterClosuresUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool filter_closures_; + } has_filter_closures_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[72]; + uint32_t _oneof_case_[74]; }; union { Impl_ _impl_; }; @@ -3489,24 +3199,24 @@ class Costing_Options final : }; // ------------------------------------------------------------------- -class Costing final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Costing) */ { +class Options_Ring final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Options.Ring) */ { public: - inline Costing() : Costing(nullptr) {} - ~Costing() override; - explicit PROTOBUF_CONSTEXPR Costing(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Options_Ring() : Options_Ring(nullptr) {} + ~Options_Ring() override; + explicit PROTOBUF_CONSTEXPR Options_Ring(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - Costing(const Costing& from); - Costing(Costing&& from) noexcept - : Costing() { + Options_Ring(const Options_Ring& from); + Options_Ring(Options_Ring&& from) noexcept + : Options_Ring() { *this = ::std::move(from); } - inline Costing& operator=(const Costing& from) { + inline Options_Ring& operator=(const Options_Ring& from) { CopyFrom(from); return *this; } - inline Costing& operator=(Costing&& from) noexcept { + inline Options_Ring& operator=(Options_Ring&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3520,35 +3230,20 @@ class Costing final : return *this; } - static const Costing& default_instance() { + static const Options_Ring& default_instance() { return *internal_default_instance(); } - enum HasOptionsCase { - kOptions = 1, - HAS_OPTIONS_NOT_SET = 0, - }; - - enum HasNameCase { - kName = 3, - HAS_NAME_NOT_SET = 0, - }; - - enum HasFilterClosuresCase { - kFilterClosures = 4, - HAS_FILTER_CLOSURES_NOT_SET = 0, - }; - - static inline const Costing* internal_default_instance() { - return reinterpret_cast( - &_Costing_default_instance_); + static inline const Options_Ring* internal_default_instance() { + return reinterpret_cast( + &_Options_Ring_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 3; - friend void swap(Costing& a, Costing& b) { + friend void swap(Options_Ring& a, Options_Ring& b) { a.Swap(&b); } - inline void Swap(Costing* other) { + inline void Swap(Options_Ring* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3561,7 +3256,7 @@ class Costing final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Costing* other) { + void UnsafeArenaSwap(Options_Ring* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3569,12 +3264,12 @@ class Costing final : // implements Message ---------------------------------------------- - Costing* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Options_Ring* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const Costing& from); - void MergeFrom(const Costing& from); + void CopyFrom(const Options_Ring& from); + void MergeFrom(const Options_Ring& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3588,15 +3283,15 @@ class Costing final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(Costing* other); + void InternalSwap(Options_Ring* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.Costing"; + return "valhalla.Options.Ring"; } protected: - explicit Costing(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit Options_Ring(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -3604,186 +3299,60 @@ class Costing final : // nested types ---------------------------------------------------- - typedef Costing_Options Options; - - typedef Costing_Type Type; - static constexpr Type none_ = - Costing_Type_none_; - static constexpr Type bicycle = - Costing_Type_bicycle; - static constexpr Type bus = - Costing_Type_bus; - static constexpr Type motor_scooter = - Costing_Type_motor_scooter; - static constexpr Type multimodal = - Costing_Type_multimodal; - static constexpr Type pedestrian = - Costing_Type_pedestrian; - static constexpr Type transit = - Costing_Type_transit; - static constexpr Type truck = - Costing_Type_truck; - static constexpr Type motorcycle = - Costing_Type_motorcycle; - static constexpr Type taxi = - Costing_Type_taxi; - static constexpr Type auto_ = - Costing_Type_auto_; - static constexpr Type bikeshare = - Costing_Type_bikeshare; - static inline bool Type_IsValid(int value) { - return Costing_Type_IsValid(value); - } - static constexpr Type Type_MIN = - Costing_Type_Type_MIN; - static constexpr Type Type_MAX = - Costing_Type_Type_MAX; - static constexpr int Type_ARRAYSIZE = - Costing_Type_Type_ARRAYSIZE; - template - static inline const std::string& Type_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function Type_Name."); - return Costing_Type_Name(enum_t_value); - } - static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, - Type* value) { - return Costing_Type_Parse(name, value); - } - // accessors ------------------------------------------------------- enum : int { - kTypeFieldNumber = 2, - kOptionsFieldNumber = 1, - kNameFieldNumber = 3, - kFilterClosuresFieldNumber = 4, + kCoordsFieldNumber = 1, }; - // .valhalla.Costing.Type type = 2; - void clear_type(); - ::valhalla::Costing_Type type() const; - void set_type(::valhalla::Costing_Type value); - private: - ::valhalla::Costing_Type _internal_type() const; - void _internal_set_type(::valhalla::Costing_Type value); - public: - - // .valhalla.Costing.Options options = 1; - bool has_options() const; - private: - bool _internal_has_options() const; - public: - void clear_options(); - const ::valhalla::Costing_Options& options() const; - PROTOBUF_NODISCARD ::valhalla::Costing_Options* release_options(); - ::valhalla::Costing_Options* mutable_options(); - void set_allocated_options(::valhalla::Costing_Options* options); - private: - const ::valhalla::Costing_Options& _internal_options() const; - ::valhalla::Costing_Options* _internal_mutable_options(); - public: - void unsafe_arena_set_allocated_options( - ::valhalla::Costing_Options* options); - ::valhalla::Costing_Options* unsafe_arena_release_options(); - - // string name = 3; - bool has_name() const; - private: - bool _internal_has_name() const; - public: - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // bool filter_closures = 4; - bool has_filter_closures() const; + // repeated .valhalla.LatLng coords = 1; + int coords_size() const; private: - bool _internal_has_filter_closures() const; + int _internal_coords_size() const; public: - void clear_filter_closures(); - bool filter_closures() const; - void set_filter_closures(bool value); + void clear_coords(); + ::valhalla::LatLng* mutable_coords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >* + mutable_coords(); private: - bool _internal_filter_closures() const; - void _internal_set_filter_closures(bool value); + const ::valhalla::LatLng& _internal_coords(int index) const; + ::valhalla::LatLng* _internal_add_coords(); public: + const ::valhalla::LatLng& coords(int index) const; + ::valhalla::LatLng* add_coords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >& + coords() const; - void clear_has_options(); - HasOptionsCase has_options_case() const; - void clear_has_name(); - HasNameCase has_name_case() const; - void clear_has_filter_closures(); - HasFilterClosuresCase has_filter_closures_case() const; - // @@protoc_insertion_point(class_scope:valhalla.Costing) + // @@protoc_insertion_point(class_scope:valhalla.Options.Ring) private: class _Internal; - void set_has_options(); - void set_has_name(); - void set_has_filter_closures(); - - inline bool has_has_options() const; - inline void clear_has_has_options(); - - inline bool has_has_name() const; - inline void clear_has_has_name(); - - inline bool has_has_filter_closures() const; - inline void clear_has_has_filter_closures(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - int type_; - union HasOptionsUnion { - constexpr HasOptionsUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::valhalla::Costing_Options* options_; - } has_options_; - union HasNameUnion { - constexpr HasNameUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - } has_name_; - union HasFilterClosuresUnion { - constexpr HasFilterClosuresUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - bool filter_closures_; - } has_filter_closures_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng > coords_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[3]; - }; union { Impl_ _impl_; }; friend struct ::TableStruct_options_2eproto; }; // ------------------------------------------------------------------- -class Options_CostingsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntryLite { public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntryLite SuperType; - Options_CostingsEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR Options_CostingsEntry_DoNotUse( + Options_CostingOptionsEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Options_CostingOptionsEntry_DoNotUse( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit Options_CostingsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const Options_CostingsEntry_DoNotUse& other); - static const Options_CostingsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Options_CostingsEntry_DoNotUse_default_instance_); } + explicit Options_CostingOptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Options_CostingOptionsEntry_DoNotUse& other); + static const Options_CostingOptionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Options_CostingOptionsEntry_DoNotUse_default_instance_); } static bool ValidateKey(void*) { return true; } static bool ValidateValue(void*) { return true; } friend struct ::TableStruct_options_2eproto; @@ -3825,11 +3394,26 @@ class Options final : static const Options& default_instance() { return *internal_default_instance(); } + enum HasUnitsCase { + kUnits = 1, + HAS_UNITS_NOT_SET = 0, + }; + enum HasLanguageCase { kLanguage = 2, HAS_LANGUAGE_NOT_SET = 0, }; + enum HasDirectionsTypeCase { + kDirectionsType = 3, + HAS_DIRECTIONS_TYPE_NOT_SET = 0, + }; + + enum HasFormatCase { + kFormat = 4, + HAS_FORMAT_NOT_SET = 0, + }; + enum HasIdCase { kId = 5, HAS_ID_NOT_SET = 0, @@ -3845,6 +3429,11 @@ class Options final : HAS_ENCODED_POLYLINE_NOT_SET = 0, }; + enum HasActionCase { + kAction = 8, + HAS_ACTION_NOT_SET = 0, + }; + enum HasRangeCase { kRange = 10, HAS_RANGE_NOT_SET = 0, @@ -3855,6 +3444,16 @@ class Options final : HAS_VERBOSE_NOT_SET = 0, }; + enum HasCostingCase { + kCosting = 12, + HAS_COSTING_NOT_SET = 0, + }; + + enum HasDateTimeTypeCase { + kDateTimeType = 18, + HAS_DATE_TIME_TYPE_NOT_SET = 0, + }; + enum HasDateTimeCase { kDateTime = 19, HAS_DATE_TIME_NOT_SET = 0, @@ -3885,6 +3484,11 @@ class Options final : HAS_SHOW_LOCATIONS_NOT_SET = 0, }; + enum HasShapeMatchCase { + kShapeMatch = 28, + HAS_SHAPE_MATCH_NOT_SET = 0, + }; + enum HasGpsAccuracyCase { kGpsAccuracy = 30, HAS_GPS_ACCURACY_NOT_SET = 0, @@ -3910,6 +3514,11 @@ class Options final : HAS_USE_TIMESTAMPS_NOT_SET = 0, }; + enum HasShapeFormatCase { + kShapeFormat = 38, + HAS_SHAPE_FORMAT_NOT_SET = 0, + }; + enum HasAlternatesCase { kAlternates = 39, HAS_ALTERNATES_NOT_SET = 0, @@ -3955,17 +3564,12 @@ class Options final : HAS_SKIP_OPPOSITES_NOT_SET = 0, }; - enum HasMatrixLocationsCase { - kMatrixLocations = 54, - HAS_MATRIX_LOCATIONS_NOT_SET = 0, - }; - static inline const Options* internal_default_instance() { return reinterpret_cast( &_Options_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 5; friend void swap(Options& a, Options& b) { a.Swap(&b); @@ -4026,6 +3630,7 @@ class Options final : // nested types ---------------------------------------------------- + typedef Options_Ring Ring; typedef Options_Units Units; static constexpr Units kilometers = @@ -4084,8 +3689,6 @@ class Options final : } typedef Options_Action Action; - static constexpr Action no_action = - Options_Action_no_action; static constexpr Action route = Options_Action_route; static constexpr Action locate = @@ -4110,6 +3713,8 @@ class Options final : Options_Action_centroid; static constexpr Action status = Options_Action_status; + static constexpr Action livespeed = + Options_Action_livespeed; static inline bool Action_IsValid(int value) { return Options_Action_IsValid(value); } @@ -4132,8 +3737,6 @@ class Options final : } typedef Options_DateTimeType DateTimeType; - static constexpr DateTimeType no_time = - Options_DateTimeType_no_time; static constexpr DateTimeType current = Options_DateTimeType_current; static constexpr DateTimeType depart_at = @@ -4198,7 +3801,7 @@ class Options final : // accessors ------------------------------------------------------- enum : int { - kCostingsFieldNumber = 13, + kCostingOptionsFieldNumber = 13, kLocationsFieldNumber = 14, kExcludeLocationsFieldNumber = 15, kSourcesFieldNumber = 16, @@ -4210,34 +3813,32 @@ class Options final : kRecostingsFieldNumber = 46, kExcludePolygonsFieldNumber = 47, kExpansionPropertiesFieldNumber = 51, - kPbfFieldSelectorFieldNumber = 52, + kFilterActionFieldNumber = 33, kUnitsFieldNumber = 1, + kLanguageFieldNumber = 2, kDirectionsTypeFieldNumber = 3, kFormatFieldNumber = 4, - kActionFieldNumber = 8, - kCostingTypeFieldNumber = 12, - kDateTimeTypeFieldNumber = 18, - kShapeMatchFieldNumber = 28, - kFilterActionFieldNumber = 33, - kShapeFormatFieldNumber = 38, - kReverseFieldNumber = 53, - kLanguageFieldNumber = 2, kIdFieldNumber = 5, kJsonpFieldNumber = 6, kEncodedPolylineFieldNumber = 7, + kActionFieldNumber = 8, kRangeFieldNumber = 10, kVerboseFieldNumber = 11, + kCostingFieldNumber = 12, + kDateTimeTypeFieldNumber = 18, kDateTimeFieldNumber = 19, kResampleDistanceFieldNumber = 21, kPolygonsFieldNumber = 23, kDenoiseFieldNumber = 24, kGeneralizeFieldNumber = 25, kShowLocationsFieldNumber = 26, + kShapeMatchFieldNumber = 28, kGpsAccuracyFieldNumber = 30, kSearchRadiusFieldNumber = 31, kTurnPenaltyFactorFieldNumber = 32, kBreakageDistanceFieldNumber = 36, kUseTimestampsFieldNumber = 37, + kShapeFormatFieldNumber = 38, kAlternatesFieldNumber = 39, kInterpolationDistanceFieldNumber = 40, kGuidanceViewsFieldNumber = 41, @@ -4247,24 +3848,23 @@ class Options final : kPrioritizeBidirectionalFieldNumber = 48, kExpansionActionFieldNumber = 49, kSkipOppositesFieldNumber = 50, - kMatrixLocationsFieldNumber = 54, }; - // map costings = 13; - int costings_size() const; + // map costing_options = 13; + int costing_options_size() const; private: - int _internal_costings_size() const; + int _internal_costing_options_size() const; public: - void clear_costings(); + void clear_costing_options(); private: - const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >& - _internal_costings() const; - ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >* - _internal_mutable_costings(); + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >& + _internal_costing_options() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >* + _internal_mutable_costing_options(); public: - const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >& - costings() const; - ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >* - mutable_costings(); + const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >& + costing_options() const; + ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >* + mutable_costing_options(); // repeated .valhalla.Location locations = 14; int locations_size() const; @@ -4416,40 +4016,40 @@ class Options final : std::string* _internal_add_filter_attributes(); public: - // repeated .valhalla.Costing recostings = 46; + // repeated .valhalla.CostingOptions recostings = 46; int recostings_size() const; private: int _internal_recostings_size() const; public: void clear_recostings(); - ::valhalla::Costing* mutable_recostings(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Costing >* + ::valhalla::CostingOptions* mutable_recostings(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CostingOptions >* mutable_recostings(); private: - const ::valhalla::Costing& _internal_recostings(int index) const; - ::valhalla::Costing* _internal_add_recostings(); + const ::valhalla::CostingOptions& _internal_recostings(int index) const; + ::valhalla::CostingOptions* _internal_add_recostings(); public: - const ::valhalla::Costing& recostings(int index) const; - ::valhalla::Costing* add_recostings(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Costing >& + const ::valhalla::CostingOptions& recostings(int index) const; + ::valhalla::CostingOptions* add_recostings(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CostingOptions >& recostings() const; - // repeated .valhalla.Ring exclude_polygons = 47; + // repeated .valhalla.Options.Ring exclude_polygons = 47; int exclude_polygons_size() const; private: int _internal_exclude_polygons_size() const; public: void clear_exclude_polygons(); - ::valhalla::Ring* mutable_exclude_polygons(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Ring >* + ::valhalla::Options_Ring* mutable_exclude_polygons(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Options_Ring >* mutable_exclude_polygons(); private: - const ::valhalla::Ring& _internal_exclude_polygons(int index) const; - ::valhalla::Ring* _internal_add_exclude_polygons(); + const ::valhalla::Options_Ring& _internal_exclude_polygons(int index) const; + ::valhalla::Options_Ring* _internal_add_exclude_polygons(); public: - const ::valhalla::Ring& exclude_polygons(int index) const; - ::valhalla::Ring* add_exclude_polygons(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Ring >& + const ::valhalla::Options_Ring& exclude_polygons(int index) const; + ::valhalla::Options_Ring* add_exclude_polygons(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Options_Ring >& exclude_polygons() const; // repeated .valhalla.Options.ExpansionProperties expansion_properties = 51; @@ -4466,89 +4066,8 @@ class Options final : ::valhalla::Options_ExpansionProperties expansion_properties(int index) const; void set_expansion_properties(int index, ::valhalla::Options_ExpansionProperties value); void add_expansion_properties(::valhalla::Options_ExpansionProperties value); - const ::PROTOBUF_NAMESPACE_ID::RepeatedField& expansion_properties() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_expansion_properties(); - - // .valhalla.PbfFieldSelector pbf_field_selector = 52; - bool has_pbf_field_selector() const; - private: - bool _internal_has_pbf_field_selector() const; - public: - void clear_pbf_field_selector(); - const ::valhalla::PbfFieldSelector& pbf_field_selector() const; - PROTOBUF_NODISCARD ::valhalla::PbfFieldSelector* release_pbf_field_selector(); - ::valhalla::PbfFieldSelector* mutable_pbf_field_selector(); - void set_allocated_pbf_field_selector(::valhalla::PbfFieldSelector* pbf_field_selector); - private: - const ::valhalla::PbfFieldSelector& _internal_pbf_field_selector() const; - ::valhalla::PbfFieldSelector* _internal_mutable_pbf_field_selector(); - public: - void unsafe_arena_set_allocated_pbf_field_selector( - ::valhalla::PbfFieldSelector* pbf_field_selector); - ::valhalla::PbfFieldSelector* unsafe_arena_release_pbf_field_selector(); - - // .valhalla.Options.Units units = 1; - void clear_units(); - ::valhalla::Options_Units units() const; - void set_units(::valhalla::Options_Units value); - private: - ::valhalla::Options_Units _internal_units() const; - void _internal_set_units(::valhalla::Options_Units value); - public: - - // .valhalla.DirectionsType directions_type = 3; - void clear_directions_type(); - ::valhalla::DirectionsType directions_type() const; - void set_directions_type(::valhalla::DirectionsType value); - private: - ::valhalla::DirectionsType _internal_directions_type() const; - void _internal_set_directions_type(::valhalla::DirectionsType value); - public: - - // .valhalla.Options.Format format = 4; - void clear_format(); - ::valhalla::Options_Format format() const; - void set_format(::valhalla::Options_Format value); - private: - ::valhalla::Options_Format _internal_format() const; - void _internal_set_format(::valhalla::Options_Format value); - public: - - // .valhalla.Options.Action action = 8; - void clear_action(); - ::valhalla::Options_Action action() const; - void set_action(::valhalla::Options_Action value); - private: - ::valhalla::Options_Action _internal_action() const; - void _internal_set_action(::valhalla::Options_Action value); - public: - - // .valhalla.Costing.Type costing_type = 12; - void clear_costing_type(); - ::valhalla::Costing_Type costing_type() const; - void set_costing_type(::valhalla::Costing_Type value); - private: - ::valhalla::Costing_Type _internal_costing_type() const; - void _internal_set_costing_type(::valhalla::Costing_Type value); - public: - - // .valhalla.Options.DateTimeType date_time_type = 18; - void clear_date_time_type(); - ::valhalla::Options_DateTimeType date_time_type() const; - void set_date_time_type(::valhalla::Options_DateTimeType value); - private: - ::valhalla::Options_DateTimeType _internal_date_time_type() const; - void _internal_set_date_time_type(::valhalla::Options_DateTimeType value); - public: - - // .valhalla.ShapeMatch shape_match = 28; - void clear_shape_match(); - ::valhalla::ShapeMatch shape_match() const; - void set_shape_match(::valhalla::ShapeMatch value); - private: - ::valhalla::ShapeMatch _internal_shape_match() const; - void _internal_set_shape_match(::valhalla::ShapeMatch value); - public: + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& expansion_properties() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_expansion_properties(); // .valhalla.FilterAction filter_action = 33; void clear_filter_action(); @@ -4559,22 +4078,17 @@ class Options final : void _internal_set_filter_action(::valhalla::FilterAction value); public: - // .valhalla.ShapeFormat shape_format = 38; - void clear_shape_format(); - ::valhalla::ShapeFormat shape_format() const; - void set_shape_format(::valhalla::ShapeFormat value); + // .valhalla.Options.Units units = 1; + bool has_units() const; private: - ::valhalla::ShapeFormat _internal_shape_format() const; - void _internal_set_shape_format(::valhalla::ShapeFormat value); + bool _internal_has_units() const; public: - - // bool reverse = 53; - void clear_reverse(); - bool reverse() const; - void set_reverse(bool value); + void clear_units(); + ::valhalla::Options_Units units() const; + void set_units(::valhalla::Options_Units value); private: - bool _internal_reverse() const; - void _internal_set_reverse(bool value); + ::valhalla::Options_Units _internal_units() const; + void _internal_set_units(::valhalla::Options_Units value); public: // string language = 2; @@ -4595,6 +4109,32 @@ class Options final : std::string* _internal_mutable_language(); public: + // .valhalla.DirectionsType directions_type = 3; + bool has_directions_type() const; + private: + bool _internal_has_directions_type() const; + public: + void clear_directions_type(); + ::valhalla::DirectionsType directions_type() const; + void set_directions_type(::valhalla::DirectionsType value); + private: + ::valhalla::DirectionsType _internal_directions_type() const; + void _internal_set_directions_type(::valhalla::DirectionsType value); + public: + + // .valhalla.Options.Format format = 4; + bool has_format() const; + private: + bool _internal_has_format() const; + public: + void clear_format(); + ::valhalla::Options_Format format() const; + void set_format(::valhalla::Options_Format value); + private: + ::valhalla::Options_Format _internal_format() const; + void _internal_set_format(::valhalla::Options_Format value); + public: + // string id = 5; bool has_id() const; private: @@ -4649,6 +4189,19 @@ class Options final : std::string* _internal_mutable_encoded_polyline(); public: + // .valhalla.Options.Action action = 8; + bool has_action() const; + private: + bool _internal_has_action() const; + public: + void clear_action(); + ::valhalla::Options_Action action() const; + void set_action(::valhalla::Options_Action value); + private: + ::valhalla::Options_Action _internal_action() const; + void _internal_set_action(::valhalla::Options_Action value); + public: + // bool range = 10; bool has_range() const; private: @@ -4675,6 +4228,32 @@ class Options final : void _internal_set_verbose(bool value); public: + // .valhalla.Costing costing = 12; + bool has_costing() const; + private: + bool _internal_has_costing() const; + public: + void clear_costing(); + ::valhalla::Costing costing() const; + void set_costing(::valhalla::Costing value); + private: + ::valhalla::Costing _internal_costing() const; + void _internal_set_costing(::valhalla::Costing value); + public: + + // .valhalla.Options.DateTimeType date_time_type = 18; + bool has_date_time_type() const; + private: + bool _internal_has_date_time_type() const; + public: + void clear_date_time_type(); + ::valhalla::Options_DateTimeType date_time_type() const; + void set_date_time_type(::valhalla::Options_DateTimeType value); + private: + ::valhalla::Options_DateTimeType _internal_date_time_type() const; + void _internal_set_date_time_type(::valhalla::Options_DateTimeType value); + public: + // string date_time = 19; bool has_date_time() const; private: @@ -4758,6 +4337,19 @@ class Options final : void _internal_set_show_locations(bool value); public: + // .valhalla.ShapeMatch shape_match = 28; + bool has_shape_match() const; + private: + bool _internal_has_shape_match() const; + public: + void clear_shape_match(); + ::valhalla::ShapeMatch shape_match() const; + void set_shape_match(::valhalla::ShapeMatch value); + private: + ::valhalla::ShapeMatch _internal_shape_match() const; + void _internal_set_shape_match(::valhalla::ShapeMatch value); + public: + // float gps_accuracy = 30; bool has_gps_accuracy() const; private: @@ -4823,6 +4415,19 @@ class Options final : void _internal_set_use_timestamps(bool value); public: + // .valhalla.ShapeFormat shape_format = 38; + bool has_shape_format() const; + private: + bool _internal_has_shape_format() const; + public: + void clear_shape_format(); + ::valhalla::ShapeFormat shape_format() const; + void set_shape_format(::valhalla::ShapeFormat value); + private: + ::valhalla::ShapeFormat _internal_shape_format() const; + void _internal_set_shape_format(::valhalla::ShapeFormat value); + public: + // uint32 alternates = 39; bool has_alternates() const; private: @@ -4940,31 +4545,30 @@ class Options final : void _internal_set_skip_opposites(bool value); public: - // uint32 matrix_locations = 54; - bool has_matrix_locations() const; - private: - bool _internal_has_matrix_locations() const; - public: - void clear_matrix_locations(); - uint32_t matrix_locations() const; - void set_matrix_locations(uint32_t value); - private: - uint32_t _internal_matrix_locations() const; - void _internal_set_matrix_locations(uint32_t value); - public: - + void clear_has_units(); + HasUnitsCase has_units_case() const; void clear_has_language(); HasLanguageCase has_language_case() const; + void clear_has_directions_type(); + HasDirectionsTypeCase has_directions_type_case() const; + void clear_has_format(); + HasFormatCase has_format_case() const; void clear_has_id(); HasIdCase has_id_case() const; void clear_has_jsonp(); HasJsonpCase has_jsonp_case() const; void clear_has_encoded_polyline(); HasEncodedPolylineCase has_encoded_polyline_case() const; + void clear_has_action(); + HasActionCase has_action_case() const; void clear_has_range(); HasRangeCase has_range_case() const; void clear_has_verbose(); HasVerboseCase has_verbose_case() const; + void clear_has_costing(); + HasCostingCase has_costing_case() const; + void clear_has_date_time_type(); + HasDateTimeTypeCase has_date_time_type_case() const; void clear_has_date_time(); HasDateTimeCase has_date_time_case() const; void clear_has_resample_distance(); @@ -4977,6 +4581,8 @@ class Options final : HasGeneralizeCase has_generalize_case() const; void clear_has_show_locations(); HasShowLocationsCase has_show_locations_case() const; + void clear_has_shape_match(); + HasShapeMatchCase has_shape_match_case() const; void clear_has_gps_accuracy(); HasGpsAccuracyCase has_gps_accuracy_case() const; void clear_has_search_radius(); @@ -4987,6 +4593,8 @@ class Options final : HasBreakageDistanceCase has_breakage_distance_case() const; void clear_has_use_timestamps(); HasUseTimestampsCase has_use_timestamps_case() const; + void clear_has_shape_format(); + HasShapeFormatCase has_shape_format_case() const; void clear_has_alternates(); HasAlternatesCase has_alternates_case() const; void clear_has_interpolation_distance(); @@ -5005,28 +4613,34 @@ class Options final : HasExpansionActionCase has_expansion_action_case() const; void clear_has_skip_opposites(); HasSkipOppositesCase has_skip_opposites_case() const; - void clear_has_matrix_locations(); - HasMatrixLocationsCase has_matrix_locations_case() const; // @@protoc_insertion_point(class_scope:valhalla.Options) private: class _Internal; + void set_has_units(); void set_has_language(); + void set_has_directions_type(); + void set_has_format(); void set_has_id(); void set_has_jsonp(); void set_has_encoded_polyline(); + void set_has_action(); void set_has_range(); void set_has_verbose(); + void set_has_costing(); + void set_has_date_time_type(); void set_has_date_time(); void set_has_resample_distance(); void set_has_polygons(); void set_has_denoise(); void set_has_generalize(); void set_has_show_locations(); + void set_has_shape_match(); void set_has_gps_accuracy(); void set_has_search_radius(); void set_has_turn_penalty_factor(); void set_has_breakage_distance(); void set_has_use_timestamps(); + void set_has_shape_format(); void set_has_alternates(); void set_has_interpolation_distance(); void set_has_guidance_views(); @@ -5036,11 +4650,19 @@ class Options final : void set_has_prioritize_bidirectional(); void set_has_expansion_action(); void set_has_skip_opposites(); - void set_has_matrix_locations(); + + inline bool has_has_units() const; + inline void clear_has_has_units(); inline bool has_has_language() const; inline void clear_has_has_language(); + inline bool has_has_directions_type() const; + inline void clear_has_has_directions_type(); + + inline bool has_has_format() const; + inline void clear_has_has_format(); + inline bool has_has_id() const; inline void clear_has_has_id(); @@ -5050,12 +4672,21 @@ class Options final : inline bool has_has_encoded_polyline() const; inline void clear_has_has_encoded_polyline(); + inline bool has_has_action() const; + inline void clear_has_has_action(); + inline bool has_has_range() const; inline void clear_has_has_range(); inline bool has_has_verbose() const; inline void clear_has_has_verbose(); + inline bool has_has_costing() const; + inline void clear_has_has_costing(); + + inline bool has_has_date_time_type() const; + inline void clear_has_has_date_time_type(); + inline bool has_has_date_time() const; inline void clear_has_has_date_time(); @@ -5074,6 +4705,9 @@ class Options final : inline bool has_has_show_locations() const; inline void clear_has_has_show_locations(); + inline bool has_has_shape_match() const; + inline void clear_has_has_shape_match(); + inline bool has_has_gps_accuracy() const; inline void clear_has_has_gps_accuracy(); @@ -5089,6 +4723,9 @@ class Options final : inline bool has_has_use_timestamps() const; inline void clear_has_has_use_timestamps(); + inline bool has_has_shape_format() const; + inline void clear_has_has_shape_format(); + inline bool has_has_alternates() const; inline void clear_has_has_alternates(); @@ -5116,18 +4753,15 @@ class Options final : inline bool has_has_skip_opposites() const; inline void clear_has_has_skip_opposites(); - inline bool has_has_matrix_locations() const; - inline void clear_has_has_matrix_locations(); - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::internal::MapFieldLite< - Options_CostingsEntry_DoNotUse, - int32_t, ::valhalla::Costing, + Options_CostingOptionsEntry_DoNotUse, + int32_t, ::valhalla::CostingOptions, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> costings_; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> costing_options_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location > locations_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location > exclude_locations_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location > sources_; @@ -5136,26 +4770,31 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Contour > contours_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location > trace_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField filter_attributes_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Costing > recostings_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Ring > exclude_polygons_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CostingOptions > recostings_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Options_Ring > exclude_polygons_; ::PROTOBUF_NAMESPACE_ID::RepeatedField expansion_properties_; mutable std::atomic _expansion_properties_cached_byte_size_; - ::valhalla::PbfFieldSelector* pbf_field_selector_; - int units_; - int directions_type_; - int format_; - int action_; - int costing_type_; - int date_time_type_; - int shape_match_; int filter_action_; - int shape_format_; - bool reverse_; + union HasUnitsUnion { + constexpr HasUnitsUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int units_; + } has_units_; union HasLanguageUnion { constexpr HasLanguageUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr language_; } has_language_; + union HasDirectionsTypeUnion { + constexpr HasDirectionsTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int directions_type_; + } has_directions_type_; + union HasFormatUnion { + constexpr HasFormatUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int format_; + } has_format_; union HasIdUnion { constexpr HasIdUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -5171,6 +4810,11 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encoded_polyline_; } has_encoded_polyline_; + union HasActionUnion { + constexpr HasActionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int action_; + } has_action_; union HasRangeUnion { constexpr HasRangeUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -5181,6 +4825,16 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; bool verbose_; } has_verbose_; + union HasCostingUnion { + constexpr HasCostingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int costing_; + } has_costing_; + union HasDateTimeTypeUnion { + constexpr HasDateTimeTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int date_time_type_; + } has_date_time_type_; union HasDateTimeUnion { constexpr HasDateTimeUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -5211,6 +4865,11 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; bool show_locations_; } has_show_locations_; + union HasShapeMatchUnion { + constexpr HasShapeMatchUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int shape_match_; + } has_shape_match_; union HasGpsAccuracyUnion { constexpr HasGpsAccuracyUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -5236,6 +4895,11 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; bool use_timestamps_; } has_use_timestamps_; + union HasShapeFormatUnion { + constexpr HasShapeFormatUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int shape_format_; + } has_shape_format_; union HasAlternatesUnion { constexpr HasAlternatesUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -5281,13 +4945,8 @@ class Options final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; bool skip_opposites_; } has_skip_opposites_; - union HasMatrixLocationsUnion { - constexpr HasMatrixLocationsUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - uint32_t matrix_locations_; - } has_matrix_locations_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[27]; + uint32_t _oneof_case_[34]; }; union { Impl_ _impl_; }; @@ -5486,131 +5145,6 @@ inline Contour::HasDistanceCase Contour::has_distance_case() const { } // ------------------------------------------------------------------- -// Ring - -// repeated .valhalla.LatLng coords = 1; -inline int Ring::_internal_coords_size() const { - return _impl_.coords_.size(); -} -inline int Ring::coords_size() const { - return _internal_coords_size(); -} -inline ::valhalla::LatLng* Ring::mutable_coords(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Ring.coords) - return _impl_.coords_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >* -Ring::mutable_coords() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Ring.coords) - return &_impl_.coords_; -} -inline const ::valhalla::LatLng& Ring::_internal_coords(int index) const { - return _impl_.coords_.Get(index); -} -inline const ::valhalla::LatLng& Ring::coords(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Ring.coords) - return _internal_coords(index); -} -inline ::valhalla::LatLng* Ring::_internal_add_coords() { - return _impl_.coords_.Add(); -} -inline ::valhalla::LatLng* Ring::add_coords() { - ::valhalla::LatLng* _add = _internal_add_coords(); - // @@protoc_insertion_point(field_add:valhalla.Ring.coords) - return _add; -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >& -Ring::coords() const { - // @@protoc_insertion_point(field_list:valhalla.Ring.coords) - return _impl_.coords_; -} - -// ------------------------------------------------------------------- - -// PbfFieldSelector - -// bool options = 1; -inline void PbfFieldSelector::clear_options() { - _impl_.options_ = false; -} -inline bool PbfFieldSelector::_internal_options() const { - return _impl_.options_; -} -inline bool PbfFieldSelector::options() const { - // @@protoc_insertion_point(field_get:valhalla.PbfFieldSelector.options) - return _internal_options(); -} -inline void PbfFieldSelector::_internal_set_options(bool value) { - - _impl_.options_ = value; -} -inline void PbfFieldSelector::set_options(bool value) { - _internal_set_options(value); - // @@protoc_insertion_point(field_set:valhalla.PbfFieldSelector.options) -} - -// bool trip = 2; -inline void PbfFieldSelector::clear_trip() { - _impl_.trip_ = false; -} -inline bool PbfFieldSelector::_internal_trip() const { - return _impl_.trip_; -} -inline bool PbfFieldSelector::trip() const { - // @@protoc_insertion_point(field_get:valhalla.PbfFieldSelector.trip) - return _internal_trip(); -} -inline void PbfFieldSelector::_internal_set_trip(bool value) { - - _impl_.trip_ = value; -} -inline void PbfFieldSelector::set_trip(bool value) { - _internal_set_trip(value); - // @@protoc_insertion_point(field_set:valhalla.PbfFieldSelector.trip) -} - -// bool directions = 3; -inline void PbfFieldSelector::clear_directions() { - _impl_.directions_ = false; -} -inline bool PbfFieldSelector::_internal_directions() const { - return _impl_.directions_; -} -inline bool PbfFieldSelector::directions() const { - // @@protoc_insertion_point(field_get:valhalla.PbfFieldSelector.directions) - return _internal_directions(); -} -inline void PbfFieldSelector::_internal_set_directions(bool value) { - - _impl_.directions_ = value; -} -inline void PbfFieldSelector::set_directions(bool value) { - _internal_set_directions(value); - // @@protoc_insertion_point(field_set:valhalla.PbfFieldSelector.directions) -} - -// bool status = 4; -inline void PbfFieldSelector::clear_status() { - _impl_.status_ = false; -} -inline bool PbfFieldSelector::_internal_status() const { - return _impl_.status_; -} -inline bool PbfFieldSelector::status() const { - // @@protoc_insertion_point(field_get:valhalla.PbfFieldSelector.status) - return _internal_status(); -} -inline void PbfFieldSelector::_internal_set_status(bool value) { - - _impl_.status_ = value; -} -inline void PbfFieldSelector::set_status(bool value) { - _internal_set_status(value); - // @@protoc_insertion_point(field_set:valhalla.PbfFieldSelector.status) -} - -// ------------------------------------------------------------------- - // AvoidEdge // uint64 id = 1; @@ -5709,1114 +5243,1114 @@ inline AvoidEdge::HasPercentAlongCase AvoidEdge::has_percent_along_case() const } // ------------------------------------------------------------------- -// Costing_Options +// CostingOptions // float maneuver_penalty = 1; -inline bool Costing_Options::_internal_has_maneuver_penalty() const { +inline bool CostingOptions::_internal_has_maneuver_penalty() const { return has_maneuver_penalty_case() == kManeuverPenalty; } -inline bool Costing_Options::has_maneuver_penalty() const { +inline bool CostingOptions::has_maneuver_penalty() const { return _internal_has_maneuver_penalty(); } -inline void Costing_Options::set_has_maneuver_penalty() { +inline void CostingOptions::set_has_maneuver_penalty() { _impl_._oneof_case_[0] = kManeuverPenalty; } -inline void Costing_Options::clear_maneuver_penalty() { +inline void CostingOptions::clear_maneuver_penalty() { if (_internal_has_maneuver_penalty()) { _impl_.has_maneuver_penalty_.maneuver_penalty_ = 0; clear_has_has_maneuver_penalty(); } } -inline float Costing_Options::_internal_maneuver_penalty() const { +inline float CostingOptions::_internal_maneuver_penalty() const { if (_internal_has_maneuver_penalty()) { return _impl_.has_maneuver_penalty_.maneuver_penalty_; } return 0; } -inline void Costing_Options::_internal_set_maneuver_penalty(float value) { +inline void CostingOptions::_internal_set_maneuver_penalty(float value) { if (!_internal_has_maneuver_penalty()) { clear_has_maneuver_penalty(); set_has_maneuver_penalty(); } _impl_.has_maneuver_penalty_.maneuver_penalty_ = value; } -inline float Costing_Options::maneuver_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.maneuver_penalty) +inline float CostingOptions::maneuver_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.maneuver_penalty) return _internal_maneuver_penalty(); } -inline void Costing_Options::set_maneuver_penalty(float value) { +inline void CostingOptions::set_maneuver_penalty(float value) { _internal_set_maneuver_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.maneuver_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.maneuver_penalty) } // float destination_only_penalty = 2; -inline bool Costing_Options::_internal_has_destination_only_penalty() const { +inline bool CostingOptions::_internal_has_destination_only_penalty() const { return has_destination_only_penalty_case() == kDestinationOnlyPenalty; } -inline bool Costing_Options::has_destination_only_penalty() const { +inline bool CostingOptions::has_destination_only_penalty() const { return _internal_has_destination_only_penalty(); } -inline void Costing_Options::set_has_destination_only_penalty() { +inline void CostingOptions::set_has_destination_only_penalty() { _impl_._oneof_case_[1] = kDestinationOnlyPenalty; } -inline void Costing_Options::clear_destination_only_penalty() { +inline void CostingOptions::clear_destination_only_penalty() { if (_internal_has_destination_only_penalty()) { _impl_.has_destination_only_penalty_.destination_only_penalty_ = 0; clear_has_has_destination_only_penalty(); } } -inline float Costing_Options::_internal_destination_only_penalty() const { +inline float CostingOptions::_internal_destination_only_penalty() const { if (_internal_has_destination_only_penalty()) { return _impl_.has_destination_only_penalty_.destination_only_penalty_; } return 0; } -inline void Costing_Options::_internal_set_destination_only_penalty(float value) { +inline void CostingOptions::_internal_set_destination_only_penalty(float value) { if (!_internal_has_destination_only_penalty()) { clear_has_destination_only_penalty(); set_has_destination_only_penalty(); } _impl_.has_destination_only_penalty_.destination_only_penalty_ = value; } -inline float Costing_Options::destination_only_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.destination_only_penalty) +inline float CostingOptions::destination_only_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.destination_only_penalty) return _internal_destination_only_penalty(); } -inline void Costing_Options::set_destination_only_penalty(float value) { +inline void CostingOptions::set_destination_only_penalty(float value) { _internal_set_destination_only_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.destination_only_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.destination_only_penalty) } // float gate_cost = 3; -inline bool Costing_Options::_internal_has_gate_cost() const { +inline bool CostingOptions::_internal_has_gate_cost() const { return has_gate_cost_case() == kGateCost; } -inline bool Costing_Options::has_gate_cost() const { +inline bool CostingOptions::has_gate_cost() const { return _internal_has_gate_cost(); } -inline void Costing_Options::set_has_gate_cost() { +inline void CostingOptions::set_has_gate_cost() { _impl_._oneof_case_[2] = kGateCost; } -inline void Costing_Options::clear_gate_cost() { +inline void CostingOptions::clear_gate_cost() { if (_internal_has_gate_cost()) { _impl_.has_gate_cost_.gate_cost_ = 0; clear_has_has_gate_cost(); } } -inline float Costing_Options::_internal_gate_cost() const { +inline float CostingOptions::_internal_gate_cost() const { if (_internal_has_gate_cost()) { return _impl_.has_gate_cost_.gate_cost_; } return 0; } -inline void Costing_Options::_internal_set_gate_cost(float value) { +inline void CostingOptions::_internal_set_gate_cost(float value) { if (!_internal_has_gate_cost()) { clear_has_gate_cost(); set_has_gate_cost(); } _impl_.has_gate_cost_.gate_cost_ = value; } -inline float Costing_Options::gate_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.gate_cost) +inline float CostingOptions::gate_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.gate_cost) return _internal_gate_cost(); } -inline void Costing_Options::set_gate_cost(float value) { +inline void CostingOptions::set_gate_cost(float value) { _internal_set_gate_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.gate_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.gate_cost) } // float gate_penalty = 4; -inline bool Costing_Options::_internal_has_gate_penalty() const { +inline bool CostingOptions::_internal_has_gate_penalty() const { return has_gate_penalty_case() == kGatePenalty; } -inline bool Costing_Options::has_gate_penalty() const { +inline bool CostingOptions::has_gate_penalty() const { return _internal_has_gate_penalty(); } -inline void Costing_Options::set_has_gate_penalty() { +inline void CostingOptions::set_has_gate_penalty() { _impl_._oneof_case_[3] = kGatePenalty; } -inline void Costing_Options::clear_gate_penalty() { +inline void CostingOptions::clear_gate_penalty() { if (_internal_has_gate_penalty()) { _impl_.has_gate_penalty_.gate_penalty_ = 0; clear_has_has_gate_penalty(); } } -inline float Costing_Options::_internal_gate_penalty() const { +inline float CostingOptions::_internal_gate_penalty() const { if (_internal_has_gate_penalty()) { return _impl_.has_gate_penalty_.gate_penalty_; } return 0; } -inline void Costing_Options::_internal_set_gate_penalty(float value) { +inline void CostingOptions::_internal_set_gate_penalty(float value) { if (!_internal_has_gate_penalty()) { clear_has_gate_penalty(); set_has_gate_penalty(); } _impl_.has_gate_penalty_.gate_penalty_ = value; } -inline float Costing_Options::gate_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.gate_penalty) +inline float CostingOptions::gate_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.gate_penalty) return _internal_gate_penalty(); } -inline void Costing_Options::set_gate_penalty(float value) { +inline void CostingOptions::set_gate_penalty(float value) { _internal_set_gate_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.gate_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.gate_penalty) } // float toll_booth_cost = 5; -inline bool Costing_Options::_internal_has_toll_booth_cost() const { +inline bool CostingOptions::_internal_has_toll_booth_cost() const { return has_toll_booth_cost_case() == kTollBoothCost; } -inline bool Costing_Options::has_toll_booth_cost() const { +inline bool CostingOptions::has_toll_booth_cost() const { return _internal_has_toll_booth_cost(); } -inline void Costing_Options::set_has_toll_booth_cost() { +inline void CostingOptions::set_has_toll_booth_cost() { _impl_._oneof_case_[4] = kTollBoothCost; } -inline void Costing_Options::clear_toll_booth_cost() { +inline void CostingOptions::clear_toll_booth_cost() { if (_internal_has_toll_booth_cost()) { _impl_.has_toll_booth_cost_.toll_booth_cost_ = 0; clear_has_has_toll_booth_cost(); } } -inline float Costing_Options::_internal_toll_booth_cost() const { +inline float CostingOptions::_internal_toll_booth_cost() const { if (_internal_has_toll_booth_cost()) { return _impl_.has_toll_booth_cost_.toll_booth_cost_; } return 0; } -inline void Costing_Options::_internal_set_toll_booth_cost(float value) { +inline void CostingOptions::_internal_set_toll_booth_cost(float value) { if (!_internal_has_toll_booth_cost()) { clear_has_toll_booth_cost(); set_has_toll_booth_cost(); } _impl_.has_toll_booth_cost_.toll_booth_cost_ = value; } -inline float Costing_Options::toll_booth_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.toll_booth_cost) +inline float CostingOptions::toll_booth_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.toll_booth_cost) return _internal_toll_booth_cost(); } -inline void Costing_Options::set_toll_booth_cost(float value) { +inline void CostingOptions::set_toll_booth_cost(float value) { _internal_set_toll_booth_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.toll_booth_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.toll_booth_cost) } // float toll_booth_penalty = 6; -inline bool Costing_Options::_internal_has_toll_booth_penalty() const { +inline bool CostingOptions::_internal_has_toll_booth_penalty() const { return has_toll_booth_penalty_case() == kTollBoothPenalty; } -inline bool Costing_Options::has_toll_booth_penalty() const { +inline bool CostingOptions::has_toll_booth_penalty() const { return _internal_has_toll_booth_penalty(); } -inline void Costing_Options::set_has_toll_booth_penalty() { +inline void CostingOptions::set_has_toll_booth_penalty() { _impl_._oneof_case_[5] = kTollBoothPenalty; } -inline void Costing_Options::clear_toll_booth_penalty() { +inline void CostingOptions::clear_toll_booth_penalty() { if (_internal_has_toll_booth_penalty()) { _impl_.has_toll_booth_penalty_.toll_booth_penalty_ = 0; clear_has_has_toll_booth_penalty(); } } -inline float Costing_Options::_internal_toll_booth_penalty() const { +inline float CostingOptions::_internal_toll_booth_penalty() const { if (_internal_has_toll_booth_penalty()) { return _impl_.has_toll_booth_penalty_.toll_booth_penalty_; } return 0; } -inline void Costing_Options::_internal_set_toll_booth_penalty(float value) { +inline void CostingOptions::_internal_set_toll_booth_penalty(float value) { if (!_internal_has_toll_booth_penalty()) { clear_has_toll_booth_penalty(); set_has_toll_booth_penalty(); } _impl_.has_toll_booth_penalty_.toll_booth_penalty_ = value; } -inline float Costing_Options::toll_booth_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.toll_booth_penalty) +inline float CostingOptions::toll_booth_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.toll_booth_penalty) return _internal_toll_booth_penalty(); } -inline void Costing_Options::set_toll_booth_penalty(float value) { +inline void CostingOptions::set_toll_booth_penalty(float value) { _internal_set_toll_booth_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.toll_booth_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.toll_booth_penalty) } // float alley_penalty = 7; -inline bool Costing_Options::_internal_has_alley_penalty() const { +inline bool CostingOptions::_internal_has_alley_penalty() const { return has_alley_penalty_case() == kAlleyPenalty; } -inline bool Costing_Options::has_alley_penalty() const { +inline bool CostingOptions::has_alley_penalty() const { return _internal_has_alley_penalty(); } -inline void Costing_Options::set_has_alley_penalty() { +inline void CostingOptions::set_has_alley_penalty() { _impl_._oneof_case_[6] = kAlleyPenalty; } -inline void Costing_Options::clear_alley_penalty() { +inline void CostingOptions::clear_alley_penalty() { if (_internal_has_alley_penalty()) { _impl_.has_alley_penalty_.alley_penalty_ = 0; clear_has_has_alley_penalty(); } } -inline float Costing_Options::_internal_alley_penalty() const { +inline float CostingOptions::_internal_alley_penalty() const { if (_internal_has_alley_penalty()) { return _impl_.has_alley_penalty_.alley_penalty_; } return 0; } -inline void Costing_Options::_internal_set_alley_penalty(float value) { +inline void CostingOptions::_internal_set_alley_penalty(float value) { if (!_internal_has_alley_penalty()) { clear_has_alley_penalty(); set_has_alley_penalty(); } _impl_.has_alley_penalty_.alley_penalty_ = value; } -inline float Costing_Options::alley_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.alley_penalty) +inline float CostingOptions::alley_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.alley_penalty) return _internal_alley_penalty(); } -inline void Costing_Options::set_alley_penalty(float value) { +inline void CostingOptions::set_alley_penalty(float value) { _internal_set_alley_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.alley_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.alley_penalty) } // float country_crossing_cost = 8; -inline bool Costing_Options::_internal_has_country_crossing_cost() const { +inline bool CostingOptions::_internal_has_country_crossing_cost() const { return has_country_crossing_cost_case() == kCountryCrossingCost; } -inline bool Costing_Options::has_country_crossing_cost() const { +inline bool CostingOptions::has_country_crossing_cost() const { return _internal_has_country_crossing_cost(); } -inline void Costing_Options::set_has_country_crossing_cost() { +inline void CostingOptions::set_has_country_crossing_cost() { _impl_._oneof_case_[7] = kCountryCrossingCost; } -inline void Costing_Options::clear_country_crossing_cost() { +inline void CostingOptions::clear_country_crossing_cost() { if (_internal_has_country_crossing_cost()) { _impl_.has_country_crossing_cost_.country_crossing_cost_ = 0; clear_has_has_country_crossing_cost(); } } -inline float Costing_Options::_internal_country_crossing_cost() const { +inline float CostingOptions::_internal_country_crossing_cost() const { if (_internal_has_country_crossing_cost()) { return _impl_.has_country_crossing_cost_.country_crossing_cost_; } return 0; } -inline void Costing_Options::_internal_set_country_crossing_cost(float value) { +inline void CostingOptions::_internal_set_country_crossing_cost(float value) { if (!_internal_has_country_crossing_cost()) { clear_has_country_crossing_cost(); set_has_country_crossing_cost(); } _impl_.has_country_crossing_cost_.country_crossing_cost_ = value; } -inline float Costing_Options::country_crossing_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.country_crossing_cost) +inline float CostingOptions::country_crossing_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.country_crossing_cost) return _internal_country_crossing_cost(); } -inline void Costing_Options::set_country_crossing_cost(float value) { +inline void CostingOptions::set_country_crossing_cost(float value) { _internal_set_country_crossing_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.country_crossing_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.country_crossing_cost) } // float country_crossing_penalty = 9; -inline bool Costing_Options::_internal_has_country_crossing_penalty() const { +inline bool CostingOptions::_internal_has_country_crossing_penalty() const { return has_country_crossing_penalty_case() == kCountryCrossingPenalty; } -inline bool Costing_Options::has_country_crossing_penalty() const { +inline bool CostingOptions::has_country_crossing_penalty() const { return _internal_has_country_crossing_penalty(); } -inline void Costing_Options::set_has_country_crossing_penalty() { +inline void CostingOptions::set_has_country_crossing_penalty() { _impl_._oneof_case_[8] = kCountryCrossingPenalty; } -inline void Costing_Options::clear_country_crossing_penalty() { +inline void CostingOptions::clear_country_crossing_penalty() { if (_internal_has_country_crossing_penalty()) { _impl_.has_country_crossing_penalty_.country_crossing_penalty_ = 0; clear_has_has_country_crossing_penalty(); } } -inline float Costing_Options::_internal_country_crossing_penalty() const { +inline float CostingOptions::_internal_country_crossing_penalty() const { if (_internal_has_country_crossing_penalty()) { return _impl_.has_country_crossing_penalty_.country_crossing_penalty_; } return 0; } -inline void Costing_Options::_internal_set_country_crossing_penalty(float value) { +inline void CostingOptions::_internal_set_country_crossing_penalty(float value) { if (!_internal_has_country_crossing_penalty()) { clear_has_country_crossing_penalty(); set_has_country_crossing_penalty(); } _impl_.has_country_crossing_penalty_.country_crossing_penalty_ = value; } -inline float Costing_Options::country_crossing_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.country_crossing_penalty) +inline float CostingOptions::country_crossing_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.country_crossing_penalty) return _internal_country_crossing_penalty(); } -inline void Costing_Options::set_country_crossing_penalty(float value) { +inline void CostingOptions::set_country_crossing_penalty(float value) { _internal_set_country_crossing_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.country_crossing_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.country_crossing_penalty) } // float ferry_cost = 10; -inline bool Costing_Options::_internal_has_ferry_cost() const { +inline bool CostingOptions::_internal_has_ferry_cost() const { return has_ferry_cost_case() == kFerryCost; } -inline bool Costing_Options::has_ferry_cost() const { +inline bool CostingOptions::has_ferry_cost() const { return _internal_has_ferry_cost(); } -inline void Costing_Options::set_has_ferry_cost() { +inline void CostingOptions::set_has_ferry_cost() { _impl_._oneof_case_[9] = kFerryCost; } -inline void Costing_Options::clear_ferry_cost() { +inline void CostingOptions::clear_ferry_cost() { if (_internal_has_ferry_cost()) { _impl_.has_ferry_cost_.ferry_cost_ = 0; clear_has_has_ferry_cost(); } } -inline float Costing_Options::_internal_ferry_cost() const { +inline float CostingOptions::_internal_ferry_cost() const { if (_internal_has_ferry_cost()) { return _impl_.has_ferry_cost_.ferry_cost_; } return 0; } -inline void Costing_Options::_internal_set_ferry_cost(float value) { +inline void CostingOptions::_internal_set_ferry_cost(float value) { if (!_internal_has_ferry_cost()) { clear_has_ferry_cost(); set_has_ferry_cost(); } _impl_.has_ferry_cost_.ferry_cost_ = value; } -inline float Costing_Options::ferry_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.ferry_cost) +inline float CostingOptions::ferry_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.ferry_cost) return _internal_ferry_cost(); } -inline void Costing_Options::set_ferry_cost(float value) { +inline void CostingOptions::set_ferry_cost(float value) { _internal_set_ferry_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.ferry_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.ferry_cost) } // float avoid_bad_surfaces = 11; -inline bool Costing_Options::_internal_has_avoid_bad_surfaces() const { +inline bool CostingOptions::_internal_has_avoid_bad_surfaces() const { return has_avoid_bad_surfaces_case() == kAvoidBadSurfaces; } -inline bool Costing_Options::has_avoid_bad_surfaces() const { +inline bool CostingOptions::has_avoid_bad_surfaces() const { return _internal_has_avoid_bad_surfaces(); } -inline void Costing_Options::set_has_avoid_bad_surfaces() { +inline void CostingOptions::set_has_avoid_bad_surfaces() { _impl_._oneof_case_[10] = kAvoidBadSurfaces; } -inline void Costing_Options::clear_avoid_bad_surfaces() { +inline void CostingOptions::clear_avoid_bad_surfaces() { if (_internal_has_avoid_bad_surfaces()) { _impl_.has_avoid_bad_surfaces_.avoid_bad_surfaces_ = 0; clear_has_has_avoid_bad_surfaces(); } } -inline float Costing_Options::_internal_avoid_bad_surfaces() const { +inline float CostingOptions::_internal_avoid_bad_surfaces() const { if (_internal_has_avoid_bad_surfaces()) { return _impl_.has_avoid_bad_surfaces_.avoid_bad_surfaces_; } return 0; } -inline void Costing_Options::_internal_set_avoid_bad_surfaces(float value) { +inline void CostingOptions::_internal_set_avoid_bad_surfaces(float value) { if (!_internal_has_avoid_bad_surfaces()) { clear_has_avoid_bad_surfaces(); set_has_avoid_bad_surfaces(); } _impl_.has_avoid_bad_surfaces_.avoid_bad_surfaces_ = value; } -inline float Costing_Options::avoid_bad_surfaces() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.avoid_bad_surfaces) +inline float CostingOptions::avoid_bad_surfaces() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.avoid_bad_surfaces) return _internal_avoid_bad_surfaces(); } -inline void Costing_Options::set_avoid_bad_surfaces(float value) { +inline void CostingOptions::set_avoid_bad_surfaces(float value) { _internal_set_avoid_bad_surfaces(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.avoid_bad_surfaces) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.avoid_bad_surfaces) } // float use_ferry = 12; -inline bool Costing_Options::_internal_has_use_ferry() const { +inline bool CostingOptions::_internal_has_use_ferry() const { return has_use_ferry_case() == kUseFerry; } -inline bool Costing_Options::has_use_ferry() const { +inline bool CostingOptions::has_use_ferry() const { return _internal_has_use_ferry(); } -inline void Costing_Options::set_has_use_ferry() { +inline void CostingOptions::set_has_use_ferry() { _impl_._oneof_case_[11] = kUseFerry; } -inline void Costing_Options::clear_use_ferry() { +inline void CostingOptions::clear_use_ferry() { if (_internal_has_use_ferry()) { _impl_.has_use_ferry_.use_ferry_ = 0; clear_has_has_use_ferry(); } } -inline float Costing_Options::_internal_use_ferry() const { +inline float CostingOptions::_internal_use_ferry() const { if (_internal_has_use_ferry()) { return _impl_.has_use_ferry_.use_ferry_; } return 0; } -inline void Costing_Options::_internal_set_use_ferry(float value) { +inline void CostingOptions::_internal_set_use_ferry(float value) { if (!_internal_has_use_ferry()) { clear_has_use_ferry(); set_has_use_ferry(); } _impl_.has_use_ferry_.use_ferry_ = value; } -inline float Costing_Options::use_ferry() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_ferry) +inline float CostingOptions::use_ferry() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_ferry) return _internal_use_ferry(); } -inline void Costing_Options::set_use_ferry(float value) { +inline void CostingOptions::set_use_ferry(float value) { _internal_set_use_ferry(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_ferry) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_ferry) } // float use_highways = 13; -inline bool Costing_Options::_internal_has_use_highways() const { +inline bool CostingOptions::_internal_has_use_highways() const { return has_use_highways_case() == kUseHighways; } -inline bool Costing_Options::has_use_highways() const { +inline bool CostingOptions::has_use_highways() const { return _internal_has_use_highways(); } -inline void Costing_Options::set_has_use_highways() { +inline void CostingOptions::set_has_use_highways() { _impl_._oneof_case_[12] = kUseHighways; } -inline void Costing_Options::clear_use_highways() { +inline void CostingOptions::clear_use_highways() { if (_internal_has_use_highways()) { _impl_.has_use_highways_.use_highways_ = 0; clear_has_has_use_highways(); } } -inline float Costing_Options::_internal_use_highways() const { +inline float CostingOptions::_internal_use_highways() const { if (_internal_has_use_highways()) { return _impl_.has_use_highways_.use_highways_; } return 0; } -inline void Costing_Options::_internal_set_use_highways(float value) { +inline void CostingOptions::_internal_set_use_highways(float value) { if (!_internal_has_use_highways()) { clear_has_use_highways(); set_has_use_highways(); } _impl_.has_use_highways_.use_highways_ = value; } -inline float Costing_Options::use_highways() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_highways) +inline float CostingOptions::use_highways() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_highways) return _internal_use_highways(); } -inline void Costing_Options::set_use_highways(float value) { +inline void CostingOptions::set_use_highways(float value) { _internal_set_use_highways(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_highways) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_highways) } // float use_tolls = 14; -inline bool Costing_Options::_internal_has_use_tolls() const { +inline bool CostingOptions::_internal_has_use_tolls() const { return has_use_tolls_case() == kUseTolls; } -inline bool Costing_Options::has_use_tolls() const { +inline bool CostingOptions::has_use_tolls() const { return _internal_has_use_tolls(); } -inline void Costing_Options::set_has_use_tolls() { +inline void CostingOptions::set_has_use_tolls() { _impl_._oneof_case_[13] = kUseTolls; } -inline void Costing_Options::clear_use_tolls() { +inline void CostingOptions::clear_use_tolls() { if (_internal_has_use_tolls()) { _impl_.has_use_tolls_.use_tolls_ = 0; clear_has_has_use_tolls(); } } -inline float Costing_Options::_internal_use_tolls() const { +inline float CostingOptions::_internal_use_tolls() const { if (_internal_has_use_tolls()) { return _impl_.has_use_tolls_.use_tolls_; } return 0; } -inline void Costing_Options::_internal_set_use_tolls(float value) { +inline void CostingOptions::_internal_set_use_tolls(float value) { if (!_internal_has_use_tolls()) { clear_has_use_tolls(); set_has_use_tolls(); } _impl_.has_use_tolls_.use_tolls_ = value; } -inline float Costing_Options::use_tolls() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_tolls) +inline float CostingOptions::use_tolls() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_tolls) return _internal_use_tolls(); } -inline void Costing_Options::set_use_tolls(float value) { +inline void CostingOptions::set_use_tolls(float value) { _internal_set_use_tolls(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_tolls) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_tolls) } // float use_roads = 15; -inline bool Costing_Options::_internal_has_use_roads() const { +inline bool CostingOptions::_internal_has_use_roads() const { return has_use_roads_case() == kUseRoads; } -inline bool Costing_Options::has_use_roads() const { +inline bool CostingOptions::has_use_roads() const { return _internal_has_use_roads(); } -inline void Costing_Options::set_has_use_roads() { +inline void CostingOptions::set_has_use_roads() { _impl_._oneof_case_[14] = kUseRoads; } -inline void Costing_Options::clear_use_roads() { +inline void CostingOptions::clear_use_roads() { if (_internal_has_use_roads()) { _impl_.has_use_roads_.use_roads_ = 0; clear_has_has_use_roads(); } } -inline float Costing_Options::_internal_use_roads() const { +inline float CostingOptions::_internal_use_roads() const { if (_internal_has_use_roads()) { return _impl_.has_use_roads_.use_roads_; } return 0; } -inline void Costing_Options::_internal_set_use_roads(float value) { +inline void CostingOptions::_internal_set_use_roads(float value) { if (!_internal_has_use_roads()) { clear_has_use_roads(); set_has_use_roads(); } _impl_.has_use_roads_.use_roads_ = value; } -inline float Costing_Options::use_roads() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_roads) +inline float CostingOptions::use_roads() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_roads) return _internal_use_roads(); } -inline void Costing_Options::set_use_roads(float value) { +inline void CostingOptions::set_use_roads(float value) { _internal_set_use_roads(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_roads) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_roads) } // uint32 max_distance = 16; -inline bool Costing_Options::_internal_has_max_distance() const { +inline bool CostingOptions::_internal_has_max_distance() const { return has_max_distance_case() == kMaxDistance; } -inline bool Costing_Options::has_max_distance() const { +inline bool CostingOptions::has_max_distance() const { return _internal_has_max_distance(); } -inline void Costing_Options::set_has_max_distance() { +inline void CostingOptions::set_has_max_distance() { _impl_._oneof_case_[15] = kMaxDistance; } -inline void Costing_Options::clear_max_distance() { +inline void CostingOptions::clear_max_distance() { if (_internal_has_max_distance()) { _impl_.has_max_distance_.max_distance_ = 0u; clear_has_has_max_distance(); } } -inline uint32_t Costing_Options::_internal_max_distance() const { +inline uint32_t CostingOptions::_internal_max_distance() const { if (_internal_has_max_distance()) { return _impl_.has_max_distance_.max_distance_; } return 0u; } -inline void Costing_Options::_internal_set_max_distance(uint32_t value) { +inline void CostingOptions::_internal_set_max_distance(uint32_t value) { if (!_internal_has_max_distance()) { clear_has_max_distance(); set_has_max_distance(); } _impl_.has_max_distance_.max_distance_ = value; } -inline uint32_t Costing_Options::max_distance() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.max_distance) +inline uint32_t CostingOptions::max_distance() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.max_distance) return _internal_max_distance(); } -inline void Costing_Options::set_max_distance(uint32_t value) { +inline void CostingOptions::set_max_distance(uint32_t value) { _internal_set_max_distance(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.max_distance) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.max_distance) } // float walking_speed = 17; -inline bool Costing_Options::_internal_has_walking_speed() const { +inline bool CostingOptions::_internal_has_walking_speed() const { return has_walking_speed_case() == kWalkingSpeed; } -inline bool Costing_Options::has_walking_speed() const { +inline bool CostingOptions::has_walking_speed() const { return _internal_has_walking_speed(); } -inline void Costing_Options::set_has_walking_speed() { +inline void CostingOptions::set_has_walking_speed() { _impl_._oneof_case_[16] = kWalkingSpeed; } -inline void Costing_Options::clear_walking_speed() { +inline void CostingOptions::clear_walking_speed() { if (_internal_has_walking_speed()) { _impl_.has_walking_speed_.walking_speed_ = 0; clear_has_has_walking_speed(); } } -inline float Costing_Options::_internal_walking_speed() const { +inline float CostingOptions::_internal_walking_speed() const { if (_internal_has_walking_speed()) { return _impl_.has_walking_speed_.walking_speed_; } return 0; } -inline void Costing_Options::_internal_set_walking_speed(float value) { +inline void CostingOptions::_internal_set_walking_speed(float value) { if (!_internal_has_walking_speed()) { clear_has_walking_speed(); set_has_walking_speed(); } _impl_.has_walking_speed_.walking_speed_ = value; } -inline float Costing_Options::walking_speed() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.walking_speed) +inline float CostingOptions::walking_speed() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.walking_speed) return _internal_walking_speed(); } -inline void Costing_Options::set_walking_speed(float value) { +inline void CostingOptions::set_walking_speed(float value) { _internal_set_walking_speed(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.walking_speed) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.walking_speed) } // float step_penalty = 18; -inline bool Costing_Options::_internal_has_step_penalty() const { +inline bool CostingOptions::_internal_has_step_penalty() const { return has_step_penalty_case() == kStepPenalty; } -inline bool Costing_Options::has_step_penalty() const { +inline bool CostingOptions::has_step_penalty() const { return _internal_has_step_penalty(); } -inline void Costing_Options::set_has_step_penalty() { +inline void CostingOptions::set_has_step_penalty() { _impl_._oneof_case_[17] = kStepPenalty; } -inline void Costing_Options::clear_step_penalty() { +inline void CostingOptions::clear_step_penalty() { if (_internal_has_step_penalty()) { _impl_.has_step_penalty_.step_penalty_ = 0; clear_has_has_step_penalty(); } } -inline float Costing_Options::_internal_step_penalty() const { +inline float CostingOptions::_internal_step_penalty() const { if (_internal_has_step_penalty()) { return _impl_.has_step_penalty_.step_penalty_; } return 0; } -inline void Costing_Options::_internal_set_step_penalty(float value) { +inline void CostingOptions::_internal_set_step_penalty(float value) { if (!_internal_has_step_penalty()) { clear_has_step_penalty(); set_has_step_penalty(); } _impl_.has_step_penalty_.step_penalty_ = value; } -inline float Costing_Options::step_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.step_penalty) +inline float CostingOptions::step_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.step_penalty) return _internal_step_penalty(); } -inline void Costing_Options::set_step_penalty(float value) { +inline void CostingOptions::set_step_penalty(float value) { _internal_set_step_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.step_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.step_penalty) } // uint32 max_grade = 19; -inline bool Costing_Options::_internal_has_max_grade() const { +inline bool CostingOptions::_internal_has_max_grade() const { return has_max_grade_case() == kMaxGrade; } -inline bool Costing_Options::has_max_grade() const { +inline bool CostingOptions::has_max_grade() const { return _internal_has_max_grade(); } -inline void Costing_Options::set_has_max_grade() { +inline void CostingOptions::set_has_max_grade() { _impl_._oneof_case_[18] = kMaxGrade; } -inline void Costing_Options::clear_max_grade() { +inline void CostingOptions::clear_max_grade() { if (_internal_has_max_grade()) { _impl_.has_max_grade_.max_grade_ = 0u; clear_has_has_max_grade(); } } -inline uint32_t Costing_Options::_internal_max_grade() const { +inline uint32_t CostingOptions::_internal_max_grade() const { if (_internal_has_max_grade()) { return _impl_.has_max_grade_.max_grade_; } return 0u; } -inline void Costing_Options::_internal_set_max_grade(uint32_t value) { +inline void CostingOptions::_internal_set_max_grade(uint32_t value) { if (!_internal_has_max_grade()) { clear_has_max_grade(); set_has_max_grade(); } _impl_.has_max_grade_.max_grade_ = value; } -inline uint32_t Costing_Options::max_grade() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.max_grade) +inline uint32_t CostingOptions::max_grade() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.max_grade) return _internal_max_grade(); } -inline void Costing_Options::set_max_grade(uint32_t value) { +inline void CostingOptions::set_max_grade(uint32_t value) { _internal_set_max_grade(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.max_grade) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.max_grade) } // uint32 max_hiking_difficulty = 20; -inline bool Costing_Options::_internal_has_max_hiking_difficulty() const { +inline bool CostingOptions::_internal_has_max_hiking_difficulty() const { return has_max_hiking_difficulty_case() == kMaxHikingDifficulty; } -inline bool Costing_Options::has_max_hiking_difficulty() const { +inline bool CostingOptions::has_max_hiking_difficulty() const { return _internal_has_max_hiking_difficulty(); } -inline void Costing_Options::set_has_max_hiking_difficulty() { +inline void CostingOptions::set_has_max_hiking_difficulty() { _impl_._oneof_case_[19] = kMaxHikingDifficulty; } -inline void Costing_Options::clear_max_hiking_difficulty() { +inline void CostingOptions::clear_max_hiking_difficulty() { if (_internal_has_max_hiking_difficulty()) { _impl_.has_max_hiking_difficulty_.max_hiking_difficulty_ = 0u; clear_has_has_max_hiking_difficulty(); } } -inline uint32_t Costing_Options::_internal_max_hiking_difficulty() const { +inline uint32_t CostingOptions::_internal_max_hiking_difficulty() const { if (_internal_has_max_hiking_difficulty()) { return _impl_.has_max_hiking_difficulty_.max_hiking_difficulty_; } return 0u; } -inline void Costing_Options::_internal_set_max_hiking_difficulty(uint32_t value) { +inline void CostingOptions::_internal_set_max_hiking_difficulty(uint32_t value) { if (!_internal_has_max_hiking_difficulty()) { clear_has_max_hiking_difficulty(); set_has_max_hiking_difficulty(); } _impl_.has_max_hiking_difficulty_.max_hiking_difficulty_ = value; } -inline uint32_t Costing_Options::max_hiking_difficulty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.max_hiking_difficulty) +inline uint32_t CostingOptions::max_hiking_difficulty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.max_hiking_difficulty) return _internal_max_hiking_difficulty(); } -inline void Costing_Options::set_max_hiking_difficulty(uint32_t value) { +inline void CostingOptions::set_max_hiking_difficulty(uint32_t value) { _internal_set_max_hiking_difficulty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.max_hiking_difficulty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.max_hiking_difficulty) } // float mode_factor = 21; -inline bool Costing_Options::_internal_has_mode_factor() const { +inline bool CostingOptions::_internal_has_mode_factor() const { return has_mode_factor_case() == kModeFactor; } -inline bool Costing_Options::has_mode_factor() const { +inline bool CostingOptions::has_mode_factor() const { return _internal_has_mode_factor(); } -inline void Costing_Options::set_has_mode_factor() { +inline void CostingOptions::set_has_mode_factor() { _impl_._oneof_case_[20] = kModeFactor; } -inline void Costing_Options::clear_mode_factor() { +inline void CostingOptions::clear_mode_factor() { if (_internal_has_mode_factor()) { _impl_.has_mode_factor_.mode_factor_ = 0; clear_has_has_mode_factor(); } } -inline float Costing_Options::_internal_mode_factor() const { +inline float CostingOptions::_internal_mode_factor() const { if (_internal_has_mode_factor()) { return _impl_.has_mode_factor_.mode_factor_; } return 0; } -inline void Costing_Options::_internal_set_mode_factor(float value) { +inline void CostingOptions::_internal_set_mode_factor(float value) { if (!_internal_has_mode_factor()) { clear_has_mode_factor(); set_has_mode_factor(); } _impl_.has_mode_factor_.mode_factor_ = value; } -inline float Costing_Options::mode_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.mode_factor) +inline float CostingOptions::mode_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.mode_factor) return _internal_mode_factor(); } -inline void Costing_Options::set_mode_factor(float value) { +inline void CostingOptions::set_mode_factor(float value) { _internal_set_mode_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.mode_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.mode_factor) } // float walkway_factor = 22; -inline bool Costing_Options::_internal_has_walkway_factor() const { +inline bool CostingOptions::_internal_has_walkway_factor() const { return has_walkway_factor_case() == kWalkwayFactor; } -inline bool Costing_Options::has_walkway_factor() const { +inline bool CostingOptions::has_walkway_factor() const { return _internal_has_walkway_factor(); } -inline void Costing_Options::set_has_walkway_factor() { +inline void CostingOptions::set_has_walkway_factor() { _impl_._oneof_case_[21] = kWalkwayFactor; } -inline void Costing_Options::clear_walkway_factor() { +inline void CostingOptions::clear_walkway_factor() { if (_internal_has_walkway_factor()) { _impl_.has_walkway_factor_.walkway_factor_ = 0; clear_has_has_walkway_factor(); } } -inline float Costing_Options::_internal_walkway_factor() const { +inline float CostingOptions::_internal_walkway_factor() const { if (_internal_has_walkway_factor()) { return _impl_.has_walkway_factor_.walkway_factor_; } return 0; } -inline void Costing_Options::_internal_set_walkway_factor(float value) { +inline void CostingOptions::_internal_set_walkway_factor(float value) { if (!_internal_has_walkway_factor()) { clear_has_walkway_factor(); set_has_walkway_factor(); } _impl_.has_walkway_factor_.walkway_factor_ = value; } -inline float Costing_Options::walkway_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.walkway_factor) +inline float CostingOptions::walkway_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.walkway_factor) return _internal_walkway_factor(); } -inline void Costing_Options::set_walkway_factor(float value) { +inline void CostingOptions::set_walkway_factor(float value) { _internal_set_walkway_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.walkway_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.walkway_factor) } // float sidewalk_factor = 23; -inline bool Costing_Options::_internal_has_sidewalk_factor() const { +inline bool CostingOptions::_internal_has_sidewalk_factor() const { return has_sidewalk_factor_case() == kSidewalkFactor; } -inline bool Costing_Options::has_sidewalk_factor() const { +inline bool CostingOptions::has_sidewalk_factor() const { return _internal_has_sidewalk_factor(); } -inline void Costing_Options::set_has_sidewalk_factor() { +inline void CostingOptions::set_has_sidewalk_factor() { _impl_._oneof_case_[22] = kSidewalkFactor; } -inline void Costing_Options::clear_sidewalk_factor() { +inline void CostingOptions::clear_sidewalk_factor() { if (_internal_has_sidewalk_factor()) { _impl_.has_sidewalk_factor_.sidewalk_factor_ = 0; clear_has_has_sidewalk_factor(); } } -inline float Costing_Options::_internal_sidewalk_factor() const { +inline float CostingOptions::_internal_sidewalk_factor() const { if (_internal_has_sidewalk_factor()) { return _impl_.has_sidewalk_factor_.sidewalk_factor_; } return 0; } -inline void Costing_Options::_internal_set_sidewalk_factor(float value) { +inline void CostingOptions::_internal_set_sidewalk_factor(float value) { if (!_internal_has_sidewalk_factor()) { clear_has_sidewalk_factor(); set_has_sidewalk_factor(); } _impl_.has_sidewalk_factor_.sidewalk_factor_ = value; } -inline float Costing_Options::sidewalk_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.sidewalk_factor) +inline float CostingOptions::sidewalk_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.sidewalk_factor) return _internal_sidewalk_factor(); } -inline void Costing_Options::set_sidewalk_factor(float value) { +inline void CostingOptions::set_sidewalk_factor(float value) { _internal_set_sidewalk_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.sidewalk_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.sidewalk_factor) } // float alley_factor = 24; -inline bool Costing_Options::_internal_has_alley_factor() const { +inline bool CostingOptions::_internal_has_alley_factor() const { return has_alley_factor_case() == kAlleyFactor; } -inline bool Costing_Options::has_alley_factor() const { +inline bool CostingOptions::has_alley_factor() const { return _internal_has_alley_factor(); } -inline void Costing_Options::set_has_alley_factor() { +inline void CostingOptions::set_has_alley_factor() { _impl_._oneof_case_[23] = kAlleyFactor; } -inline void Costing_Options::clear_alley_factor() { +inline void CostingOptions::clear_alley_factor() { if (_internal_has_alley_factor()) { _impl_.has_alley_factor_.alley_factor_ = 0; clear_has_has_alley_factor(); } } -inline float Costing_Options::_internal_alley_factor() const { +inline float CostingOptions::_internal_alley_factor() const { if (_internal_has_alley_factor()) { return _impl_.has_alley_factor_.alley_factor_; } return 0; } -inline void Costing_Options::_internal_set_alley_factor(float value) { +inline void CostingOptions::_internal_set_alley_factor(float value) { if (!_internal_has_alley_factor()) { clear_has_alley_factor(); set_has_alley_factor(); } _impl_.has_alley_factor_.alley_factor_ = value; } -inline float Costing_Options::alley_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.alley_factor) +inline float CostingOptions::alley_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.alley_factor) return _internal_alley_factor(); } -inline void Costing_Options::set_alley_factor(float value) { +inline void CostingOptions::set_alley_factor(float value) { _internal_set_alley_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.alley_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.alley_factor) } // float driveway_factor = 25; -inline bool Costing_Options::_internal_has_driveway_factor() const { +inline bool CostingOptions::_internal_has_driveway_factor() const { return has_driveway_factor_case() == kDrivewayFactor; } -inline bool Costing_Options::has_driveway_factor() const { +inline bool CostingOptions::has_driveway_factor() const { return _internal_has_driveway_factor(); } -inline void Costing_Options::set_has_driveway_factor() { +inline void CostingOptions::set_has_driveway_factor() { _impl_._oneof_case_[24] = kDrivewayFactor; } -inline void Costing_Options::clear_driveway_factor() { +inline void CostingOptions::clear_driveway_factor() { if (_internal_has_driveway_factor()) { _impl_.has_driveway_factor_.driveway_factor_ = 0; clear_has_has_driveway_factor(); } } -inline float Costing_Options::_internal_driveway_factor() const { +inline float CostingOptions::_internal_driveway_factor() const { if (_internal_has_driveway_factor()) { return _impl_.has_driveway_factor_.driveway_factor_; } return 0; } -inline void Costing_Options::_internal_set_driveway_factor(float value) { +inline void CostingOptions::_internal_set_driveway_factor(float value) { if (!_internal_has_driveway_factor()) { clear_has_driveway_factor(); set_has_driveway_factor(); } _impl_.has_driveway_factor_.driveway_factor_ = value; } -inline float Costing_Options::driveway_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.driveway_factor) +inline float CostingOptions::driveway_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.driveway_factor) return _internal_driveway_factor(); } -inline void Costing_Options::set_driveway_factor(float value) { +inline void CostingOptions::set_driveway_factor(float value) { _internal_set_driveway_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.driveway_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.driveway_factor) } // float driveway_penalty = 26; -inline bool Costing_Options::_internal_has_driveway_penalty() const { +inline bool CostingOptions::_internal_has_driveway_penalty() const { return has_driveway_penalty_case() == kDrivewayPenalty; } -inline bool Costing_Options::has_driveway_penalty() const { +inline bool CostingOptions::has_driveway_penalty() const { return _internal_has_driveway_penalty(); } -inline void Costing_Options::set_has_driveway_penalty() { +inline void CostingOptions::set_has_driveway_penalty() { _impl_._oneof_case_[25] = kDrivewayPenalty; } -inline void Costing_Options::clear_driveway_penalty() { +inline void CostingOptions::clear_driveway_penalty() { if (_internal_has_driveway_penalty()) { _impl_.has_driveway_penalty_.driveway_penalty_ = 0; clear_has_has_driveway_penalty(); } } -inline float Costing_Options::_internal_driveway_penalty() const { +inline float CostingOptions::_internal_driveway_penalty() const { if (_internal_has_driveway_penalty()) { return _impl_.has_driveway_penalty_.driveway_penalty_; } return 0; } -inline void Costing_Options::_internal_set_driveway_penalty(float value) { +inline void CostingOptions::_internal_set_driveway_penalty(float value) { if (!_internal_has_driveway_penalty()) { clear_has_driveway_penalty(); set_has_driveway_penalty(); } _impl_.has_driveway_penalty_.driveway_penalty_ = value; } -inline float Costing_Options::driveway_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.driveway_penalty) +inline float CostingOptions::driveway_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.driveway_penalty) return _internal_driveway_penalty(); } -inline void Costing_Options::set_driveway_penalty(float value) { +inline void CostingOptions::set_driveway_penalty(float value) { _internal_set_driveway_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.driveway_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.driveway_penalty) } // uint32 transit_start_end_max_distance = 27; -inline bool Costing_Options::_internal_has_transit_start_end_max_distance() const { +inline bool CostingOptions::_internal_has_transit_start_end_max_distance() const { return has_transit_start_end_max_distance_case() == kTransitStartEndMaxDistance; } -inline bool Costing_Options::has_transit_start_end_max_distance() const { +inline bool CostingOptions::has_transit_start_end_max_distance() const { return _internal_has_transit_start_end_max_distance(); } -inline void Costing_Options::set_has_transit_start_end_max_distance() { +inline void CostingOptions::set_has_transit_start_end_max_distance() { _impl_._oneof_case_[26] = kTransitStartEndMaxDistance; } -inline void Costing_Options::clear_transit_start_end_max_distance() { +inline void CostingOptions::clear_transit_start_end_max_distance() { if (_internal_has_transit_start_end_max_distance()) { _impl_.has_transit_start_end_max_distance_.transit_start_end_max_distance_ = 0u; clear_has_has_transit_start_end_max_distance(); } } -inline uint32_t Costing_Options::_internal_transit_start_end_max_distance() const { +inline uint32_t CostingOptions::_internal_transit_start_end_max_distance() const { if (_internal_has_transit_start_end_max_distance()) { return _impl_.has_transit_start_end_max_distance_.transit_start_end_max_distance_; } return 0u; } -inline void Costing_Options::_internal_set_transit_start_end_max_distance(uint32_t value) { +inline void CostingOptions::_internal_set_transit_start_end_max_distance(uint32_t value) { if (!_internal_has_transit_start_end_max_distance()) { clear_has_transit_start_end_max_distance(); set_has_transit_start_end_max_distance(); } _impl_.has_transit_start_end_max_distance_.transit_start_end_max_distance_ = value; } -inline uint32_t Costing_Options::transit_start_end_max_distance() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.transit_start_end_max_distance) +inline uint32_t CostingOptions::transit_start_end_max_distance() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.transit_start_end_max_distance) return _internal_transit_start_end_max_distance(); } -inline void Costing_Options::set_transit_start_end_max_distance(uint32_t value) { +inline void CostingOptions::set_transit_start_end_max_distance(uint32_t value) { _internal_set_transit_start_end_max_distance(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.transit_start_end_max_distance) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.transit_start_end_max_distance) } // uint32 transit_transfer_max_distance = 28; -inline bool Costing_Options::_internal_has_transit_transfer_max_distance() const { +inline bool CostingOptions::_internal_has_transit_transfer_max_distance() const { return has_transit_transfer_max_distance_case() == kTransitTransferMaxDistance; } -inline bool Costing_Options::has_transit_transfer_max_distance() const { +inline bool CostingOptions::has_transit_transfer_max_distance() const { return _internal_has_transit_transfer_max_distance(); } -inline void Costing_Options::set_has_transit_transfer_max_distance() { +inline void CostingOptions::set_has_transit_transfer_max_distance() { _impl_._oneof_case_[27] = kTransitTransferMaxDistance; } -inline void Costing_Options::clear_transit_transfer_max_distance() { +inline void CostingOptions::clear_transit_transfer_max_distance() { if (_internal_has_transit_transfer_max_distance()) { _impl_.has_transit_transfer_max_distance_.transit_transfer_max_distance_ = 0u; clear_has_has_transit_transfer_max_distance(); } } -inline uint32_t Costing_Options::_internal_transit_transfer_max_distance() const { +inline uint32_t CostingOptions::_internal_transit_transfer_max_distance() const { if (_internal_has_transit_transfer_max_distance()) { return _impl_.has_transit_transfer_max_distance_.transit_transfer_max_distance_; } return 0u; } -inline void Costing_Options::_internal_set_transit_transfer_max_distance(uint32_t value) { +inline void CostingOptions::_internal_set_transit_transfer_max_distance(uint32_t value) { if (!_internal_has_transit_transfer_max_distance()) { clear_has_transit_transfer_max_distance(); set_has_transit_transfer_max_distance(); } _impl_.has_transit_transfer_max_distance_.transit_transfer_max_distance_ = value; } -inline uint32_t Costing_Options::transit_transfer_max_distance() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.transit_transfer_max_distance) +inline uint32_t CostingOptions::transit_transfer_max_distance() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.transit_transfer_max_distance) return _internal_transit_transfer_max_distance(); } -inline void Costing_Options::set_transit_transfer_max_distance(uint32_t value) { +inline void CostingOptions::set_transit_transfer_max_distance(uint32_t value) { _internal_set_transit_transfer_max_distance(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.transit_transfer_max_distance) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.transit_transfer_max_distance) } // string transport_type = 29; -inline bool Costing_Options::_internal_has_transport_type() const { +inline bool CostingOptions::_internal_has_transport_type() const { return has_transport_type_case() == kTransportType; } -inline bool Costing_Options::has_transport_type() const { +inline bool CostingOptions::has_transport_type() const { return _internal_has_transport_type(); } -inline void Costing_Options::set_has_transport_type() { +inline void CostingOptions::set_has_transport_type() { _impl_._oneof_case_[28] = kTransportType; } -inline void Costing_Options::clear_transport_type() { +inline void CostingOptions::clear_transport_type() { if (_internal_has_transport_type()) { _impl_.has_transport_type_.transport_type_.Destroy(); clear_has_has_transport_type(); } } -inline const std::string& Costing_Options::transport_type() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.transport_type) +inline const std::string& CostingOptions::transport_type() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.transport_type) return _internal_transport_type(); } template -inline void Costing_Options::set_transport_type(ArgT0&& arg0, ArgT... args) { +inline void CostingOptions::set_transport_type(ArgT0&& arg0, ArgT... args) { if (!_internal_has_transport_type()) { clear_has_transport_type(); set_has_transport_type(); _impl_.has_transport_type_.transport_type_.InitDefault(); } _impl_.has_transport_type_.transport_type_.Set( static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.transport_type) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.transport_type) } -inline std::string* Costing_Options::mutable_transport_type() { +inline std::string* CostingOptions::mutable_transport_type() { std::string* _s = _internal_mutable_transport_type(); - // @@protoc_insertion_point(field_mutable:valhalla.Costing.Options.transport_type) + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.transport_type) return _s; } -inline const std::string& Costing_Options::_internal_transport_type() const { +inline const std::string& CostingOptions::_internal_transport_type() const { if (_internal_has_transport_type()) { return _impl_.has_transport_type_.transport_type_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } -inline void Costing_Options::_internal_set_transport_type(const std::string& value) { +inline void CostingOptions::_internal_set_transport_type(const std::string& value) { if (!_internal_has_transport_type()) { clear_has_transport_type(); set_has_transport_type(); @@ -6824,7 +6358,7 @@ inline void Costing_Options::_internal_set_transport_type(const std::string& val } _impl_.has_transport_type_.transport_type_.Set(value, GetArenaForAllocation()); } -inline std::string* Costing_Options::_internal_mutable_transport_type() { +inline std::string* CostingOptions::_internal_mutable_transport_type() { if (!_internal_has_transport_type()) { clear_has_transport_type(); set_has_transport_type(); @@ -6832,8 +6366,8 @@ inline std::string* Costing_Options::_internal_mutable_transport_type() { } return _impl_.has_transport_type_.transport_type_.Mutable( GetArenaForAllocation()); } -inline std::string* Costing_Options::release_transport_type() { - // @@protoc_insertion_point(field_release:valhalla.Costing.Options.transport_type) +inline std::string* CostingOptions::release_transport_type() { + // @@protoc_insertion_point(field_release:valhalla.CostingOptions.transport_type) if (_internal_has_transport_type()) { clear_has_has_transport_type(); return _impl_.has_transport_type_.transport_type_.Release(); @@ -6841,7 +6375,7 @@ inline std::string* Costing_Options::release_transport_type() { return nullptr; } } -inline void Costing_Options::set_allocated_transport_type(std::string* transport_type) { +inline void CostingOptions::set_allocated_transport_type(std::string* transport_type) { if (has_has_transport_type()) { clear_has_transport_type(); } @@ -6849,2936 +6383,2790 @@ inline void Costing_Options::set_allocated_transport_type(std::string* transport set_has_transport_type(); _impl_.has_transport_type_.transport_type_.InitAllocated(transport_type, GetArenaForAllocation()); } - // @@protoc_insertion_point(field_set_allocated:valhalla.Costing.Options.transport_type) + // @@protoc_insertion_point(field_set_allocated:valhalla.CostingOptions.transport_type) } // float top_speed = 30; -inline bool Costing_Options::_internal_has_top_speed() const { +inline bool CostingOptions::_internal_has_top_speed() const { return has_top_speed_case() == kTopSpeed; } -inline bool Costing_Options::has_top_speed() const { +inline bool CostingOptions::has_top_speed() const { return _internal_has_top_speed(); } -inline void Costing_Options::set_has_top_speed() { +inline void CostingOptions::set_has_top_speed() { _impl_._oneof_case_[29] = kTopSpeed; } -inline void Costing_Options::clear_top_speed() { +inline void CostingOptions::clear_top_speed() { if (_internal_has_top_speed()) { _impl_.has_top_speed_.top_speed_ = 0; clear_has_has_top_speed(); } } -inline float Costing_Options::_internal_top_speed() const { +inline float CostingOptions::_internal_top_speed() const { if (_internal_has_top_speed()) { return _impl_.has_top_speed_.top_speed_; } return 0; } -inline void Costing_Options::_internal_set_top_speed(float value) { +inline void CostingOptions::_internal_set_top_speed(float value) { if (!_internal_has_top_speed()) { clear_has_top_speed(); set_has_top_speed(); } _impl_.has_top_speed_.top_speed_ = value; } -inline float Costing_Options::top_speed() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.top_speed) +inline float CostingOptions::top_speed() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.top_speed) return _internal_top_speed(); } -inline void Costing_Options::set_top_speed(float value) { +inline void CostingOptions::set_top_speed(float value) { _internal_set_top_speed(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.top_speed) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.top_speed) } // float use_hills = 31; -inline bool Costing_Options::_internal_has_use_hills() const { +inline bool CostingOptions::_internal_has_use_hills() const { return has_use_hills_case() == kUseHills; } -inline bool Costing_Options::has_use_hills() const { +inline bool CostingOptions::has_use_hills() const { return _internal_has_use_hills(); } -inline void Costing_Options::set_has_use_hills() { +inline void CostingOptions::set_has_use_hills() { _impl_._oneof_case_[30] = kUseHills; } -inline void Costing_Options::clear_use_hills() { +inline void CostingOptions::clear_use_hills() { if (_internal_has_use_hills()) { _impl_.has_use_hills_.use_hills_ = 0; clear_has_has_use_hills(); } } -inline float Costing_Options::_internal_use_hills() const { +inline float CostingOptions::_internal_use_hills() const { if (_internal_has_use_hills()) { return _impl_.has_use_hills_.use_hills_; } return 0; } -inline void Costing_Options::_internal_set_use_hills(float value) { +inline void CostingOptions::_internal_set_use_hills(float value) { if (!_internal_has_use_hills()) { clear_has_use_hills(); set_has_use_hills(); } _impl_.has_use_hills_.use_hills_ = value; } -inline float Costing_Options::use_hills() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_hills) +inline float CostingOptions::use_hills() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_hills) return _internal_use_hills(); } -inline void Costing_Options::set_use_hills(float value) { +inline void CostingOptions::set_use_hills(float value) { _internal_set_use_hills(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_hills) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_hills) } // float use_primary = 32; -inline bool Costing_Options::_internal_has_use_primary() const { +inline bool CostingOptions::_internal_has_use_primary() const { return has_use_primary_case() == kUsePrimary; } -inline bool Costing_Options::has_use_primary() const { +inline bool CostingOptions::has_use_primary() const { return _internal_has_use_primary(); } -inline void Costing_Options::set_has_use_primary() { +inline void CostingOptions::set_has_use_primary() { _impl_._oneof_case_[31] = kUsePrimary; } -inline void Costing_Options::clear_use_primary() { +inline void CostingOptions::clear_use_primary() { if (_internal_has_use_primary()) { _impl_.has_use_primary_.use_primary_ = 0; clear_has_has_use_primary(); } } -inline float Costing_Options::_internal_use_primary() const { +inline float CostingOptions::_internal_use_primary() const { if (_internal_has_use_primary()) { return _impl_.has_use_primary_.use_primary_; } return 0; } -inline void Costing_Options::_internal_set_use_primary(float value) { +inline void CostingOptions::_internal_set_use_primary(float value) { if (!_internal_has_use_primary()) { clear_has_use_primary(); set_has_use_primary(); } _impl_.has_use_primary_.use_primary_ = value; } -inline float Costing_Options::use_primary() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_primary) +inline float CostingOptions::use_primary() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_primary) return _internal_use_primary(); } -inline void Costing_Options::set_use_primary(float value) { +inline void CostingOptions::set_use_primary(float value) { _internal_set_use_primary(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_primary) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_primary) } // float use_trails = 33; -inline bool Costing_Options::_internal_has_use_trails() const { +inline bool CostingOptions::_internal_has_use_trails() const { return has_use_trails_case() == kUseTrails; } -inline bool Costing_Options::has_use_trails() const { +inline bool CostingOptions::has_use_trails() const { return _internal_has_use_trails(); } -inline void Costing_Options::set_has_use_trails() { +inline void CostingOptions::set_has_use_trails() { _impl_._oneof_case_[32] = kUseTrails; } -inline void Costing_Options::clear_use_trails() { +inline void CostingOptions::clear_use_trails() { if (_internal_has_use_trails()) { _impl_.has_use_trails_.use_trails_ = 0; clear_has_has_use_trails(); } } -inline float Costing_Options::_internal_use_trails() const { +inline float CostingOptions::_internal_use_trails() const { if (_internal_has_use_trails()) { return _impl_.has_use_trails_.use_trails_; } return 0; } -inline void Costing_Options::_internal_set_use_trails(float value) { +inline void CostingOptions::_internal_set_use_trails(float value) { if (!_internal_has_use_trails()) { clear_has_use_trails(); set_has_use_trails(); } _impl_.has_use_trails_.use_trails_ = value; } -inline float Costing_Options::use_trails() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_trails) +inline float CostingOptions::use_trails() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_trails) return _internal_use_trails(); } -inline void Costing_Options::set_use_trails(float value) { +inline void CostingOptions::set_use_trails(float value) { _internal_set_use_trails(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_trails) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_trails) } // float low_class_penalty = 34; -inline bool Costing_Options::_internal_has_low_class_penalty() const { +inline bool CostingOptions::_internal_has_low_class_penalty() const { return has_low_class_penalty_case() == kLowClassPenalty; } -inline bool Costing_Options::has_low_class_penalty() const { +inline bool CostingOptions::has_low_class_penalty() const { return _internal_has_low_class_penalty(); } -inline void Costing_Options::set_has_low_class_penalty() { +inline void CostingOptions::set_has_low_class_penalty() { _impl_._oneof_case_[33] = kLowClassPenalty; } -inline void Costing_Options::clear_low_class_penalty() { +inline void CostingOptions::clear_low_class_penalty() { if (_internal_has_low_class_penalty()) { _impl_.has_low_class_penalty_.low_class_penalty_ = 0; clear_has_has_low_class_penalty(); } } -inline float Costing_Options::_internal_low_class_penalty() const { +inline float CostingOptions::_internal_low_class_penalty() const { if (_internal_has_low_class_penalty()) { return _impl_.has_low_class_penalty_.low_class_penalty_; } return 0; } -inline void Costing_Options::_internal_set_low_class_penalty(float value) { +inline void CostingOptions::_internal_set_low_class_penalty(float value) { if (!_internal_has_low_class_penalty()) { clear_has_low_class_penalty(); set_has_low_class_penalty(); } _impl_.has_low_class_penalty_.low_class_penalty_ = value; } -inline float Costing_Options::low_class_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.low_class_penalty) +inline float CostingOptions::low_class_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.low_class_penalty) return _internal_low_class_penalty(); } -inline void Costing_Options::set_low_class_penalty(float value) { +inline void CostingOptions::set_low_class_penalty(float value) { _internal_set_low_class_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.low_class_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.low_class_penalty) } // bool hazmat = 35; -inline bool Costing_Options::_internal_has_hazmat() const { +inline bool CostingOptions::_internal_has_hazmat() const { return has_hazmat_case() == kHazmat; } -inline bool Costing_Options::has_hazmat() const { +inline bool CostingOptions::has_hazmat() const { return _internal_has_hazmat(); } -inline void Costing_Options::set_has_hazmat() { +inline void CostingOptions::set_has_hazmat() { _impl_._oneof_case_[34] = kHazmat; } -inline void Costing_Options::clear_hazmat() { +inline void CostingOptions::clear_hazmat() { if (_internal_has_hazmat()) { _impl_.has_hazmat_.hazmat_ = false; clear_has_has_hazmat(); } } -inline bool Costing_Options::_internal_hazmat() const { +inline bool CostingOptions::_internal_hazmat() const { if (_internal_has_hazmat()) { return _impl_.has_hazmat_.hazmat_; } return false; } -inline void Costing_Options::_internal_set_hazmat(bool value) { +inline void CostingOptions::_internal_set_hazmat(bool value) { if (!_internal_has_hazmat()) { clear_has_hazmat(); set_has_hazmat(); } _impl_.has_hazmat_.hazmat_ = value; } -inline bool Costing_Options::hazmat() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.hazmat) +inline bool CostingOptions::hazmat() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.hazmat) return _internal_hazmat(); } -inline void Costing_Options::set_hazmat(bool value) { +inline void CostingOptions::set_hazmat(bool value) { _internal_set_hazmat(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.hazmat) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.hazmat) } // float weight = 36; -inline bool Costing_Options::_internal_has_weight() const { +inline bool CostingOptions::_internal_has_weight() const { return has_weight_case() == kWeight; } -inline bool Costing_Options::has_weight() const { +inline bool CostingOptions::has_weight() const { return _internal_has_weight(); } -inline void Costing_Options::set_has_weight() { +inline void CostingOptions::set_has_weight() { _impl_._oneof_case_[35] = kWeight; } -inline void Costing_Options::clear_weight() { +inline void CostingOptions::clear_weight() { if (_internal_has_weight()) { _impl_.has_weight_.weight_ = 0; clear_has_has_weight(); } } -inline float Costing_Options::_internal_weight() const { +inline float CostingOptions::_internal_weight() const { if (_internal_has_weight()) { return _impl_.has_weight_.weight_; } return 0; } -inline void Costing_Options::_internal_set_weight(float value) { +inline void CostingOptions::_internal_set_weight(float value) { if (!_internal_has_weight()) { clear_has_weight(); set_has_weight(); } _impl_.has_weight_.weight_ = value; } -inline float Costing_Options::weight() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.weight) +inline float CostingOptions::weight() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.weight) return _internal_weight(); } -inline void Costing_Options::set_weight(float value) { +inline void CostingOptions::set_weight(float value) { _internal_set_weight(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.weight) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.weight) } // float axle_load = 37; -inline bool Costing_Options::_internal_has_axle_load() const { +inline bool CostingOptions::_internal_has_axle_load() const { return has_axle_load_case() == kAxleLoad; } -inline bool Costing_Options::has_axle_load() const { +inline bool CostingOptions::has_axle_load() const { return _internal_has_axle_load(); } -inline void Costing_Options::set_has_axle_load() { +inline void CostingOptions::set_has_axle_load() { _impl_._oneof_case_[36] = kAxleLoad; } -inline void Costing_Options::clear_axle_load() { +inline void CostingOptions::clear_axle_load() { if (_internal_has_axle_load()) { _impl_.has_axle_load_.axle_load_ = 0; clear_has_has_axle_load(); } } -inline float Costing_Options::_internal_axle_load() const { +inline float CostingOptions::_internal_axle_load() const { if (_internal_has_axle_load()) { return _impl_.has_axle_load_.axle_load_; } return 0; } -inline void Costing_Options::_internal_set_axle_load(float value) { +inline void CostingOptions::_internal_set_axle_load(float value) { if (!_internal_has_axle_load()) { clear_has_axle_load(); set_has_axle_load(); } _impl_.has_axle_load_.axle_load_ = value; } -inline float Costing_Options::axle_load() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.axle_load) +inline float CostingOptions::axle_load() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.axle_load) return _internal_axle_load(); } -inline void Costing_Options::set_axle_load(float value) { +inline void CostingOptions::set_axle_load(float value) { _internal_set_axle_load(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.axle_load) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.axle_load) } // float height = 38; -inline bool Costing_Options::_internal_has_height() const { +inline bool CostingOptions::_internal_has_height() const { return has_height_case() == kHeight; } -inline bool Costing_Options::has_height() const { +inline bool CostingOptions::has_height() const { return _internal_has_height(); } -inline void Costing_Options::set_has_height() { +inline void CostingOptions::set_has_height() { _impl_._oneof_case_[37] = kHeight; } -inline void Costing_Options::clear_height() { +inline void CostingOptions::clear_height() { if (_internal_has_height()) { _impl_.has_height_.height_ = 0; clear_has_has_height(); } } -inline float Costing_Options::_internal_height() const { +inline float CostingOptions::_internal_height() const { if (_internal_has_height()) { return _impl_.has_height_.height_; } return 0; } -inline void Costing_Options::_internal_set_height(float value) { +inline void CostingOptions::_internal_set_height(float value) { if (!_internal_has_height()) { clear_has_height(); set_has_height(); } _impl_.has_height_.height_ = value; } -inline float Costing_Options::height() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.height) +inline float CostingOptions::height() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.height) return _internal_height(); } -inline void Costing_Options::set_height(float value) { +inline void CostingOptions::set_height(float value) { _internal_set_height(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.height) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.height) } // float width = 39; -inline bool Costing_Options::_internal_has_width() const { +inline bool CostingOptions::_internal_has_width() const { return has_width_case() == kWidth; } -inline bool Costing_Options::has_width() const { +inline bool CostingOptions::has_width() const { return _internal_has_width(); } -inline void Costing_Options::set_has_width() { +inline void CostingOptions::set_has_width() { _impl_._oneof_case_[38] = kWidth; } -inline void Costing_Options::clear_width() { +inline void CostingOptions::clear_width() { if (_internal_has_width()) { _impl_.has_width_.width_ = 0; clear_has_has_width(); } } -inline float Costing_Options::_internal_width() const { +inline float CostingOptions::_internal_width() const { if (_internal_has_width()) { return _impl_.has_width_.width_; } return 0; } -inline void Costing_Options::_internal_set_width(float value) { +inline void CostingOptions::_internal_set_width(float value) { if (!_internal_has_width()) { clear_has_width(); set_has_width(); } _impl_.has_width_.width_ = value; } -inline float Costing_Options::width() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.width) +inline float CostingOptions::width() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.width) return _internal_width(); } -inline void Costing_Options::set_width(float value) { +inline void CostingOptions::set_width(float value) { _internal_set_width(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.width) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.width) } // float length = 40; -inline bool Costing_Options::_internal_has_length() const { +inline bool CostingOptions::_internal_has_length() const { return has_length_case() == kLength; } -inline bool Costing_Options::has_length() const { +inline bool CostingOptions::has_length() const { return _internal_has_length(); } -inline void Costing_Options::set_has_length() { +inline void CostingOptions::set_has_length() { _impl_._oneof_case_[39] = kLength; } -inline void Costing_Options::clear_length() { +inline void CostingOptions::clear_length() { if (_internal_has_length()) { _impl_.has_length_.length_ = 0; clear_has_has_length(); } } -inline float Costing_Options::_internal_length() const { +inline float CostingOptions::_internal_length() const { if (_internal_has_length()) { return _impl_.has_length_.length_; } return 0; } -inline void Costing_Options::_internal_set_length(float value) { +inline void CostingOptions::_internal_set_length(float value) { if (!_internal_has_length()) { clear_has_length(); set_has_length(); } _impl_.has_length_.length_ = value; } -inline float Costing_Options::length() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.length) +inline float CostingOptions::length() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.length) return _internal_length(); } -inline void Costing_Options::set_length(float value) { +inline void CostingOptions::set_length(float value) { _internal_set_length(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.length) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.length) } // float cycling_speed = 41; -inline bool Costing_Options::_internal_has_cycling_speed() const { +inline bool CostingOptions::_internal_has_cycling_speed() const { return has_cycling_speed_case() == kCyclingSpeed; } -inline bool Costing_Options::has_cycling_speed() const { +inline bool CostingOptions::has_cycling_speed() const { return _internal_has_cycling_speed(); } -inline void Costing_Options::set_has_cycling_speed() { +inline void CostingOptions::set_has_cycling_speed() { _impl_._oneof_case_[40] = kCyclingSpeed; } -inline void Costing_Options::clear_cycling_speed() { +inline void CostingOptions::clear_cycling_speed() { if (_internal_has_cycling_speed()) { _impl_.has_cycling_speed_.cycling_speed_ = 0; clear_has_has_cycling_speed(); } } -inline float Costing_Options::_internal_cycling_speed() const { +inline float CostingOptions::_internal_cycling_speed() const { if (_internal_has_cycling_speed()) { return _impl_.has_cycling_speed_.cycling_speed_; } return 0; } -inline void Costing_Options::_internal_set_cycling_speed(float value) { +inline void CostingOptions::_internal_set_cycling_speed(float value) { if (!_internal_has_cycling_speed()) { clear_has_cycling_speed(); set_has_cycling_speed(); } _impl_.has_cycling_speed_.cycling_speed_ = value; } -inline float Costing_Options::cycling_speed() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.cycling_speed) +inline float CostingOptions::cycling_speed() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.cycling_speed) return _internal_cycling_speed(); } -inline void Costing_Options::set_cycling_speed(float value) { +inline void CostingOptions::set_cycling_speed(float value) { _internal_set_cycling_speed(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.cycling_speed) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.cycling_speed) } // bool wheelchair = 42; -inline bool Costing_Options::_internal_has_wheelchair() const { +inline bool CostingOptions::_internal_has_wheelchair() const { return has_wheelchair_case() == kWheelchair; } -inline bool Costing_Options::has_wheelchair() const { +inline bool CostingOptions::has_wheelchair() const { return _internal_has_wheelchair(); } -inline void Costing_Options::set_has_wheelchair() { +inline void CostingOptions::set_has_wheelchair() { _impl_._oneof_case_[41] = kWheelchair; } -inline void Costing_Options::clear_wheelchair() { +inline void CostingOptions::clear_wheelchair() { if (_internal_has_wheelchair()) { _impl_.has_wheelchair_.wheelchair_ = false; clear_has_has_wheelchair(); } } -inline bool Costing_Options::_internal_wheelchair() const { +inline bool CostingOptions::_internal_wheelchair() const { if (_internal_has_wheelchair()) { return _impl_.has_wheelchair_.wheelchair_; } return false; } -inline void Costing_Options::_internal_set_wheelchair(bool value) { +inline void CostingOptions::_internal_set_wheelchair(bool value) { if (!_internal_has_wheelchair()) { clear_has_wheelchair(); set_has_wheelchair(); } _impl_.has_wheelchair_.wheelchair_ = value; } -inline bool Costing_Options::wheelchair() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.wheelchair) +inline bool CostingOptions::wheelchair() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.wheelchair) return _internal_wheelchair(); } -inline void Costing_Options::set_wheelchair(bool value) { +inline void CostingOptions::set_wheelchair(bool value) { _internal_set_wheelchair(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.wheelchair) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.wheelchair) } // bool bicycle = 43; -inline bool Costing_Options::_internal_has_bicycle() const { +inline bool CostingOptions::_internal_has_bicycle() const { return has_bicycle_case() == kBicycle; } -inline bool Costing_Options::has_bicycle() const { +inline bool CostingOptions::has_bicycle() const { return _internal_has_bicycle(); } -inline void Costing_Options::set_has_bicycle() { +inline void CostingOptions::set_has_bicycle() { _impl_._oneof_case_[42] = kBicycle; } -inline void Costing_Options::clear_bicycle() { +inline void CostingOptions::clear_bicycle() { if (_internal_has_bicycle()) { _impl_.has_bicycle_.bicycle_ = false; clear_has_has_bicycle(); } } -inline bool Costing_Options::_internal_bicycle() const { +inline bool CostingOptions::_internal_bicycle() const { if (_internal_has_bicycle()) { return _impl_.has_bicycle_.bicycle_; } return false; } -inline void Costing_Options::_internal_set_bicycle(bool value) { +inline void CostingOptions::_internal_set_bicycle(bool value) { if (!_internal_has_bicycle()) { clear_has_bicycle(); set_has_bicycle(); } _impl_.has_bicycle_.bicycle_ = value; } -inline bool Costing_Options::bicycle() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.bicycle) +inline bool CostingOptions::bicycle() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.bicycle) return _internal_bicycle(); } -inline void Costing_Options::set_bicycle(bool value) { +inline void CostingOptions::set_bicycle(bool value) { _internal_set_bicycle(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.bicycle) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.bicycle) } // float use_bus = 44; -inline bool Costing_Options::_internal_has_use_bus() const { +inline bool CostingOptions::_internal_has_use_bus() const { return has_use_bus_case() == kUseBus; } -inline bool Costing_Options::has_use_bus() const { +inline bool CostingOptions::has_use_bus() const { return _internal_has_use_bus(); } -inline void Costing_Options::set_has_use_bus() { +inline void CostingOptions::set_has_use_bus() { _impl_._oneof_case_[43] = kUseBus; } -inline void Costing_Options::clear_use_bus() { +inline void CostingOptions::clear_use_bus() { if (_internal_has_use_bus()) { _impl_.has_use_bus_.use_bus_ = 0; clear_has_has_use_bus(); } } -inline float Costing_Options::_internal_use_bus() const { +inline float CostingOptions::_internal_use_bus() const { if (_internal_has_use_bus()) { return _impl_.has_use_bus_.use_bus_; } return 0; } -inline void Costing_Options::_internal_set_use_bus(float value) { +inline void CostingOptions::_internal_set_use_bus(float value) { if (!_internal_has_use_bus()) { clear_has_use_bus(); set_has_use_bus(); } _impl_.has_use_bus_.use_bus_ = value; } -inline float Costing_Options::use_bus() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_bus) +inline float CostingOptions::use_bus() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_bus) return _internal_use_bus(); } -inline void Costing_Options::set_use_bus(float value) { +inline void CostingOptions::set_use_bus(float value) { _internal_set_use_bus(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_bus) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_bus) } // float use_rail = 45; -inline bool Costing_Options::_internal_has_use_rail() const { +inline bool CostingOptions::_internal_has_use_rail() const { return has_use_rail_case() == kUseRail; } -inline bool Costing_Options::has_use_rail() const { +inline bool CostingOptions::has_use_rail() const { return _internal_has_use_rail(); } -inline void Costing_Options::set_has_use_rail() { +inline void CostingOptions::set_has_use_rail() { _impl_._oneof_case_[44] = kUseRail; } -inline void Costing_Options::clear_use_rail() { +inline void CostingOptions::clear_use_rail() { if (_internal_has_use_rail()) { _impl_.has_use_rail_.use_rail_ = 0; clear_has_has_use_rail(); } } -inline float Costing_Options::_internal_use_rail() const { +inline float CostingOptions::_internal_use_rail() const { if (_internal_has_use_rail()) { return _impl_.has_use_rail_.use_rail_; } return 0; } -inline void Costing_Options::_internal_set_use_rail(float value) { +inline void CostingOptions::_internal_set_use_rail(float value) { if (!_internal_has_use_rail()) { clear_has_use_rail(); set_has_use_rail(); } _impl_.has_use_rail_.use_rail_ = value; } -inline float Costing_Options::use_rail() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_rail) +inline float CostingOptions::use_rail() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_rail) return _internal_use_rail(); } -inline void Costing_Options::set_use_rail(float value) { +inline void CostingOptions::set_use_rail(float value) { _internal_set_use_rail(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_rail) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_rail) } // float use_transfers = 46; -inline bool Costing_Options::_internal_has_use_transfers() const { +inline bool CostingOptions::_internal_has_use_transfers() const { return has_use_transfers_case() == kUseTransfers; } -inline bool Costing_Options::has_use_transfers() const { +inline bool CostingOptions::has_use_transfers() const { return _internal_has_use_transfers(); } -inline void Costing_Options::set_has_use_transfers() { +inline void CostingOptions::set_has_use_transfers() { _impl_._oneof_case_[45] = kUseTransfers; } -inline void Costing_Options::clear_use_transfers() { +inline void CostingOptions::clear_use_transfers() { if (_internal_has_use_transfers()) { _impl_.has_use_transfers_.use_transfers_ = 0; clear_has_has_use_transfers(); } } -inline float Costing_Options::_internal_use_transfers() const { +inline float CostingOptions::_internal_use_transfers() const { if (_internal_has_use_transfers()) { return _impl_.has_use_transfers_.use_transfers_; } return 0; } -inline void Costing_Options::_internal_set_use_transfers(float value) { +inline void CostingOptions::_internal_set_use_transfers(float value) { if (!_internal_has_use_transfers()) { clear_has_use_transfers(); set_has_use_transfers(); } _impl_.has_use_transfers_.use_transfers_ = value; } -inline float Costing_Options::use_transfers() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_transfers) +inline float CostingOptions::use_transfers() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_transfers) return _internal_use_transfers(); } -inline void Costing_Options::set_use_transfers(float value) { +inline void CostingOptions::set_use_transfers(float value) { _internal_set_use_transfers(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_transfers) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_transfers) } // float transfer_cost = 47; -inline bool Costing_Options::_internal_has_transfer_cost() const { +inline bool CostingOptions::_internal_has_transfer_cost() const { return has_transfer_cost_case() == kTransferCost; } -inline bool Costing_Options::has_transfer_cost() const { +inline bool CostingOptions::has_transfer_cost() const { return _internal_has_transfer_cost(); } -inline void Costing_Options::set_has_transfer_cost() { +inline void CostingOptions::set_has_transfer_cost() { _impl_._oneof_case_[46] = kTransferCost; } -inline void Costing_Options::clear_transfer_cost() { +inline void CostingOptions::clear_transfer_cost() { if (_internal_has_transfer_cost()) { _impl_.has_transfer_cost_.transfer_cost_ = 0; clear_has_has_transfer_cost(); } } -inline float Costing_Options::_internal_transfer_cost() const { +inline float CostingOptions::_internal_transfer_cost() const { if (_internal_has_transfer_cost()) { return _impl_.has_transfer_cost_.transfer_cost_; } return 0; } -inline void Costing_Options::_internal_set_transfer_cost(float value) { +inline void CostingOptions::_internal_set_transfer_cost(float value) { if (!_internal_has_transfer_cost()) { clear_has_transfer_cost(); set_has_transfer_cost(); } _impl_.has_transfer_cost_.transfer_cost_ = value; } -inline float Costing_Options::transfer_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.transfer_cost) +inline float CostingOptions::transfer_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.transfer_cost) return _internal_transfer_cost(); } -inline void Costing_Options::set_transfer_cost(float value) { +inline void CostingOptions::set_transfer_cost(float value) { _internal_set_transfer_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.transfer_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.transfer_cost) } // float transfer_penalty = 48; -inline bool Costing_Options::_internal_has_transfer_penalty() const { +inline bool CostingOptions::_internal_has_transfer_penalty() const { return has_transfer_penalty_case() == kTransferPenalty; } -inline bool Costing_Options::has_transfer_penalty() const { +inline bool CostingOptions::has_transfer_penalty() const { return _internal_has_transfer_penalty(); } -inline void Costing_Options::set_has_transfer_penalty() { +inline void CostingOptions::set_has_transfer_penalty() { _impl_._oneof_case_[47] = kTransferPenalty; } -inline void Costing_Options::clear_transfer_penalty() { +inline void CostingOptions::clear_transfer_penalty() { if (_internal_has_transfer_penalty()) { _impl_.has_transfer_penalty_.transfer_penalty_ = 0; clear_has_has_transfer_penalty(); } } -inline float Costing_Options::_internal_transfer_penalty() const { +inline float CostingOptions::_internal_transfer_penalty() const { if (_internal_has_transfer_penalty()) { return _impl_.has_transfer_penalty_.transfer_penalty_; } return 0; } -inline void Costing_Options::_internal_set_transfer_penalty(float value) { +inline void CostingOptions::_internal_set_transfer_penalty(float value) { if (!_internal_has_transfer_penalty()) { clear_has_transfer_penalty(); set_has_transfer_penalty(); } _impl_.has_transfer_penalty_.transfer_penalty_ = value; } -inline float Costing_Options::transfer_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.transfer_penalty) +inline float CostingOptions::transfer_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.transfer_penalty) return _internal_transfer_penalty(); } -inline void Costing_Options::set_transfer_penalty(float value) { +inline void CostingOptions::set_transfer_penalty(float value) { _internal_set_transfer_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.transfer_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.transfer_penalty) } // .valhalla.FilterAction filter_stop_action = 49; -inline void Costing_Options::clear_filter_stop_action() { +inline void CostingOptions::clear_filter_stop_action() { _impl_.filter_stop_action_ = 0; } -inline ::valhalla::FilterAction Costing_Options::_internal_filter_stop_action() const { +inline ::valhalla::FilterAction CostingOptions::_internal_filter_stop_action() const { return static_cast< ::valhalla::FilterAction >(_impl_.filter_stop_action_); } -inline ::valhalla::FilterAction Costing_Options::filter_stop_action() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_stop_action) +inline ::valhalla::FilterAction CostingOptions::filter_stop_action() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_stop_action) return _internal_filter_stop_action(); } -inline void Costing_Options::_internal_set_filter_stop_action(::valhalla::FilterAction value) { +inline void CostingOptions::_internal_set_filter_stop_action(::valhalla::FilterAction value) { _impl_.filter_stop_action_ = value; } -inline void Costing_Options::set_filter_stop_action(::valhalla::FilterAction value) { +inline void CostingOptions::set_filter_stop_action(::valhalla::FilterAction value) { _internal_set_filter_stop_action(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_stop_action) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_stop_action) } // repeated string filter_stop_ids = 50; -inline int Costing_Options::_internal_filter_stop_ids_size() const { +inline int CostingOptions::_internal_filter_stop_ids_size() const { return _impl_.filter_stop_ids_.size(); } -inline int Costing_Options::filter_stop_ids_size() const { +inline int CostingOptions::filter_stop_ids_size() const { return _internal_filter_stop_ids_size(); } -inline void Costing_Options::clear_filter_stop_ids() { +inline void CostingOptions::clear_filter_stop_ids() { _impl_.filter_stop_ids_.Clear(); } -inline std::string* Costing_Options::add_filter_stop_ids() { +inline std::string* CostingOptions::add_filter_stop_ids() { std::string* _s = _internal_add_filter_stop_ids(); - // @@protoc_insertion_point(field_add_mutable:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_add_mutable:valhalla.CostingOptions.filter_stop_ids) return _s; } -inline const std::string& Costing_Options::_internal_filter_stop_ids(int index) const { +inline const std::string& CostingOptions::_internal_filter_stop_ids(int index) const { return _impl_.filter_stop_ids_.Get(index); } -inline const std::string& Costing_Options::filter_stop_ids(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_stop_ids) +inline const std::string& CostingOptions::filter_stop_ids(int index) const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_stop_ids) return _internal_filter_stop_ids(index); } -inline std::string* Costing_Options::mutable_filter_stop_ids(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Costing.Options.filter_stop_ids) +inline std::string* CostingOptions::mutable_filter_stop_ids(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.filter_stop_ids) return _impl_.filter_stop_ids_.Mutable(index); } -inline void Costing_Options::set_filter_stop_ids(int index, const std::string& value) { +inline void CostingOptions::set_filter_stop_ids(int index, const std::string& value) { _impl_.filter_stop_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::set_filter_stop_ids(int index, std::string&& value) { +inline void CostingOptions::set_filter_stop_ids(int index, std::string&& value) { _impl_.filter_stop_ids_.Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::set_filter_stop_ids(int index, const char* value) { +inline void CostingOptions::set_filter_stop_ids(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_stop_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_set_char:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::set_filter_stop_ids(int index, const char* value, size_t size) { +inline void CostingOptions::set_filter_stop_ids(int index, const char* value, size_t size) { _impl_.filter_stop_ids_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_set_pointer:valhalla.CostingOptions.filter_stop_ids) } -inline std::string* Costing_Options::_internal_add_filter_stop_ids() { +inline std::string* CostingOptions::_internal_add_filter_stop_ids() { return _impl_.filter_stop_ids_.Add(); } -inline void Costing_Options::add_filter_stop_ids(const std::string& value) { +inline void CostingOptions::add_filter_stop_ids(const std::string& value) { _impl_.filter_stop_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::add_filter_stop_ids(std::string&& value) { +inline void CostingOptions::add_filter_stop_ids(std::string&& value) { _impl_.filter_stop_ids_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::add_filter_stop_ids(const char* value) { +inline void CostingOptions::add_filter_stop_ids(const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_stop_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_add_char:valhalla.CostingOptions.filter_stop_ids) } -inline void Costing_Options::add_filter_stop_ids(const char* value, size_t size) { +inline void CostingOptions::add_filter_stop_ids(const char* value, size_t size) { _impl_.filter_stop_ids_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:valhalla.Costing.Options.filter_stop_ids) + // @@protoc_insertion_point(field_add_pointer:valhalla.CostingOptions.filter_stop_ids) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Costing_Options::filter_stop_ids() const { - // @@protoc_insertion_point(field_list:valhalla.Costing.Options.filter_stop_ids) +CostingOptions::filter_stop_ids() const { + // @@protoc_insertion_point(field_list:valhalla.CostingOptions.filter_stop_ids) return _impl_.filter_stop_ids_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Costing_Options::mutable_filter_stop_ids() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Costing.Options.filter_stop_ids) +CostingOptions::mutable_filter_stop_ids() { + // @@protoc_insertion_point(field_mutable_list:valhalla.CostingOptions.filter_stop_ids) return &_impl_.filter_stop_ids_; } // .valhalla.FilterAction filter_operator_action = 51; -inline void Costing_Options::clear_filter_operator_action() { +inline void CostingOptions::clear_filter_operator_action() { _impl_.filter_operator_action_ = 0; } -inline ::valhalla::FilterAction Costing_Options::_internal_filter_operator_action() const { +inline ::valhalla::FilterAction CostingOptions::_internal_filter_operator_action() const { return static_cast< ::valhalla::FilterAction >(_impl_.filter_operator_action_); } -inline ::valhalla::FilterAction Costing_Options::filter_operator_action() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_operator_action) +inline ::valhalla::FilterAction CostingOptions::filter_operator_action() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_operator_action) return _internal_filter_operator_action(); } -inline void Costing_Options::_internal_set_filter_operator_action(::valhalla::FilterAction value) { +inline void CostingOptions::_internal_set_filter_operator_action(::valhalla::FilterAction value) { _impl_.filter_operator_action_ = value; } -inline void Costing_Options::set_filter_operator_action(::valhalla::FilterAction value) { +inline void CostingOptions::set_filter_operator_action(::valhalla::FilterAction value) { _internal_set_filter_operator_action(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_operator_action) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_operator_action) } // repeated string filter_operator_ids = 52; -inline int Costing_Options::_internal_filter_operator_ids_size() const { +inline int CostingOptions::_internal_filter_operator_ids_size() const { return _impl_.filter_operator_ids_.size(); } -inline int Costing_Options::filter_operator_ids_size() const { +inline int CostingOptions::filter_operator_ids_size() const { return _internal_filter_operator_ids_size(); } -inline void Costing_Options::clear_filter_operator_ids() { +inline void CostingOptions::clear_filter_operator_ids() { _impl_.filter_operator_ids_.Clear(); } -inline std::string* Costing_Options::add_filter_operator_ids() { +inline std::string* CostingOptions::add_filter_operator_ids() { std::string* _s = _internal_add_filter_operator_ids(); - // @@protoc_insertion_point(field_add_mutable:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_add_mutable:valhalla.CostingOptions.filter_operator_ids) return _s; } -inline const std::string& Costing_Options::_internal_filter_operator_ids(int index) const { +inline const std::string& CostingOptions::_internal_filter_operator_ids(int index) const { return _impl_.filter_operator_ids_.Get(index); } -inline const std::string& Costing_Options::filter_operator_ids(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_operator_ids) +inline const std::string& CostingOptions::filter_operator_ids(int index) const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_operator_ids) return _internal_filter_operator_ids(index); } -inline std::string* Costing_Options::mutable_filter_operator_ids(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Costing.Options.filter_operator_ids) +inline std::string* CostingOptions::mutable_filter_operator_ids(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.filter_operator_ids) return _impl_.filter_operator_ids_.Mutable(index); } -inline void Costing_Options::set_filter_operator_ids(int index, const std::string& value) { +inline void CostingOptions::set_filter_operator_ids(int index, const std::string& value) { _impl_.filter_operator_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::set_filter_operator_ids(int index, std::string&& value) { +inline void CostingOptions::set_filter_operator_ids(int index, std::string&& value) { _impl_.filter_operator_ids_.Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::set_filter_operator_ids(int index, const char* value) { +inline void CostingOptions::set_filter_operator_ids(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_operator_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_set_char:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::set_filter_operator_ids(int index, const char* value, size_t size) { +inline void CostingOptions::set_filter_operator_ids(int index, const char* value, size_t size) { _impl_.filter_operator_ids_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_set_pointer:valhalla.CostingOptions.filter_operator_ids) } -inline std::string* Costing_Options::_internal_add_filter_operator_ids() { +inline std::string* CostingOptions::_internal_add_filter_operator_ids() { return _impl_.filter_operator_ids_.Add(); } -inline void Costing_Options::add_filter_operator_ids(const std::string& value) { +inline void CostingOptions::add_filter_operator_ids(const std::string& value) { _impl_.filter_operator_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::add_filter_operator_ids(std::string&& value) { +inline void CostingOptions::add_filter_operator_ids(std::string&& value) { _impl_.filter_operator_ids_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::add_filter_operator_ids(const char* value) { +inline void CostingOptions::add_filter_operator_ids(const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_operator_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_add_char:valhalla.CostingOptions.filter_operator_ids) } -inline void Costing_Options::add_filter_operator_ids(const char* value, size_t size) { +inline void CostingOptions::add_filter_operator_ids(const char* value, size_t size) { _impl_.filter_operator_ids_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:valhalla.Costing.Options.filter_operator_ids) + // @@protoc_insertion_point(field_add_pointer:valhalla.CostingOptions.filter_operator_ids) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Costing_Options::filter_operator_ids() const { - // @@protoc_insertion_point(field_list:valhalla.Costing.Options.filter_operator_ids) +CostingOptions::filter_operator_ids() const { + // @@protoc_insertion_point(field_list:valhalla.CostingOptions.filter_operator_ids) return _impl_.filter_operator_ids_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Costing_Options::mutable_filter_operator_ids() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Costing.Options.filter_operator_ids) +CostingOptions::mutable_filter_operator_ids() { + // @@protoc_insertion_point(field_mutable_list:valhalla.CostingOptions.filter_operator_ids) return &_impl_.filter_operator_ids_; } // .valhalla.FilterAction filter_route_action = 53; -inline void Costing_Options::clear_filter_route_action() { +inline void CostingOptions::clear_filter_route_action() { _impl_.filter_route_action_ = 0; } -inline ::valhalla::FilterAction Costing_Options::_internal_filter_route_action() const { +inline ::valhalla::FilterAction CostingOptions::_internal_filter_route_action() const { return static_cast< ::valhalla::FilterAction >(_impl_.filter_route_action_); } -inline ::valhalla::FilterAction Costing_Options::filter_route_action() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_route_action) +inline ::valhalla::FilterAction CostingOptions::filter_route_action() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_route_action) return _internal_filter_route_action(); } -inline void Costing_Options::_internal_set_filter_route_action(::valhalla::FilterAction value) { +inline void CostingOptions::_internal_set_filter_route_action(::valhalla::FilterAction value) { _impl_.filter_route_action_ = value; } -inline void Costing_Options::set_filter_route_action(::valhalla::FilterAction value) { +inline void CostingOptions::set_filter_route_action(::valhalla::FilterAction value) { _internal_set_filter_route_action(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_route_action) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_route_action) } // repeated string filter_route_ids = 54; -inline int Costing_Options::_internal_filter_route_ids_size() const { +inline int CostingOptions::_internal_filter_route_ids_size() const { return _impl_.filter_route_ids_.size(); } -inline int Costing_Options::filter_route_ids_size() const { +inline int CostingOptions::filter_route_ids_size() const { return _internal_filter_route_ids_size(); } -inline void Costing_Options::clear_filter_route_ids() { +inline void CostingOptions::clear_filter_route_ids() { _impl_.filter_route_ids_.Clear(); } -inline std::string* Costing_Options::add_filter_route_ids() { +inline std::string* CostingOptions::add_filter_route_ids() { std::string* _s = _internal_add_filter_route_ids(); - // @@protoc_insertion_point(field_add_mutable:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_add_mutable:valhalla.CostingOptions.filter_route_ids) return _s; } -inline const std::string& Costing_Options::_internal_filter_route_ids(int index) const { +inline const std::string& CostingOptions::_internal_filter_route_ids(int index) const { return _impl_.filter_route_ids_.Get(index); } -inline const std::string& Costing_Options::filter_route_ids(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.filter_route_ids) +inline const std::string& CostingOptions::filter_route_ids(int index) const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_route_ids) return _internal_filter_route_ids(index); } -inline std::string* Costing_Options::mutable_filter_route_ids(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Costing.Options.filter_route_ids) +inline std::string* CostingOptions::mutable_filter_route_ids(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.filter_route_ids) return _impl_.filter_route_ids_.Mutable(index); } -inline void Costing_Options::set_filter_route_ids(int index, const std::string& value) { +inline void CostingOptions::set_filter_route_ids(int index, const std::string& value) { _impl_.filter_route_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::set_filter_route_ids(int index, std::string&& value) { +inline void CostingOptions::set_filter_route_ids(int index, std::string&& value) { _impl_.filter_route_ids_.Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::set_filter_route_ids(int index, const char* value) { +inline void CostingOptions::set_filter_route_ids(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_route_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_set_char:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::set_filter_route_ids(int index, const char* value, size_t size) { +inline void CostingOptions::set_filter_route_ids(int index, const char* value, size_t size) { _impl_.filter_route_ids_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_set_pointer:valhalla.CostingOptions.filter_route_ids) } -inline std::string* Costing_Options::_internal_add_filter_route_ids() { +inline std::string* CostingOptions::_internal_add_filter_route_ids() { return _impl_.filter_route_ids_.Add(); } -inline void Costing_Options::add_filter_route_ids(const std::string& value) { +inline void CostingOptions::add_filter_route_ids(const std::string& value) { _impl_.filter_route_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::add_filter_route_ids(std::string&& value) { +inline void CostingOptions::add_filter_route_ids(std::string&& value) { _impl_.filter_route_ids_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::add_filter_route_ids(const char* value) { +inline void CostingOptions::add_filter_route_ids(const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.filter_route_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_add_char:valhalla.CostingOptions.filter_route_ids) } -inline void Costing_Options::add_filter_route_ids(const char* value, size_t size) { +inline void CostingOptions::add_filter_route_ids(const char* value, size_t size) { _impl_.filter_route_ids_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:valhalla.Costing.Options.filter_route_ids) + // @@protoc_insertion_point(field_add_pointer:valhalla.CostingOptions.filter_route_ids) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Costing_Options::filter_route_ids() const { - // @@protoc_insertion_point(field_list:valhalla.Costing.Options.filter_route_ids) +CostingOptions::filter_route_ids() const { + // @@protoc_insertion_point(field_list:valhalla.CostingOptions.filter_route_ids) return _impl_.filter_route_ids_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Costing_Options::mutable_filter_route_ids() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Costing.Options.filter_route_ids) +CostingOptions::mutable_filter_route_ids() { + // @@protoc_insertion_point(field_mutable_list:valhalla.CostingOptions.filter_route_ids) return &_impl_.filter_route_ids_; } // uint32 flow_mask = 55; -inline bool Costing_Options::_internal_has_flow_mask() const { +inline bool CostingOptions::_internal_has_flow_mask() const { return has_flow_mask_case() == kFlowMask; } -inline bool Costing_Options::has_flow_mask() const { +inline bool CostingOptions::has_flow_mask() const { return _internal_has_flow_mask(); } -inline void Costing_Options::set_has_flow_mask() { +inline void CostingOptions::set_has_flow_mask() { _impl_._oneof_case_[48] = kFlowMask; } -inline void Costing_Options::clear_flow_mask() { +inline void CostingOptions::clear_flow_mask() { if (_internal_has_flow_mask()) { _impl_.has_flow_mask_.flow_mask_ = 0u; clear_has_has_flow_mask(); } } -inline uint32_t Costing_Options::_internal_flow_mask() const { +inline uint32_t CostingOptions::_internal_flow_mask() const { if (_internal_has_flow_mask()) { return _impl_.has_flow_mask_.flow_mask_; } return 0u; } -inline void Costing_Options::_internal_set_flow_mask(uint32_t value) { +inline void CostingOptions::_internal_set_flow_mask(uint32_t value) { if (!_internal_has_flow_mask()) { clear_has_flow_mask(); set_has_flow_mask(); } _impl_.has_flow_mask_.flow_mask_ = value; } -inline uint32_t Costing_Options::flow_mask() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.flow_mask) +inline uint32_t CostingOptions::flow_mask() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.flow_mask) return _internal_flow_mask(); } -inline void Costing_Options::set_flow_mask(uint32_t value) { +inline void CostingOptions::set_flow_mask(uint32_t value) { _internal_set_flow_mask(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.flow_mask) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.flow_mask) } // float bike_share_cost = 56; -inline bool Costing_Options::_internal_has_bike_share_cost() const { +inline bool CostingOptions::_internal_has_bike_share_cost() const { return has_bike_share_cost_case() == kBikeShareCost; } -inline bool Costing_Options::has_bike_share_cost() const { +inline bool CostingOptions::has_bike_share_cost() const { return _internal_has_bike_share_cost(); } -inline void Costing_Options::set_has_bike_share_cost() { +inline void CostingOptions::set_has_bike_share_cost() { _impl_._oneof_case_[49] = kBikeShareCost; } -inline void Costing_Options::clear_bike_share_cost() { +inline void CostingOptions::clear_bike_share_cost() { if (_internal_has_bike_share_cost()) { _impl_.has_bike_share_cost_.bike_share_cost_ = 0; clear_has_has_bike_share_cost(); } } -inline float Costing_Options::_internal_bike_share_cost() const { +inline float CostingOptions::_internal_bike_share_cost() const { if (_internal_has_bike_share_cost()) { return _impl_.has_bike_share_cost_.bike_share_cost_; } return 0; } -inline void Costing_Options::_internal_set_bike_share_cost(float value) { +inline void CostingOptions::_internal_set_bike_share_cost(float value) { if (!_internal_has_bike_share_cost()) { clear_has_bike_share_cost(); set_has_bike_share_cost(); } _impl_.has_bike_share_cost_.bike_share_cost_ = value; } -inline float Costing_Options::bike_share_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.bike_share_cost) +inline float CostingOptions::bike_share_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.bike_share_cost) return _internal_bike_share_cost(); } -inline void Costing_Options::set_bike_share_cost(float value) { +inline void CostingOptions::set_bike_share_cost(float value) { _internal_set_bike_share_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.bike_share_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.bike_share_cost) } // float bike_share_penalty = 57; -inline bool Costing_Options::_internal_has_bike_share_penalty() const { +inline bool CostingOptions::_internal_has_bike_share_penalty() const { return has_bike_share_penalty_case() == kBikeSharePenalty; } -inline bool Costing_Options::has_bike_share_penalty() const { +inline bool CostingOptions::has_bike_share_penalty() const { return _internal_has_bike_share_penalty(); } -inline void Costing_Options::set_has_bike_share_penalty() { +inline void CostingOptions::set_has_bike_share_penalty() { _impl_._oneof_case_[50] = kBikeSharePenalty; } -inline void Costing_Options::clear_bike_share_penalty() { +inline void CostingOptions::clear_bike_share_penalty() { if (_internal_has_bike_share_penalty()) { _impl_.has_bike_share_penalty_.bike_share_penalty_ = 0; clear_has_has_bike_share_penalty(); } } -inline float Costing_Options::_internal_bike_share_penalty() const { +inline float CostingOptions::_internal_bike_share_penalty() const { if (_internal_has_bike_share_penalty()) { return _impl_.has_bike_share_penalty_.bike_share_penalty_; } return 0; } -inline void Costing_Options::_internal_set_bike_share_penalty(float value) { +inline void CostingOptions::_internal_set_bike_share_penalty(float value) { if (!_internal_has_bike_share_penalty()) { clear_has_bike_share_penalty(); set_has_bike_share_penalty(); } _impl_.has_bike_share_penalty_.bike_share_penalty_ = value; } -inline float Costing_Options::bike_share_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.bike_share_penalty) +inline float CostingOptions::bike_share_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.bike_share_penalty) return _internal_bike_share_penalty(); } -inline void Costing_Options::set_bike_share_penalty(float value) { +inline void CostingOptions::set_bike_share_penalty(float value) { _internal_set_bike_share_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.bike_share_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.bike_share_penalty) } // float rail_ferry_cost = 58; -inline bool Costing_Options::_internal_has_rail_ferry_cost() const { +inline bool CostingOptions::_internal_has_rail_ferry_cost() const { return has_rail_ferry_cost_case() == kRailFerryCost; } -inline bool Costing_Options::has_rail_ferry_cost() const { +inline bool CostingOptions::has_rail_ferry_cost() const { return _internal_has_rail_ferry_cost(); } -inline void Costing_Options::set_has_rail_ferry_cost() { +inline void CostingOptions::set_has_rail_ferry_cost() { _impl_._oneof_case_[51] = kRailFerryCost; } -inline void Costing_Options::clear_rail_ferry_cost() { +inline void CostingOptions::clear_rail_ferry_cost() { if (_internal_has_rail_ferry_cost()) { _impl_.has_rail_ferry_cost_.rail_ferry_cost_ = 0; clear_has_has_rail_ferry_cost(); } } -inline float Costing_Options::_internal_rail_ferry_cost() const { +inline float CostingOptions::_internal_rail_ferry_cost() const { if (_internal_has_rail_ferry_cost()) { return _impl_.has_rail_ferry_cost_.rail_ferry_cost_; } return 0; } -inline void Costing_Options::_internal_set_rail_ferry_cost(float value) { +inline void CostingOptions::_internal_set_rail_ferry_cost(float value) { if (!_internal_has_rail_ferry_cost()) { clear_has_rail_ferry_cost(); set_has_rail_ferry_cost(); } _impl_.has_rail_ferry_cost_.rail_ferry_cost_ = value; } -inline float Costing_Options::rail_ferry_cost() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.rail_ferry_cost) +inline float CostingOptions::rail_ferry_cost() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.rail_ferry_cost) return _internal_rail_ferry_cost(); } -inline void Costing_Options::set_rail_ferry_cost(float value) { +inline void CostingOptions::set_rail_ferry_cost(float value) { _internal_set_rail_ferry_cost(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.rail_ferry_cost) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.rail_ferry_cost) } // float use_rail_ferry = 59; -inline bool Costing_Options::_internal_has_use_rail_ferry() const { +inline bool CostingOptions::_internal_has_use_rail_ferry() const { return has_use_rail_ferry_case() == kUseRailFerry; } -inline bool Costing_Options::has_use_rail_ferry() const { +inline bool CostingOptions::has_use_rail_ferry() const { return _internal_has_use_rail_ferry(); } -inline void Costing_Options::set_has_use_rail_ferry() { +inline void CostingOptions::set_has_use_rail_ferry() { _impl_._oneof_case_[52] = kUseRailFerry; } -inline void Costing_Options::clear_use_rail_ferry() { +inline void CostingOptions::clear_use_rail_ferry() { if (_internal_has_use_rail_ferry()) { _impl_.has_use_rail_ferry_.use_rail_ferry_ = 0; clear_has_has_use_rail_ferry(); } } -inline float Costing_Options::_internal_use_rail_ferry() const { +inline float CostingOptions::_internal_use_rail_ferry() const { if (_internal_has_use_rail_ferry()) { return _impl_.has_use_rail_ferry_.use_rail_ferry_; } return 0; } -inline void Costing_Options::_internal_set_use_rail_ferry(float value) { +inline void CostingOptions::_internal_set_use_rail_ferry(float value) { if (!_internal_has_use_rail_ferry()) { clear_has_use_rail_ferry(); set_has_use_rail_ferry(); } _impl_.has_use_rail_ferry_.use_rail_ferry_ = value; } -inline float Costing_Options::use_rail_ferry() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_rail_ferry) +inline float CostingOptions::use_rail_ferry() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_rail_ferry) return _internal_use_rail_ferry(); } -inline void Costing_Options::set_use_rail_ferry(float value) { +inline void CostingOptions::set_use_rail_ferry(float value) { _internal_set_use_rail_ferry(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_rail_ferry) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_rail_ferry) } // bool ignore_restrictions = 60; -inline bool Costing_Options::_internal_has_ignore_restrictions() const { +inline bool CostingOptions::_internal_has_ignore_restrictions() const { return has_ignore_restrictions_case() == kIgnoreRestrictions; } -inline bool Costing_Options::has_ignore_restrictions() const { +inline bool CostingOptions::has_ignore_restrictions() const { return _internal_has_ignore_restrictions(); } -inline void Costing_Options::set_has_ignore_restrictions() { +inline void CostingOptions::set_has_ignore_restrictions() { _impl_._oneof_case_[53] = kIgnoreRestrictions; } -inline void Costing_Options::clear_ignore_restrictions() { +inline void CostingOptions::clear_ignore_restrictions() { if (_internal_has_ignore_restrictions()) { _impl_.has_ignore_restrictions_.ignore_restrictions_ = false; clear_has_has_ignore_restrictions(); } } -inline bool Costing_Options::_internal_ignore_restrictions() const { +inline bool CostingOptions::_internal_ignore_restrictions() const { if (_internal_has_ignore_restrictions()) { return _impl_.has_ignore_restrictions_.ignore_restrictions_; } return false; } -inline void Costing_Options::_internal_set_ignore_restrictions(bool value) { +inline void CostingOptions::_internal_set_ignore_restrictions(bool value) { if (!_internal_has_ignore_restrictions()) { clear_has_ignore_restrictions(); set_has_ignore_restrictions(); } _impl_.has_ignore_restrictions_.ignore_restrictions_ = value; } -inline bool Costing_Options::ignore_restrictions() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.ignore_restrictions) +inline bool CostingOptions::ignore_restrictions() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.ignore_restrictions) return _internal_ignore_restrictions(); } -inline void Costing_Options::set_ignore_restrictions(bool value) { +inline void CostingOptions::set_ignore_restrictions(bool value) { _internal_set_ignore_restrictions(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.ignore_restrictions) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.ignore_restrictions) } // bool ignore_oneways = 61; -inline bool Costing_Options::_internal_has_ignore_oneways() const { +inline bool CostingOptions::_internal_has_ignore_oneways() const { return has_ignore_oneways_case() == kIgnoreOneways; } -inline bool Costing_Options::has_ignore_oneways() const { +inline bool CostingOptions::has_ignore_oneways() const { return _internal_has_ignore_oneways(); } -inline void Costing_Options::set_has_ignore_oneways() { +inline void CostingOptions::set_has_ignore_oneways() { _impl_._oneof_case_[54] = kIgnoreOneways; } -inline void Costing_Options::clear_ignore_oneways() { +inline void CostingOptions::clear_ignore_oneways() { if (_internal_has_ignore_oneways()) { _impl_.has_ignore_oneways_.ignore_oneways_ = false; clear_has_has_ignore_oneways(); } } -inline bool Costing_Options::_internal_ignore_oneways() const { +inline bool CostingOptions::_internal_ignore_oneways() const { if (_internal_has_ignore_oneways()) { return _impl_.has_ignore_oneways_.ignore_oneways_; } return false; } -inline void Costing_Options::_internal_set_ignore_oneways(bool value) { +inline void CostingOptions::_internal_set_ignore_oneways(bool value) { if (!_internal_has_ignore_oneways()) { clear_has_ignore_oneways(); set_has_ignore_oneways(); } _impl_.has_ignore_oneways_.ignore_oneways_ = value; } -inline bool Costing_Options::ignore_oneways() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.ignore_oneways) +inline bool CostingOptions::ignore_oneways() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.ignore_oneways) return _internal_ignore_oneways(); } -inline void Costing_Options::set_ignore_oneways(bool value) { +inline void CostingOptions::set_ignore_oneways(bool value) { _internal_set_ignore_oneways(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.ignore_oneways) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.ignore_oneways) } // bool ignore_access = 62; -inline bool Costing_Options::_internal_has_ignore_access() const { +inline bool CostingOptions::_internal_has_ignore_access() const { return has_ignore_access_case() == kIgnoreAccess; } -inline bool Costing_Options::has_ignore_access() const { +inline bool CostingOptions::has_ignore_access() const { return _internal_has_ignore_access(); } -inline void Costing_Options::set_has_ignore_access() { +inline void CostingOptions::set_has_ignore_access() { _impl_._oneof_case_[55] = kIgnoreAccess; } -inline void Costing_Options::clear_ignore_access() { +inline void CostingOptions::clear_ignore_access() { if (_internal_has_ignore_access()) { _impl_.has_ignore_access_.ignore_access_ = false; clear_has_has_ignore_access(); } } -inline bool Costing_Options::_internal_ignore_access() const { +inline bool CostingOptions::_internal_ignore_access() const { if (_internal_has_ignore_access()) { return _impl_.has_ignore_access_.ignore_access_; } return false; } -inline void Costing_Options::_internal_set_ignore_access(bool value) { +inline void CostingOptions::_internal_set_ignore_access(bool value) { if (!_internal_has_ignore_access()) { clear_has_ignore_access(); set_has_ignore_access(); } _impl_.has_ignore_access_.ignore_access_ = value; } -inline bool Costing_Options::ignore_access() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.ignore_access) +inline bool CostingOptions::ignore_access() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.ignore_access) return _internal_ignore_access(); } -inline void Costing_Options::set_ignore_access(bool value) { +inline void CostingOptions::set_ignore_access(bool value) { _internal_set_ignore_access(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.ignore_access) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.ignore_access) } // bool ignore_closures = 63; -inline bool Costing_Options::_internal_has_ignore_closures() const { +inline bool CostingOptions::_internal_has_ignore_closures() const { return has_ignore_closures_case() == kIgnoreClosures; } -inline bool Costing_Options::has_ignore_closures() const { +inline bool CostingOptions::has_ignore_closures() const { return _internal_has_ignore_closures(); } -inline void Costing_Options::set_has_ignore_closures() { +inline void CostingOptions::set_has_ignore_closures() { _impl_._oneof_case_[56] = kIgnoreClosures; } -inline void Costing_Options::clear_ignore_closures() { +inline void CostingOptions::clear_ignore_closures() { if (_internal_has_ignore_closures()) { _impl_.has_ignore_closures_.ignore_closures_ = false; clear_has_has_ignore_closures(); } } -inline bool Costing_Options::_internal_ignore_closures() const { +inline bool CostingOptions::_internal_ignore_closures() const { if (_internal_has_ignore_closures()) { return _impl_.has_ignore_closures_.ignore_closures_; } return false; } -inline void Costing_Options::_internal_set_ignore_closures(bool value) { +inline void CostingOptions::_internal_set_ignore_closures(bool value) { if (!_internal_has_ignore_closures()) { clear_has_ignore_closures(); set_has_ignore_closures(); } _impl_.has_ignore_closures_.ignore_closures_ = value; } -inline bool Costing_Options::ignore_closures() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.ignore_closures) +inline bool CostingOptions::ignore_closures() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.ignore_closures) return _internal_ignore_closures(); } -inline void Costing_Options::set_ignore_closures(bool value) { +inline void CostingOptions::set_ignore_closures(bool value) { _internal_set_ignore_closures(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.ignore_closures) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.ignore_closures) } // bool shortest = 64; -inline bool Costing_Options::_internal_has_shortest() const { +inline bool CostingOptions::_internal_has_shortest() const { return has_shortest_case() == kShortest; } -inline bool Costing_Options::has_shortest() const { +inline bool CostingOptions::has_shortest() const { return _internal_has_shortest(); } -inline void Costing_Options::set_has_shortest() { +inline void CostingOptions::set_has_shortest() { _impl_._oneof_case_[57] = kShortest; } -inline void Costing_Options::clear_shortest() { +inline void CostingOptions::clear_shortest() { if (_internal_has_shortest()) { _impl_.has_shortest_.shortest_ = false; clear_has_has_shortest(); } } -inline bool Costing_Options::_internal_shortest() const { +inline bool CostingOptions::_internal_shortest() const { if (_internal_has_shortest()) { return _impl_.has_shortest_.shortest_; } return false; } -inline void Costing_Options::_internal_set_shortest(bool value) { +inline void CostingOptions::_internal_set_shortest(bool value) { if (!_internal_has_shortest()) { clear_has_shortest(); set_has_shortest(); } _impl_.has_shortest_.shortest_ = value; } -inline bool Costing_Options::shortest() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.shortest) +inline bool CostingOptions::shortest() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.shortest) return _internal_shortest(); } -inline void Costing_Options::set_shortest(bool value) { +inline void CostingOptions::set_shortest(bool value) { _internal_set_shortest(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.shortest) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.shortest) } // float service_penalty = 65; -inline bool Costing_Options::_internal_has_service_penalty() const { +inline bool CostingOptions::_internal_has_service_penalty() const { return has_service_penalty_case() == kServicePenalty; } -inline bool Costing_Options::has_service_penalty() const { +inline bool CostingOptions::has_service_penalty() const { return _internal_has_service_penalty(); } -inline void Costing_Options::set_has_service_penalty() { +inline void CostingOptions::set_has_service_penalty() { _impl_._oneof_case_[58] = kServicePenalty; } -inline void Costing_Options::clear_service_penalty() { +inline void CostingOptions::clear_service_penalty() { if (_internal_has_service_penalty()) { _impl_.has_service_penalty_.service_penalty_ = 0; clear_has_has_service_penalty(); } } -inline float Costing_Options::_internal_service_penalty() const { +inline float CostingOptions::_internal_service_penalty() const { if (_internal_has_service_penalty()) { return _impl_.has_service_penalty_.service_penalty_; } return 0; } -inline void Costing_Options::_internal_set_service_penalty(float value) { +inline void CostingOptions::_internal_set_service_penalty(float value) { if (!_internal_has_service_penalty()) { clear_has_service_penalty(); set_has_service_penalty(); } _impl_.has_service_penalty_.service_penalty_ = value; } -inline float Costing_Options::service_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.service_penalty) +inline float CostingOptions::service_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.service_penalty) return _internal_service_penalty(); } -inline void Costing_Options::set_service_penalty(float value) { +inline void CostingOptions::set_service_penalty(float value) { _internal_set_service_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.service_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.service_penalty) } // float use_tracks = 66; -inline bool Costing_Options::_internal_has_use_tracks() const { +inline bool CostingOptions::_internal_has_use_tracks() const { return has_use_tracks_case() == kUseTracks; } -inline bool Costing_Options::has_use_tracks() const { +inline bool CostingOptions::has_use_tracks() const { return _internal_has_use_tracks(); } -inline void Costing_Options::set_has_use_tracks() { +inline void CostingOptions::set_has_use_tracks() { _impl_._oneof_case_[59] = kUseTracks; } -inline void Costing_Options::clear_use_tracks() { +inline void CostingOptions::clear_use_tracks() { if (_internal_has_use_tracks()) { _impl_.has_use_tracks_.use_tracks_ = 0; clear_has_has_use_tracks(); } } -inline float Costing_Options::_internal_use_tracks() const { +inline float CostingOptions::_internal_use_tracks() const { if (_internal_has_use_tracks()) { return _impl_.has_use_tracks_.use_tracks_; } return 0; } -inline void Costing_Options::_internal_set_use_tracks(float value) { +inline void CostingOptions::_internal_set_use_tracks(float value) { if (!_internal_has_use_tracks()) { clear_has_use_tracks(); set_has_use_tracks(); } _impl_.has_use_tracks_.use_tracks_ = value; } -inline float Costing_Options::use_tracks() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_tracks) +inline float CostingOptions::use_tracks() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_tracks) return _internal_use_tracks(); } -inline void Costing_Options::set_use_tracks(float value) { +inline void CostingOptions::set_use_tracks(float value) { _internal_set_use_tracks(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_tracks) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_tracks) } // float use_distance = 67; -inline bool Costing_Options::_internal_has_use_distance() const { +inline bool CostingOptions::_internal_has_use_distance() const { return has_use_distance_case() == kUseDistance; } -inline bool Costing_Options::has_use_distance() const { +inline bool CostingOptions::has_use_distance() const { return _internal_has_use_distance(); } -inline void Costing_Options::set_has_use_distance() { +inline void CostingOptions::set_has_use_distance() { _impl_._oneof_case_[60] = kUseDistance; } -inline void Costing_Options::clear_use_distance() { +inline void CostingOptions::clear_use_distance() { if (_internal_has_use_distance()) { _impl_.has_use_distance_.use_distance_ = 0; clear_has_has_use_distance(); } } -inline float Costing_Options::_internal_use_distance() const { +inline float CostingOptions::_internal_use_distance() const { if (_internal_has_use_distance()) { return _impl_.has_use_distance_.use_distance_; } return 0; } -inline void Costing_Options::_internal_set_use_distance(float value) { +inline void CostingOptions::_internal_set_use_distance(float value) { if (!_internal_has_use_distance()) { clear_has_use_distance(); set_has_use_distance(); } _impl_.has_use_distance_.use_distance_ = value; } -inline float Costing_Options::use_distance() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_distance) +inline float CostingOptions::use_distance() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_distance) return _internal_use_distance(); } -inline void Costing_Options::set_use_distance(float value) { +inline void CostingOptions::set_use_distance(float value) { _internal_set_use_distance(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_distance) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_distance) } // float use_living_streets = 68; -inline bool Costing_Options::_internal_has_use_living_streets() const { +inline bool CostingOptions::_internal_has_use_living_streets() const { return has_use_living_streets_case() == kUseLivingStreets; } -inline bool Costing_Options::has_use_living_streets() const { +inline bool CostingOptions::has_use_living_streets() const { return _internal_has_use_living_streets(); } -inline void Costing_Options::set_has_use_living_streets() { +inline void CostingOptions::set_has_use_living_streets() { _impl_._oneof_case_[61] = kUseLivingStreets; } -inline void Costing_Options::clear_use_living_streets() { +inline void CostingOptions::clear_use_living_streets() { if (_internal_has_use_living_streets()) { _impl_.has_use_living_streets_.use_living_streets_ = 0; clear_has_has_use_living_streets(); } } -inline float Costing_Options::_internal_use_living_streets() const { +inline float CostingOptions::_internal_use_living_streets() const { if (_internal_has_use_living_streets()) { return _impl_.has_use_living_streets_.use_living_streets_; } return 0; } -inline void Costing_Options::_internal_set_use_living_streets(float value) { +inline void CostingOptions::_internal_set_use_living_streets(float value) { if (!_internal_has_use_living_streets()) { clear_has_use_living_streets(); set_has_use_living_streets(); } _impl_.has_use_living_streets_.use_living_streets_ = value; } -inline float Costing_Options::use_living_streets() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_living_streets) +inline float CostingOptions::use_living_streets() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.use_living_streets) return _internal_use_living_streets(); } -inline void Costing_Options::set_use_living_streets(float value) { +inline void CostingOptions::set_use_living_streets(float value) { _internal_set_use_living_streets(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_living_streets) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.use_living_streets) } // float service_factor = 69; -inline bool Costing_Options::_internal_has_service_factor() const { +inline bool CostingOptions::_internal_has_service_factor() const { return has_service_factor_case() == kServiceFactor; } -inline bool Costing_Options::has_service_factor() const { +inline bool CostingOptions::has_service_factor() const { return _internal_has_service_factor(); } -inline void Costing_Options::set_has_service_factor() { +inline void CostingOptions::set_has_service_factor() { _impl_._oneof_case_[62] = kServiceFactor; } -inline void Costing_Options::clear_service_factor() { +inline void CostingOptions::clear_service_factor() { if (_internal_has_service_factor()) { _impl_.has_service_factor_.service_factor_ = 0; clear_has_has_service_factor(); } } -inline float Costing_Options::_internal_service_factor() const { +inline float CostingOptions::_internal_service_factor() const { if (_internal_has_service_factor()) { return _impl_.has_service_factor_.service_factor_; } return 0; } -inline void Costing_Options::_internal_set_service_factor(float value) { +inline void CostingOptions::_internal_set_service_factor(float value) { if (!_internal_has_service_factor()) { clear_has_service_factor(); set_has_service_factor(); } _impl_.has_service_factor_.service_factor_ = value; } -inline float Costing_Options::service_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.service_factor) +inline float CostingOptions::service_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.service_factor) return _internal_service_factor(); } -inline void Costing_Options::set_service_factor(float value) { +inline void CostingOptions::set_service_factor(float value) { _internal_set_service_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.service_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.service_factor) } // float closure_factor = 70; -inline bool Costing_Options::_internal_has_closure_factor() const { +inline bool CostingOptions::_internal_has_closure_factor() const { return has_closure_factor_case() == kClosureFactor; } -inline bool Costing_Options::has_closure_factor() const { +inline bool CostingOptions::has_closure_factor() const { return _internal_has_closure_factor(); } -inline void Costing_Options::set_has_closure_factor() { +inline void CostingOptions::set_has_closure_factor() { _impl_._oneof_case_[63] = kClosureFactor; } -inline void Costing_Options::clear_closure_factor() { +inline void CostingOptions::clear_closure_factor() { if (_internal_has_closure_factor()) { _impl_.has_closure_factor_.closure_factor_ = 0; clear_has_has_closure_factor(); } } -inline float Costing_Options::_internal_closure_factor() const { +inline float CostingOptions::_internal_closure_factor() const { if (_internal_has_closure_factor()) { return _impl_.has_closure_factor_.closure_factor_; } return 0; } -inline void Costing_Options::_internal_set_closure_factor(float value) { +inline void CostingOptions::_internal_set_closure_factor(float value) { if (!_internal_has_closure_factor()) { clear_has_closure_factor(); set_has_closure_factor(); } _impl_.has_closure_factor_.closure_factor_ = value; } -inline float Costing_Options::closure_factor() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.closure_factor) +inline float CostingOptions::closure_factor() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.closure_factor) return _internal_closure_factor(); } -inline void Costing_Options::set_closure_factor(float value) { +inline void CostingOptions::set_closure_factor(float value) { _internal_set_closure_factor(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.closure_factor) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.closure_factor) } // float private_access_penalty = 71; -inline bool Costing_Options::_internal_has_private_access_penalty() const { +inline bool CostingOptions::_internal_has_private_access_penalty() const { return has_private_access_penalty_case() == kPrivateAccessPenalty; } -inline bool Costing_Options::has_private_access_penalty() const { +inline bool CostingOptions::has_private_access_penalty() const { return _internal_has_private_access_penalty(); } -inline void Costing_Options::set_has_private_access_penalty() { +inline void CostingOptions::set_has_private_access_penalty() { _impl_._oneof_case_[64] = kPrivateAccessPenalty; } -inline void Costing_Options::clear_private_access_penalty() { +inline void CostingOptions::clear_private_access_penalty() { if (_internal_has_private_access_penalty()) { _impl_.has_private_access_penalty_.private_access_penalty_ = 0; clear_has_has_private_access_penalty(); } } -inline float Costing_Options::_internal_private_access_penalty() const { +inline float CostingOptions::_internal_private_access_penalty() const { if (_internal_has_private_access_penalty()) { return _impl_.has_private_access_penalty_.private_access_penalty_; } return 0; } -inline void Costing_Options::_internal_set_private_access_penalty(float value) { +inline void CostingOptions::_internal_set_private_access_penalty(float value) { if (!_internal_has_private_access_penalty()) { clear_has_private_access_penalty(); set_has_private_access_penalty(); } _impl_.has_private_access_penalty_.private_access_penalty_ = value; } -inline float Costing_Options::private_access_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.private_access_penalty) +inline float CostingOptions::private_access_penalty() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.private_access_penalty) return _internal_private_access_penalty(); } -inline void Costing_Options::set_private_access_penalty(float value) { +inline void CostingOptions::set_private_access_penalty(float value) { _internal_set_private_access_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.private_access_penalty) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.private_access_penalty) } // bool exclude_unpaved = 72; -inline bool Costing_Options::_internal_has_exclude_unpaved() const { +inline bool CostingOptions::_internal_has_exclude_unpaved() const { return has_exclude_unpaved_case() == kExcludeUnpaved; } -inline bool Costing_Options::has_exclude_unpaved() const { +inline bool CostingOptions::has_exclude_unpaved() const { return _internal_has_exclude_unpaved(); } -inline void Costing_Options::set_has_exclude_unpaved() { +inline void CostingOptions::set_has_exclude_unpaved() { _impl_._oneof_case_[65] = kExcludeUnpaved; } -inline void Costing_Options::clear_exclude_unpaved() { +inline void CostingOptions::clear_exclude_unpaved() { if (_internal_has_exclude_unpaved()) { _impl_.has_exclude_unpaved_.exclude_unpaved_ = false; clear_has_has_exclude_unpaved(); } } -inline bool Costing_Options::_internal_exclude_unpaved() const { +inline bool CostingOptions::_internal_exclude_unpaved() const { if (_internal_has_exclude_unpaved()) { return _impl_.has_exclude_unpaved_.exclude_unpaved_; } return false; } -inline void Costing_Options::_internal_set_exclude_unpaved(bool value) { +inline void CostingOptions::_internal_set_exclude_unpaved(bool value) { if (!_internal_has_exclude_unpaved()) { clear_has_exclude_unpaved(); set_has_exclude_unpaved(); } _impl_.has_exclude_unpaved_.exclude_unpaved_ = value; } -inline bool Costing_Options::exclude_unpaved() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.exclude_unpaved) +inline bool CostingOptions::exclude_unpaved() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.exclude_unpaved) return _internal_exclude_unpaved(); } -inline void Costing_Options::set_exclude_unpaved(bool value) { +inline void CostingOptions::set_exclude_unpaved(bool value) { _internal_set_exclude_unpaved(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.exclude_unpaved) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.exclude_unpaved) } // bool include_hot = 73; -inline bool Costing_Options::_internal_has_include_hot() const { +inline bool CostingOptions::_internal_has_include_hot() const { return has_include_hot_case() == kIncludeHot; } -inline bool Costing_Options::has_include_hot() const { +inline bool CostingOptions::has_include_hot() const { return _internal_has_include_hot(); } -inline void Costing_Options::set_has_include_hot() { +inline void CostingOptions::set_has_include_hot() { _impl_._oneof_case_[66] = kIncludeHot; } -inline void Costing_Options::clear_include_hot() { +inline void CostingOptions::clear_include_hot() { if (_internal_has_include_hot()) { _impl_.has_include_hot_.include_hot_ = false; clear_has_has_include_hot(); } } -inline bool Costing_Options::_internal_include_hot() const { +inline bool CostingOptions::_internal_include_hot() const { if (_internal_has_include_hot()) { return _impl_.has_include_hot_.include_hot_; } return false; } -inline void Costing_Options::_internal_set_include_hot(bool value) { +inline void CostingOptions::_internal_set_include_hot(bool value) { if (!_internal_has_include_hot()) { clear_has_include_hot(); set_has_include_hot(); } _impl_.has_include_hot_.include_hot_ = value; } -inline bool Costing_Options::include_hot() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.include_hot) +inline bool CostingOptions::include_hot() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.include_hot) return _internal_include_hot(); } -inline void Costing_Options::set_include_hot(bool value) { +inline void CostingOptions::set_include_hot(bool value) { _internal_set_include_hot(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.include_hot) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.include_hot) } // bool include_hov2 = 74; -inline bool Costing_Options::_internal_has_include_hov2() const { +inline bool CostingOptions::_internal_has_include_hov2() const { return has_include_hov2_case() == kIncludeHov2; } -inline bool Costing_Options::has_include_hov2() const { +inline bool CostingOptions::has_include_hov2() const { return _internal_has_include_hov2(); } -inline void Costing_Options::set_has_include_hov2() { +inline void CostingOptions::set_has_include_hov2() { _impl_._oneof_case_[67] = kIncludeHov2; } -inline void Costing_Options::clear_include_hov2() { +inline void CostingOptions::clear_include_hov2() { if (_internal_has_include_hov2()) { _impl_.has_include_hov2_.include_hov2_ = false; clear_has_has_include_hov2(); } } -inline bool Costing_Options::_internal_include_hov2() const { +inline bool CostingOptions::_internal_include_hov2() const { if (_internal_has_include_hov2()) { return _impl_.has_include_hov2_.include_hov2_; } return false; } -inline void Costing_Options::_internal_set_include_hov2(bool value) { +inline void CostingOptions::_internal_set_include_hov2(bool value) { if (!_internal_has_include_hov2()) { clear_has_include_hov2(); set_has_include_hov2(); } _impl_.has_include_hov2_.include_hov2_ = value; } -inline bool Costing_Options::include_hov2() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.include_hov2) +inline bool CostingOptions::include_hov2() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.include_hov2) return _internal_include_hov2(); } -inline void Costing_Options::set_include_hov2(bool value) { +inline void CostingOptions::set_include_hov2(bool value) { _internal_set_include_hov2(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.include_hov2) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.include_hov2) } // bool include_hov3 = 75; -inline bool Costing_Options::_internal_has_include_hov3() const { +inline bool CostingOptions::_internal_has_include_hov3() const { return has_include_hov3_case() == kIncludeHov3; } -inline bool Costing_Options::has_include_hov3() const { +inline bool CostingOptions::has_include_hov3() const { return _internal_has_include_hov3(); } -inline void Costing_Options::set_has_include_hov3() { +inline void CostingOptions::set_has_include_hov3() { _impl_._oneof_case_[68] = kIncludeHov3; } -inline void Costing_Options::clear_include_hov3() { +inline void CostingOptions::clear_include_hov3() { if (_internal_has_include_hov3()) { _impl_.has_include_hov3_.include_hov3_ = false; clear_has_has_include_hov3(); } } -inline bool Costing_Options::_internal_include_hov3() const { +inline bool CostingOptions::_internal_include_hov3() const { if (_internal_has_include_hov3()) { return _impl_.has_include_hov3_.include_hov3_; } return false; } -inline void Costing_Options::_internal_set_include_hov3(bool value) { +inline void CostingOptions::_internal_set_include_hov3(bool value) { if (!_internal_has_include_hov3()) { clear_has_include_hov3(); set_has_include_hov3(); } _impl_.has_include_hov3_.include_hov3_ = value; } -inline bool Costing_Options::include_hov3() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.include_hov3) +inline bool CostingOptions::include_hov3() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.include_hov3) return _internal_include_hov3(); } -inline void Costing_Options::set_include_hov3(bool value) { +inline void CostingOptions::set_include_hov3(bool value) { _internal_set_include_hov3(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.include_hov3) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.include_hov3) } // bool exclude_cash_only_tolls = 76; -inline bool Costing_Options::_internal_has_exclude_cash_only_tolls() const { +inline bool CostingOptions::_internal_has_exclude_cash_only_tolls() const { return has_exclude_cash_only_tolls_case() == kExcludeCashOnlyTolls; } -inline bool Costing_Options::has_exclude_cash_only_tolls() const { +inline bool CostingOptions::has_exclude_cash_only_tolls() const { return _internal_has_exclude_cash_only_tolls(); } -inline void Costing_Options::set_has_exclude_cash_only_tolls() { +inline void CostingOptions::set_has_exclude_cash_only_tolls() { _impl_._oneof_case_[69] = kExcludeCashOnlyTolls; } -inline void Costing_Options::clear_exclude_cash_only_tolls() { +inline void CostingOptions::clear_exclude_cash_only_tolls() { if (_internal_has_exclude_cash_only_tolls()) { _impl_.has_exclude_cash_only_tolls_.exclude_cash_only_tolls_ = false; clear_has_has_exclude_cash_only_tolls(); } } -inline bool Costing_Options::_internal_exclude_cash_only_tolls() const { +inline bool CostingOptions::_internal_exclude_cash_only_tolls() const { if (_internal_has_exclude_cash_only_tolls()) { return _impl_.has_exclude_cash_only_tolls_.exclude_cash_only_tolls_; } return false; } -inline void Costing_Options::_internal_set_exclude_cash_only_tolls(bool value) { +inline void CostingOptions::_internal_set_exclude_cash_only_tolls(bool value) { if (!_internal_has_exclude_cash_only_tolls()) { clear_has_exclude_cash_only_tolls(); set_has_exclude_cash_only_tolls(); } _impl_.has_exclude_cash_only_tolls_.exclude_cash_only_tolls_ = value; } -inline bool Costing_Options::exclude_cash_only_tolls() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.exclude_cash_only_tolls) +inline bool CostingOptions::exclude_cash_only_tolls() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.exclude_cash_only_tolls) return _internal_exclude_cash_only_tolls(); } -inline void Costing_Options::set_exclude_cash_only_tolls(bool value) { +inline void CostingOptions::set_exclude_cash_only_tolls(bool value) { _internal_set_exclude_cash_only_tolls(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.exclude_cash_only_tolls) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.exclude_cash_only_tolls) } // uint32 restriction_probability = 77; -inline bool Costing_Options::_internal_has_restriction_probability() const { +inline bool CostingOptions::_internal_has_restriction_probability() const { return has_restriction_probability_case() == kRestrictionProbability; } -inline bool Costing_Options::has_restriction_probability() const { +inline bool CostingOptions::has_restriction_probability() const { return _internal_has_restriction_probability(); } -inline void Costing_Options::set_has_restriction_probability() { +inline void CostingOptions::set_has_restriction_probability() { _impl_._oneof_case_[70] = kRestrictionProbability; } -inline void Costing_Options::clear_restriction_probability() { +inline void CostingOptions::clear_restriction_probability() { if (_internal_has_restriction_probability()) { _impl_.has_restriction_probability_.restriction_probability_ = 0u; clear_has_has_restriction_probability(); } } -inline uint32_t Costing_Options::_internal_restriction_probability() const { +inline uint32_t CostingOptions::_internal_restriction_probability() const { if (_internal_has_restriction_probability()) { return _impl_.has_restriction_probability_.restriction_probability_; } return 0u; } -inline void Costing_Options::_internal_set_restriction_probability(uint32_t value) { +inline void CostingOptions::_internal_set_restriction_probability(uint32_t value) { if (!_internal_has_restriction_probability()) { clear_has_restriction_probability(); set_has_restriction_probability(); } _impl_.has_restriction_probability_.restriction_probability_ = value; } -inline uint32_t Costing_Options::restriction_probability() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.restriction_probability) +inline uint32_t CostingOptions::restriction_probability() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.restriction_probability) return _internal_restriction_probability(); } -inline void Costing_Options::set_restriction_probability(uint32_t value) { +inline void CostingOptions::set_restriction_probability(uint32_t value) { _internal_set_restriction_probability(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.restriction_probability) + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.restriction_probability) } -// repeated .valhalla.AvoidEdge exclude_edges = 78; -inline int Costing_Options::_internal_exclude_edges_size() const { - return _impl_.exclude_edges_.size(); +// .valhalla.Costing costing = 90; +inline bool CostingOptions::_internal_has_costing() const { + return has_costing_case() == kCosting; } -inline int Costing_Options::exclude_edges_size() const { - return _internal_exclude_edges_size(); +inline bool CostingOptions::has_costing() const { + return _internal_has_costing(); } -inline void Costing_Options::clear_exclude_edges() { - _impl_.exclude_edges_.Clear(); +inline void CostingOptions::set_has_costing() { + _impl_._oneof_case_[71] = kCosting; } -inline ::valhalla::AvoidEdge* Costing_Options::mutable_exclude_edges(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Costing.Options.exclude_edges) - return _impl_.exclude_edges_.Mutable(index); +inline void CostingOptions::clear_costing() { + if (_internal_has_costing()) { + _impl_.has_costing_.costing_ = 0; + clear_has_has_costing(); + } } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::AvoidEdge >* -Costing_Options::mutable_exclude_edges() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Costing.Options.exclude_edges) - return &_impl_.exclude_edges_; +inline ::valhalla::Costing CostingOptions::_internal_costing() const { + if (_internal_has_costing()) { + return static_cast< ::valhalla::Costing >(_impl_.has_costing_.costing_); + } + return static_cast< ::valhalla::Costing >(0); } -inline const ::valhalla::AvoidEdge& Costing_Options::_internal_exclude_edges(int index) const { - return _impl_.exclude_edges_.Get(index); +inline ::valhalla::Costing CostingOptions::costing() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.costing) + return _internal_costing(); } -inline const ::valhalla::AvoidEdge& Costing_Options::exclude_edges(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.exclude_edges) - return _internal_exclude_edges(index); +inline void CostingOptions::_internal_set_costing(::valhalla::Costing value) { + if (!_internal_has_costing()) { + clear_has_costing(); + set_has_costing(); + } + _impl_.has_costing_.costing_ = value; } -inline ::valhalla::AvoidEdge* Costing_Options::_internal_add_exclude_edges() { - return _impl_.exclude_edges_.Add(); +inline void CostingOptions::set_costing(::valhalla::Costing value) { + _internal_set_costing(value); + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.costing) } -inline ::valhalla::AvoidEdge* Costing_Options::add_exclude_edges() { - ::valhalla::AvoidEdge* _add = _internal_add_exclude_edges(); - // @@protoc_insertion_point(field_add:valhalla.Costing.Options.exclude_edges) - return _add; + +// string name = 91; +inline bool CostingOptions::_internal_has_name() const { + return has_name_case() == kName; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::AvoidEdge >& -Costing_Options::exclude_edges() const { - // @@protoc_insertion_point(field_list:valhalla.Costing.Options.exclude_edges) - return _impl_.exclude_edges_; +inline bool CostingOptions::has_name() const { + return _internal_has_name(); } - -// float elevator_penalty = 79; -inline bool Costing_Options::_internal_has_elevator_penalty() const { - return has_elevator_penalty_case() == kElevatorPenalty; +inline void CostingOptions::set_has_name() { + _impl_._oneof_case_[72] = kName; +} +inline void CostingOptions::clear_name() { + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } +} +inline const std::string& CostingOptions::name() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.name) + return _internal_name(); } -inline bool Costing_Options::has_elevator_penalty() const { - return _internal_has_elevator_penalty(); +template +inline void CostingOptions::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.name) } -inline void Costing_Options::set_has_elevator_penalty() { - _impl_._oneof_case_[71] = kElevatorPenalty; +inline std::string* CostingOptions::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.name) + return _s; } -inline void Costing_Options::clear_elevator_penalty() { - if (_internal_has_elevator_penalty()) { - _impl_.has_elevator_penalty_.elevator_penalty_ = 0; - clear_has_has_elevator_penalty(); +inline const std::string& CostingOptions::_internal_name() const { + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } -inline float Costing_Options::_internal_elevator_penalty() const { - if (_internal_has_elevator_penalty()) { - return _impl_.has_elevator_penalty_.elevator_penalty_; +inline void CostingOptions::_internal_set_name(const std::string& value) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); } - return 0; + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } -inline void Costing_Options::_internal_set_elevator_penalty(float value) { - if (!_internal_has_elevator_penalty()) { - clear_has_elevator_penalty(); - set_has_elevator_penalty(); +inline std::string* CostingOptions::_internal_mutable_name() { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); } - _impl_.has_elevator_penalty_.elevator_penalty_ = value; + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } -inline float Costing_Options::elevator_penalty() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.elevator_penalty) - return _internal_elevator_penalty(); +inline std::string* CostingOptions::release_name() { + // @@protoc_insertion_point(field_release:valhalla.CostingOptions.name) + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } -inline void Costing_Options::set_elevator_penalty(float value) { - _internal_set_elevator_penalty(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.elevator_penalty) +inline void CostingOptions::set_allocated_name(std::string* name) { + if (has_has_name()) { + clear_has_name(); + } + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.CostingOptions.name) } -// uint32 fixed_speed = 80; -inline void Costing_Options::clear_fixed_speed() { - _impl_.fixed_speed_ = 0u; +// repeated .valhalla.AvoidEdge exclude_edges = 92; +inline int CostingOptions::_internal_exclude_edges_size() const { + return _impl_.exclude_edges_.size(); } -inline uint32_t Costing_Options::_internal_fixed_speed() const { - return _impl_.fixed_speed_; +inline int CostingOptions::exclude_edges_size() const { + return _internal_exclude_edges_size(); } -inline uint32_t Costing_Options::fixed_speed() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.fixed_speed) - return _internal_fixed_speed(); +inline void CostingOptions::clear_exclude_edges() { + _impl_.exclude_edges_.Clear(); } -inline void Costing_Options::_internal_set_fixed_speed(uint32_t value) { - - _impl_.fixed_speed_ = value; +inline ::valhalla::AvoidEdge* CostingOptions::mutable_exclude_edges(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.CostingOptions.exclude_edges) + return _impl_.exclude_edges_.Mutable(index); } -inline void Costing_Options::set_fixed_speed(uint32_t value) { - _internal_set_fixed_speed(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.fixed_speed) +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::AvoidEdge >* +CostingOptions::mutable_exclude_edges() { + // @@protoc_insertion_point(field_mutable_list:valhalla.CostingOptions.exclude_edges) + return &_impl_.exclude_edges_; } - -// uint32 axle_count = 81; -inline void Costing_Options::clear_axle_count() { - _impl_.axle_count_ = 0u; +inline const ::valhalla::AvoidEdge& CostingOptions::_internal_exclude_edges(int index) const { + return _impl_.exclude_edges_.Get(index); } -inline uint32_t Costing_Options::_internal_axle_count() const { - return _impl_.axle_count_; +inline const ::valhalla::AvoidEdge& CostingOptions::exclude_edges(int index) const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.exclude_edges) + return _internal_exclude_edges(index); } -inline uint32_t Costing_Options::axle_count() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.axle_count) - return _internal_axle_count(); +inline ::valhalla::AvoidEdge* CostingOptions::_internal_add_exclude_edges() { + return _impl_.exclude_edges_.Add(); } -inline void Costing_Options::_internal_set_axle_count(uint32_t value) { - - _impl_.axle_count_ = value; +inline ::valhalla::AvoidEdge* CostingOptions::add_exclude_edges() { + ::valhalla::AvoidEdge* _add = _internal_add_exclude_edges(); + // @@protoc_insertion_point(field_add:valhalla.CostingOptions.exclude_edges) + return _add; } -inline void Costing_Options::set_axle_count(uint32_t value) { - _internal_set_axle_count(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.axle_count) +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::AvoidEdge >& +CostingOptions::exclude_edges() const { + // @@protoc_insertion_point(field_list:valhalla.CostingOptions.exclude_edges) + return _impl_.exclude_edges_; } -// float use_lit = 82; -inline void Costing_Options::clear_use_lit() { - _impl_.use_lit_ = 0; -} -inline float Costing_Options::_internal_use_lit() const { - return _impl_.use_lit_; -} -inline float Costing_Options::use_lit() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.use_lit) - return _internal_use_lit(); +// bool filter_closures = 93; +inline bool CostingOptions::_internal_has_filter_closures() const { + return has_filter_closures_case() == kFilterClosures; } -inline void Costing_Options::_internal_set_use_lit(float value) { - - _impl_.use_lit_ = value; +inline bool CostingOptions::has_filter_closures() const { + return _internal_has_filter_closures(); } -inline void Costing_Options::set_use_lit(float value) { - _internal_set_use_lit(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.use_lit) +inline void CostingOptions::set_has_filter_closures() { + _impl_._oneof_case_[73] = kFilterClosures; } - -// bool disable_hierarchy_pruning = 83; -inline void Costing_Options::clear_disable_hierarchy_pruning() { - _impl_.disable_hierarchy_pruning_ = false; +inline void CostingOptions::clear_filter_closures() { + if (_internal_has_filter_closures()) { + _impl_.has_filter_closures_.filter_closures_ = false; + clear_has_has_filter_closures(); + } } -inline bool Costing_Options::_internal_disable_hierarchy_pruning() const { - return _impl_.disable_hierarchy_pruning_; +inline bool CostingOptions::_internal_filter_closures() const { + if (_internal_has_filter_closures()) { + return _impl_.has_filter_closures_.filter_closures_; + } + return false; } -inline bool Costing_Options::disable_hierarchy_pruning() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.Options.disable_hierarchy_pruning) - return _internal_disable_hierarchy_pruning(); +inline void CostingOptions::_internal_set_filter_closures(bool value) { + if (!_internal_has_filter_closures()) { + clear_has_filter_closures(); + set_has_filter_closures(); + } + _impl_.has_filter_closures_.filter_closures_ = value; } -inline void Costing_Options::_internal_set_disable_hierarchy_pruning(bool value) { - - _impl_.disable_hierarchy_pruning_ = value; +inline bool CostingOptions::filter_closures() const { + // @@protoc_insertion_point(field_get:valhalla.CostingOptions.filter_closures) + return _internal_filter_closures(); } -inline void Costing_Options::set_disable_hierarchy_pruning(bool value) { - _internal_set_disable_hierarchy_pruning(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.Options.disable_hierarchy_pruning) +inline void CostingOptions::set_filter_closures(bool value) { + _internal_set_filter_closures(value); + // @@protoc_insertion_point(field_set:valhalla.CostingOptions.filter_closures) } -inline bool Costing_Options::has_has_maneuver_penalty() const { +inline bool CostingOptions::has_has_maneuver_penalty() const { return has_maneuver_penalty_case() != HAS_MANEUVER_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_maneuver_penalty() { +inline void CostingOptions::clear_has_has_maneuver_penalty() { _impl_._oneof_case_[0] = HAS_MANEUVER_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_destination_only_penalty() const { +inline bool CostingOptions::has_has_destination_only_penalty() const { return has_destination_only_penalty_case() != HAS_DESTINATION_ONLY_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_destination_only_penalty() { +inline void CostingOptions::clear_has_has_destination_only_penalty() { _impl_._oneof_case_[1] = HAS_DESTINATION_ONLY_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_gate_cost() const { +inline bool CostingOptions::has_has_gate_cost() const { return has_gate_cost_case() != HAS_GATE_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_gate_cost() { +inline void CostingOptions::clear_has_has_gate_cost() { _impl_._oneof_case_[2] = HAS_GATE_COST_NOT_SET; } -inline bool Costing_Options::has_has_gate_penalty() const { +inline bool CostingOptions::has_has_gate_penalty() const { return has_gate_penalty_case() != HAS_GATE_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_gate_penalty() { +inline void CostingOptions::clear_has_has_gate_penalty() { _impl_._oneof_case_[3] = HAS_GATE_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_toll_booth_cost() const { +inline bool CostingOptions::has_has_toll_booth_cost() const { return has_toll_booth_cost_case() != HAS_TOLL_BOOTH_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_toll_booth_cost() { +inline void CostingOptions::clear_has_has_toll_booth_cost() { _impl_._oneof_case_[4] = HAS_TOLL_BOOTH_COST_NOT_SET; } -inline bool Costing_Options::has_has_toll_booth_penalty() const { +inline bool CostingOptions::has_has_toll_booth_penalty() const { return has_toll_booth_penalty_case() != HAS_TOLL_BOOTH_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_toll_booth_penalty() { +inline void CostingOptions::clear_has_has_toll_booth_penalty() { _impl_._oneof_case_[5] = HAS_TOLL_BOOTH_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_alley_penalty() const { +inline bool CostingOptions::has_has_alley_penalty() const { return has_alley_penalty_case() != HAS_ALLEY_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_alley_penalty() { +inline void CostingOptions::clear_has_has_alley_penalty() { _impl_._oneof_case_[6] = HAS_ALLEY_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_country_crossing_cost() const { +inline bool CostingOptions::has_has_country_crossing_cost() const { return has_country_crossing_cost_case() != HAS_COUNTRY_CROSSING_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_country_crossing_cost() { +inline void CostingOptions::clear_has_has_country_crossing_cost() { _impl_._oneof_case_[7] = HAS_COUNTRY_CROSSING_COST_NOT_SET; } -inline bool Costing_Options::has_has_country_crossing_penalty() const { +inline bool CostingOptions::has_has_country_crossing_penalty() const { return has_country_crossing_penalty_case() != HAS_COUNTRY_CROSSING_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_country_crossing_penalty() { +inline void CostingOptions::clear_has_has_country_crossing_penalty() { _impl_._oneof_case_[8] = HAS_COUNTRY_CROSSING_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_ferry_cost() const { +inline bool CostingOptions::has_has_ferry_cost() const { return has_ferry_cost_case() != HAS_FERRY_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_ferry_cost() { +inline void CostingOptions::clear_has_has_ferry_cost() { _impl_._oneof_case_[9] = HAS_FERRY_COST_NOT_SET; } -inline bool Costing_Options::has_has_avoid_bad_surfaces() const { +inline bool CostingOptions::has_has_avoid_bad_surfaces() const { return has_avoid_bad_surfaces_case() != HAS_AVOID_BAD_SURFACES_NOT_SET; } -inline void Costing_Options::clear_has_has_avoid_bad_surfaces() { +inline void CostingOptions::clear_has_has_avoid_bad_surfaces() { _impl_._oneof_case_[10] = HAS_AVOID_BAD_SURFACES_NOT_SET; } -inline bool Costing_Options::has_has_use_ferry() const { +inline bool CostingOptions::has_has_use_ferry() const { return has_use_ferry_case() != HAS_USE_FERRY_NOT_SET; } -inline void Costing_Options::clear_has_has_use_ferry() { +inline void CostingOptions::clear_has_has_use_ferry() { _impl_._oneof_case_[11] = HAS_USE_FERRY_NOT_SET; } -inline bool Costing_Options::has_has_use_highways() const { +inline bool CostingOptions::has_has_use_highways() const { return has_use_highways_case() != HAS_USE_HIGHWAYS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_highways() { +inline void CostingOptions::clear_has_has_use_highways() { _impl_._oneof_case_[12] = HAS_USE_HIGHWAYS_NOT_SET; } -inline bool Costing_Options::has_has_use_tolls() const { +inline bool CostingOptions::has_has_use_tolls() const { return has_use_tolls_case() != HAS_USE_TOLLS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_tolls() { +inline void CostingOptions::clear_has_has_use_tolls() { _impl_._oneof_case_[13] = HAS_USE_TOLLS_NOT_SET; } -inline bool Costing_Options::has_has_use_roads() const { +inline bool CostingOptions::has_has_use_roads() const { return has_use_roads_case() != HAS_USE_ROADS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_roads() { +inline void CostingOptions::clear_has_has_use_roads() { _impl_._oneof_case_[14] = HAS_USE_ROADS_NOT_SET; } -inline bool Costing_Options::has_has_max_distance() const { +inline bool CostingOptions::has_has_max_distance() const { return has_max_distance_case() != HAS_MAX_DISTANCE_NOT_SET; } -inline void Costing_Options::clear_has_has_max_distance() { +inline void CostingOptions::clear_has_has_max_distance() { _impl_._oneof_case_[15] = HAS_MAX_DISTANCE_NOT_SET; } -inline bool Costing_Options::has_has_walking_speed() const { +inline bool CostingOptions::has_has_walking_speed() const { return has_walking_speed_case() != HAS_WALKING_SPEED_NOT_SET; } -inline void Costing_Options::clear_has_has_walking_speed() { +inline void CostingOptions::clear_has_has_walking_speed() { _impl_._oneof_case_[16] = HAS_WALKING_SPEED_NOT_SET; } -inline bool Costing_Options::has_has_step_penalty() const { +inline bool CostingOptions::has_has_step_penalty() const { return has_step_penalty_case() != HAS_STEP_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_step_penalty() { +inline void CostingOptions::clear_has_has_step_penalty() { _impl_._oneof_case_[17] = HAS_STEP_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_max_grade() const { +inline bool CostingOptions::has_has_max_grade() const { return has_max_grade_case() != HAS_MAX_GRADE_NOT_SET; } -inline void Costing_Options::clear_has_has_max_grade() { +inline void CostingOptions::clear_has_has_max_grade() { _impl_._oneof_case_[18] = HAS_MAX_GRADE_NOT_SET; } -inline bool Costing_Options::has_has_max_hiking_difficulty() const { +inline bool CostingOptions::has_has_max_hiking_difficulty() const { return has_max_hiking_difficulty_case() != HAS_MAX_HIKING_DIFFICULTY_NOT_SET; } -inline void Costing_Options::clear_has_has_max_hiking_difficulty() { +inline void CostingOptions::clear_has_has_max_hiking_difficulty() { _impl_._oneof_case_[19] = HAS_MAX_HIKING_DIFFICULTY_NOT_SET; } -inline bool Costing_Options::has_has_mode_factor() const { +inline bool CostingOptions::has_has_mode_factor() const { return has_mode_factor_case() != HAS_MODE_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_mode_factor() { +inline void CostingOptions::clear_has_has_mode_factor() { _impl_._oneof_case_[20] = HAS_MODE_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_walkway_factor() const { +inline bool CostingOptions::has_has_walkway_factor() const { return has_walkway_factor_case() != HAS_WALKWAY_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_walkway_factor() { +inline void CostingOptions::clear_has_has_walkway_factor() { _impl_._oneof_case_[21] = HAS_WALKWAY_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_sidewalk_factor() const { +inline bool CostingOptions::has_has_sidewalk_factor() const { return has_sidewalk_factor_case() != HAS_SIDEWALK_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_sidewalk_factor() { +inline void CostingOptions::clear_has_has_sidewalk_factor() { _impl_._oneof_case_[22] = HAS_SIDEWALK_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_alley_factor() const { +inline bool CostingOptions::has_has_alley_factor() const { return has_alley_factor_case() != HAS_ALLEY_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_alley_factor() { +inline void CostingOptions::clear_has_has_alley_factor() { _impl_._oneof_case_[23] = HAS_ALLEY_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_driveway_factor() const { +inline bool CostingOptions::has_has_driveway_factor() const { return has_driveway_factor_case() != HAS_DRIVEWAY_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_driveway_factor() { +inline void CostingOptions::clear_has_has_driveway_factor() { _impl_._oneof_case_[24] = HAS_DRIVEWAY_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_driveway_penalty() const { +inline bool CostingOptions::has_has_driveway_penalty() const { return has_driveway_penalty_case() != HAS_DRIVEWAY_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_driveway_penalty() { +inline void CostingOptions::clear_has_has_driveway_penalty() { _impl_._oneof_case_[25] = HAS_DRIVEWAY_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_transit_start_end_max_distance() const { +inline bool CostingOptions::has_has_transit_start_end_max_distance() const { return has_transit_start_end_max_distance_case() != HAS_TRANSIT_START_END_MAX_DISTANCE_NOT_SET; } -inline void Costing_Options::clear_has_has_transit_start_end_max_distance() { +inline void CostingOptions::clear_has_has_transit_start_end_max_distance() { _impl_._oneof_case_[26] = HAS_TRANSIT_START_END_MAX_DISTANCE_NOT_SET; } -inline bool Costing_Options::has_has_transit_transfer_max_distance() const { +inline bool CostingOptions::has_has_transit_transfer_max_distance() const { return has_transit_transfer_max_distance_case() != HAS_TRANSIT_TRANSFER_MAX_DISTANCE_NOT_SET; } -inline void Costing_Options::clear_has_has_transit_transfer_max_distance() { +inline void CostingOptions::clear_has_has_transit_transfer_max_distance() { _impl_._oneof_case_[27] = HAS_TRANSIT_TRANSFER_MAX_DISTANCE_NOT_SET; } -inline bool Costing_Options::has_has_transport_type() const { +inline bool CostingOptions::has_has_transport_type() const { return has_transport_type_case() != HAS_TRANSPORT_TYPE_NOT_SET; } -inline void Costing_Options::clear_has_has_transport_type() { +inline void CostingOptions::clear_has_has_transport_type() { _impl_._oneof_case_[28] = HAS_TRANSPORT_TYPE_NOT_SET; } -inline bool Costing_Options::has_has_top_speed() const { +inline bool CostingOptions::has_has_top_speed() const { return has_top_speed_case() != HAS_TOP_SPEED_NOT_SET; } -inline void Costing_Options::clear_has_has_top_speed() { +inline void CostingOptions::clear_has_has_top_speed() { _impl_._oneof_case_[29] = HAS_TOP_SPEED_NOT_SET; } -inline bool Costing_Options::has_has_use_hills() const { +inline bool CostingOptions::has_has_use_hills() const { return has_use_hills_case() != HAS_USE_HILLS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_hills() { +inline void CostingOptions::clear_has_has_use_hills() { _impl_._oneof_case_[30] = HAS_USE_HILLS_NOT_SET; } -inline bool Costing_Options::has_has_use_primary() const { +inline bool CostingOptions::has_has_use_primary() const { return has_use_primary_case() != HAS_USE_PRIMARY_NOT_SET; } -inline void Costing_Options::clear_has_has_use_primary() { +inline void CostingOptions::clear_has_has_use_primary() { _impl_._oneof_case_[31] = HAS_USE_PRIMARY_NOT_SET; } -inline bool Costing_Options::has_has_use_trails() const { +inline bool CostingOptions::has_has_use_trails() const { return has_use_trails_case() != HAS_USE_TRAILS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_trails() { +inline void CostingOptions::clear_has_has_use_trails() { _impl_._oneof_case_[32] = HAS_USE_TRAILS_NOT_SET; } -inline bool Costing_Options::has_has_low_class_penalty() const { +inline bool CostingOptions::has_has_low_class_penalty() const { return has_low_class_penalty_case() != HAS_LOW_CLASS_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_low_class_penalty() { +inline void CostingOptions::clear_has_has_low_class_penalty() { _impl_._oneof_case_[33] = HAS_LOW_CLASS_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_hazmat() const { +inline bool CostingOptions::has_has_hazmat() const { return has_hazmat_case() != HAS_HAZMAT_NOT_SET; } -inline void Costing_Options::clear_has_has_hazmat() { +inline void CostingOptions::clear_has_has_hazmat() { _impl_._oneof_case_[34] = HAS_HAZMAT_NOT_SET; } -inline bool Costing_Options::has_has_weight() const { +inline bool CostingOptions::has_has_weight() const { return has_weight_case() != HAS_WEIGHT_NOT_SET; } -inline void Costing_Options::clear_has_has_weight() { +inline void CostingOptions::clear_has_has_weight() { _impl_._oneof_case_[35] = HAS_WEIGHT_NOT_SET; } -inline bool Costing_Options::has_has_axle_load() const { +inline bool CostingOptions::has_has_axle_load() const { return has_axle_load_case() != HAS_AXLE_LOAD_NOT_SET; } -inline void Costing_Options::clear_has_has_axle_load() { +inline void CostingOptions::clear_has_has_axle_load() { _impl_._oneof_case_[36] = HAS_AXLE_LOAD_NOT_SET; } -inline bool Costing_Options::has_has_height() const { +inline bool CostingOptions::has_has_height() const { return has_height_case() != HAS_HEIGHT_NOT_SET; } -inline void Costing_Options::clear_has_has_height() { +inline void CostingOptions::clear_has_has_height() { _impl_._oneof_case_[37] = HAS_HEIGHT_NOT_SET; } -inline bool Costing_Options::has_has_width() const { +inline bool CostingOptions::has_has_width() const { return has_width_case() != HAS_WIDTH_NOT_SET; } -inline void Costing_Options::clear_has_has_width() { +inline void CostingOptions::clear_has_has_width() { _impl_._oneof_case_[38] = HAS_WIDTH_NOT_SET; } -inline bool Costing_Options::has_has_length() const { +inline bool CostingOptions::has_has_length() const { return has_length_case() != HAS_LENGTH_NOT_SET; } -inline void Costing_Options::clear_has_has_length() { +inline void CostingOptions::clear_has_has_length() { _impl_._oneof_case_[39] = HAS_LENGTH_NOT_SET; } -inline bool Costing_Options::has_has_cycling_speed() const { +inline bool CostingOptions::has_has_cycling_speed() const { return has_cycling_speed_case() != HAS_CYCLING_SPEED_NOT_SET; } -inline void Costing_Options::clear_has_has_cycling_speed() { +inline void CostingOptions::clear_has_has_cycling_speed() { _impl_._oneof_case_[40] = HAS_CYCLING_SPEED_NOT_SET; } -inline bool Costing_Options::has_has_wheelchair() const { +inline bool CostingOptions::has_has_wheelchair() const { return has_wheelchair_case() != HAS_WHEELCHAIR_NOT_SET; } -inline void Costing_Options::clear_has_has_wheelchair() { +inline void CostingOptions::clear_has_has_wheelchair() { _impl_._oneof_case_[41] = HAS_WHEELCHAIR_NOT_SET; } -inline bool Costing_Options::has_has_bicycle() const { +inline bool CostingOptions::has_has_bicycle() const { return has_bicycle_case() != HAS_BICYCLE_NOT_SET; } -inline void Costing_Options::clear_has_has_bicycle() { +inline void CostingOptions::clear_has_has_bicycle() { _impl_._oneof_case_[42] = HAS_BICYCLE_NOT_SET; } -inline bool Costing_Options::has_has_use_bus() const { +inline bool CostingOptions::has_has_use_bus() const { return has_use_bus_case() != HAS_USE_BUS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_bus() { +inline void CostingOptions::clear_has_has_use_bus() { _impl_._oneof_case_[43] = HAS_USE_BUS_NOT_SET; } -inline bool Costing_Options::has_has_use_rail() const { +inline bool CostingOptions::has_has_use_rail() const { return has_use_rail_case() != HAS_USE_RAIL_NOT_SET; } -inline void Costing_Options::clear_has_has_use_rail() { +inline void CostingOptions::clear_has_has_use_rail() { _impl_._oneof_case_[44] = HAS_USE_RAIL_NOT_SET; } -inline bool Costing_Options::has_has_use_transfers() const { +inline bool CostingOptions::has_has_use_transfers() const { return has_use_transfers_case() != HAS_USE_TRANSFERS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_transfers() { +inline void CostingOptions::clear_has_has_use_transfers() { _impl_._oneof_case_[45] = HAS_USE_TRANSFERS_NOT_SET; } -inline bool Costing_Options::has_has_transfer_cost() const { +inline bool CostingOptions::has_has_transfer_cost() const { return has_transfer_cost_case() != HAS_TRANSFER_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_transfer_cost() { +inline void CostingOptions::clear_has_has_transfer_cost() { _impl_._oneof_case_[46] = HAS_TRANSFER_COST_NOT_SET; } -inline bool Costing_Options::has_has_transfer_penalty() const { +inline bool CostingOptions::has_has_transfer_penalty() const { return has_transfer_penalty_case() != HAS_TRANSFER_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_transfer_penalty() { +inline void CostingOptions::clear_has_has_transfer_penalty() { _impl_._oneof_case_[47] = HAS_TRANSFER_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_flow_mask() const { +inline bool CostingOptions::has_has_flow_mask() const { return has_flow_mask_case() != HAS_FLOW_MASK_NOT_SET; } -inline void Costing_Options::clear_has_has_flow_mask() { +inline void CostingOptions::clear_has_has_flow_mask() { _impl_._oneof_case_[48] = HAS_FLOW_MASK_NOT_SET; } -inline bool Costing_Options::has_has_bike_share_cost() const { +inline bool CostingOptions::has_has_bike_share_cost() const { return has_bike_share_cost_case() != HAS_BIKE_SHARE_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_bike_share_cost() { +inline void CostingOptions::clear_has_has_bike_share_cost() { _impl_._oneof_case_[49] = HAS_BIKE_SHARE_COST_NOT_SET; } -inline bool Costing_Options::has_has_bike_share_penalty() const { +inline bool CostingOptions::has_has_bike_share_penalty() const { return has_bike_share_penalty_case() != HAS_BIKE_SHARE_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_bike_share_penalty() { +inline void CostingOptions::clear_has_has_bike_share_penalty() { _impl_._oneof_case_[50] = HAS_BIKE_SHARE_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_rail_ferry_cost() const { +inline bool CostingOptions::has_has_rail_ferry_cost() const { return has_rail_ferry_cost_case() != HAS_RAIL_FERRY_COST_NOT_SET; } -inline void Costing_Options::clear_has_has_rail_ferry_cost() { +inline void CostingOptions::clear_has_has_rail_ferry_cost() { _impl_._oneof_case_[51] = HAS_RAIL_FERRY_COST_NOT_SET; } -inline bool Costing_Options::has_has_use_rail_ferry() const { +inline bool CostingOptions::has_has_use_rail_ferry() const { return has_use_rail_ferry_case() != HAS_USE_RAIL_FERRY_NOT_SET; } -inline void Costing_Options::clear_has_has_use_rail_ferry() { +inline void CostingOptions::clear_has_has_use_rail_ferry() { _impl_._oneof_case_[52] = HAS_USE_RAIL_FERRY_NOT_SET; } -inline bool Costing_Options::has_has_ignore_restrictions() const { +inline bool CostingOptions::has_has_ignore_restrictions() const { return has_ignore_restrictions_case() != HAS_IGNORE_RESTRICTIONS_NOT_SET; } -inline void Costing_Options::clear_has_has_ignore_restrictions() { +inline void CostingOptions::clear_has_has_ignore_restrictions() { _impl_._oneof_case_[53] = HAS_IGNORE_RESTRICTIONS_NOT_SET; } -inline bool Costing_Options::has_has_ignore_oneways() const { +inline bool CostingOptions::has_has_ignore_oneways() const { return has_ignore_oneways_case() != HAS_IGNORE_ONEWAYS_NOT_SET; } -inline void Costing_Options::clear_has_has_ignore_oneways() { +inline void CostingOptions::clear_has_has_ignore_oneways() { _impl_._oneof_case_[54] = HAS_IGNORE_ONEWAYS_NOT_SET; } -inline bool Costing_Options::has_has_ignore_access() const { +inline bool CostingOptions::has_has_ignore_access() const { return has_ignore_access_case() != HAS_IGNORE_ACCESS_NOT_SET; } -inline void Costing_Options::clear_has_has_ignore_access() { +inline void CostingOptions::clear_has_has_ignore_access() { _impl_._oneof_case_[55] = HAS_IGNORE_ACCESS_NOT_SET; } -inline bool Costing_Options::has_has_ignore_closures() const { +inline bool CostingOptions::has_has_ignore_closures() const { return has_ignore_closures_case() != HAS_IGNORE_CLOSURES_NOT_SET; } -inline void Costing_Options::clear_has_has_ignore_closures() { +inline void CostingOptions::clear_has_has_ignore_closures() { _impl_._oneof_case_[56] = HAS_IGNORE_CLOSURES_NOT_SET; } -inline bool Costing_Options::has_has_shortest() const { +inline bool CostingOptions::has_has_shortest() const { return has_shortest_case() != HAS_SHORTEST_NOT_SET; } -inline void Costing_Options::clear_has_has_shortest() { +inline void CostingOptions::clear_has_has_shortest() { _impl_._oneof_case_[57] = HAS_SHORTEST_NOT_SET; } -inline bool Costing_Options::has_has_service_penalty() const { +inline bool CostingOptions::has_has_service_penalty() const { return has_service_penalty_case() != HAS_SERVICE_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_service_penalty() { +inline void CostingOptions::clear_has_has_service_penalty() { _impl_._oneof_case_[58] = HAS_SERVICE_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_use_tracks() const { +inline bool CostingOptions::has_has_use_tracks() const { return has_use_tracks_case() != HAS_USE_TRACKS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_tracks() { +inline void CostingOptions::clear_has_has_use_tracks() { _impl_._oneof_case_[59] = HAS_USE_TRACKS_NOT_SET; } -inline bool Costing_Options::has_has_use_distance() const { +inline bool CostingOptions::has_has_use_distance() const { return has_use_distance_case() != HAS_USE_DISTANCE_NOT_SET; } -inline void Costing_Options::clear_has_has_use_distance() { +inline void CostingOptions::clear_has_has_use_distance() { _impl_._oneof_case_[60] = HAS_USE_DISTANCE_NOT_SET; } -inline bool Costing_Options::has_has_use_living_streets() const { +inline bool CostingOptions::has_has_use_living_streets() const { return has_use_living_streets_case() != HAS_USE_LIVING_STREETS_NOT_SET; } -inline void Costing_Options::clear_has_has_use_living_streets() { +inline void CostingOptions::clear_has_has_use_living_streets() { _impl_._oneof_case_[61] = HAS_USE_LIVING_STREETS_NOT_SET; } -inline bool Costing_Options::has_has_service_factor() const { +inline bool CostingOptions::has_has_service_factor() const { return has_service_factor_case() != HAS_SERVICE_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_service_factor() { +inline void CostingOptions::clear_has_has_service_factor() { _impl_._oneof_case_[62] = HAS_SERVICE_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_closure_factor() const { +inline bool CostingOptions::has_has_closure_factor() const { return has_closure_factor_case() != HAS_CLOSURE_FACTOR_NOT_SET; } -inline void Costing_Options::clear_has_has_closure_factor() { +inline void CostingOptions::clear_has_has_closure_factor() { _impl_._oneof_case_[63] = HAS_CLOSURE_FACTOR_NOT_SET; } -inline bool Costing_Options::has_has_private_access_penalty() const { +inline bool CostingOptions::has_has_private_access_penalty() const { return has_private_access_penalty_case() != HAS_PRIVATE_ACCESS_PENALTY_NOT_SET; } -inline void Costing_Options::clear_has_has_private_access_penalty() { +inline void CostingOptions::clear_has_has_private_access_penalty() { _impl_._oneof_case_[64] = HAS_PRIVATE_ACCESS_PENALTY_NOT_SET; } -inline bool Costing_Options::has_has_exclude_unpaved() const { +inline bool CostingOptions::has_has_exclude_unpaved() const { return has_exclude_unpaved_case() != HAS_EXCLUDE_UNPAVED_NOT_SET; } -inline void Costing_Options::clear_has_has_exclude_unpaved() { +inline void CostingOptions::clear_has_has_exclude_unpaved() { _impl_._oneof_case_[65] = HAS_EXCLUDE_UNPAVED_NOT_SET; } -inline bool Costing_Options::has_has_include_hot() const { +inline bool CostingOptions::has_has_include_hot() const { return has_include_hot_case() != HAS_INCLUDE_HOT_NOT_SET; } -inline void Costing_Options::clear_has_has_include_hot() { +inline void CostingOptions::clear_has_has_include_hot() { _impl_._oneof_case_[66] = HAS_INCLUDE_HOT_NOT_SET; } -inline bool Costing_Options::has_has_include_hov2() const { +inline bool CostingOptions::has_has_include_hov2() const { return has_include_hov2_case() != HAS_INCLUDE_HOV2_NOT_SET; } -inline void Costing_Options::clear_has_has_include_hov2() { +inline void CostingOptions::clear_has_has_include_hov2() { _impl_._oneof_case_[67] = HAS_INCLUDE_HOV2_NOT_SET; } -inline bool Costing_Options::has_has_include_hov3() const { +inline bool CostingOptions::has_has_include_hov3() const { return has_include_hov3_case() != HAS_INCLUDE_HOV3_NOT_SET; } -inline void Costing_Options::clear_has_has_include_hov3() { +inline void CostingOptions::clear_has_has_include_hov3() { _impl_._oneof_case_[68] = HAS_INCLUDE_HOV3_NOT_SET; } -inline bool Costing_Options::has_has_exclude_cash_only_tolls() const { +inline bool CostingOptions::has_has_exclude_cash_only_tolls() const { return has_exclude_cash_only_tolls_case() != HAS_EXCLUDE_CASH_ONLY_TOLLS_NOT_SET; } -inline void Costing_Options::clear_has_has_exclude_cash_only_tolls() { +inline void CostingOptions::clear_has_has_exclude_cash_only_tolls() { _impl_._oneof_case_[69] = HAS_EXCLUDE_CASH_ONLY_TOLLS_NOT_SET; } -inline bool Costing_Options::has_has_restriction_probability() const { +inline bool CostingOptions::has_has_restriction_probability() const { return has_restriction_probability_case() != HAS_RESTRICTION_PROBABILITY_NOT_SET; } -inline void Costing_Options::clear_has_has_restriction_probability() { +inline void CostingOptions::clear_has_has_restriction_probability() { _impl_._oneof_case_[70] = HAS_RESTRICTION_PROBABILITY_NOT_SET; } -inline bool Costing_Options::has_has_elevator_penalty() const { - return has_elevator_penalty_case() != HAS_ELEVATOR_PENALTY_NOT_SET; -} -inline void Costing_Options::clear_has_has_elevator_penalty() { - _impl_._oneof_case_[71] = HAS_ELEVATOR_PENALTY_NOT_SET; -} -inline Costing_Options::HasManeuverPenaltyCase Costing_Options::has_maneuver_penalty_case() const { - return Costing_Options::HasManeuverPenaltyCase(_impl_._oneof_case_[0]); -} -inline Costing_Options::HasDestinationOnlyPenaltyCase Costing_Options::has_destination_only_penalty_case() const { - return Costing_Options::HasDestinationOnlyPenaltyCase(_impl_._oneof_case_[1]); -} -inline Costing_Options::HasGateCostCase Costing_Options::has_gate_cost_case() const { - return Costing_Options::HasGateCostCase(_impl_._oneof_case_[2]); -} -inline Costing_Options::HasGatePenaltyCase Costing_Options::has_gate_penalty_case() const { - return Costing_Options::HasGatePenaltyCase(_impl_._oneof_case_[3]); +inline bool CostingOptions::has_has_costing() const { + return has_costing_case() != HAS_COSTING_NOT_SET; } -inline Costing_Options::HasTollBoothCostCase Costing_Options::has_toll_booth_cost_case() const { - return Costing_Options::HasTollBoothCostCase(_impl_._oneof_case_[4]); +inline void CostingOptions::clear_has_has_costing() { + _impl_._oneof_case_[71] = HAS_COSTING_NOT_SET; } -inline Costing_Options::HasTollBoothPenaltyCase Costing_Options::has_toll_booth_penalty_case() const { - return Costing_Options::HasTollBoothPenaltyCase(_impl_._oneof_case_[5]); +inline bool CostingOptions::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; } -inline Costing_Options::HasAlleyPenaltyCase Costing_Options::has_alley_penalty_case() const { - return Costing_Options::HasAlleyPenaltyCase(_impl_._oneof_case_[6]); +inline void CostingOptions::clear_has_has_name() { + _impl_._oneof_case_[72] = HAS_NAME_NOT_SET; } -inline Costing_Options::HasCountryCrossingCostCase Costing_Options::has_country_crossing_cost_case() const { - return Costing_Options::HasCountryCrossingCostCase(_impl_._oneof_case_[7]); +inline bool CostingOptions::has_has_filter_closures() const { + return has_filter_closures_case() != HAS_FILTER_CLOSURES_NOT_SET; } -inline Costing_Options::HasCountryCrossingPenaltyCase Costing_Options::has_country_crossing_penalty_case() const { - return Costing_Options::HasCountryCrossingPenaltyCase(_impl_._oneof_case_[8]); +inline void CostingOptions::clear_has_has_filter_closures() { + _impl_._oneof_case_[73] = HAS_FILTER_CLOSURES_NOT_SET; } -inline Costing_Options::HasFerryCostCase Costing_Options::has_ferry_cost_case() const { - return Costing_Options::HasFerryCostCase(_impl_._oneof_case_[9]); +inline CostingOptions::HasManeuverPenaltyCase CostingOptions::has_maneuver_penalty_case() const { + return CostingOptions::HasManeuverPenaltyCase(_impl_._oneof_case_[0]); } -inline Costing_Options::HasAvoidBadSurfacesCase Costing_Options::has_avoid_bad_surfaces_case() const { - return Costing_Options::HasAvoidBadSurfacesCase(_impl_._oneof_case_[10]); +inline CostingOptions::HasDestinationOnlyPenaltyCase CostingOptions::has_destination_only_penalty_case() const { + return CostingOptions::HasDestinationOnlyPenaltyCase(_impl_._oneof_case_[1]); } -inline Costing_Options::HasUseFerryCase Costing_Options::has_use_ferry_case() const { - return Costing_Options::HasUseFerryCase(_impl_._oneof_case_[11]); +inline CostingOptions::HasGateCostCase CostingOptions::has_gate_cost_case() const { + return CostingOptions::HasGateCostCase(_impl_._oneof_case_[2]); } -inline Costing_Options::HasUseHighwaysCase Costing_Options::has_use_highways_case() const { - return Costing_Options::HasUseHighwaysCase(_impl_._oneof_case_[12]); +inline CostingOptions::HasGatePenaltyCase CostingOptions::has_gate_penalty_case() const { + return CostingOptions::HasGatePenaltyCase(_impl_._oneof_case_[3]); } -inline Costing_Options::HasUseTollsCase Costing_Options::has_use_tolls_case() const { - return Costing_Options::HasUseTollsCase(_impl_._oneof_case_[13]); +inline CostingOptions::HasTollBoothCostCase CostingOptions::has_toll_booth_cost_case() const { + return CostingOptions::HasTollBoothCostCase(_impl_._oneof_case_[4]); } -inline Costing_Options::HasUseRoadsCase Costing_Options::has_use_roads_case() const { - return Costing_Options::HasUseRoadsCase(_impl_._oneof_case_[14]); +inline CostingOptions::HasTollBoothPenaltyCase CostingOptions::has_toll_booth_penalty_case() const { + return CostingOptions::HasTollBoothPenaltyCase(_impl_._oneof_case_[5]); } -inline Costing_Options::HasMaxDistanceCase Costing_Options::has_max_distance_case() const { - return Costing_Options::HasMaxDistanceCase(_impl_._oneof_case_[15]); +inline CostingOptions::HasAlleyPenaltyCase CostingOptions::has_alley_penalty_case() const { + return CostingOptions::HasAlleyPenaltyCase(_impl_._oneof_case_[6]); } -inline Costing_Options::HasWalkingSpeedCase Costing_Options::has_walking_speed_case() const { - return Costing_Options::HasWalkingSpeedCase(_impl_._oneof_case_[16]); +inline CostingOptions::HasCountryCrossingCostCase CostingOptions::has_country_crossing_cost_case() const { + return CostingOptions::HasCountryCrossingCostCase(_impl_._oneof_case_[7]); } -inline Costing_Options::HasStepPenaltyCase Costing_Options::has_step_penalty_case() const { - return Costing_Options::HasStepPenaltyCase(_impl_._oneof_case_[17]); +inline CostingOptions::HasCountryCrossingPenaltyCase CostingOptions::has_country_crossing_penalty_case() const { + return CostingOptions::HasCountryCrossingPenaltyCase(_impl_._oneof_case_[8]); } -inline Costing_Options::HasMaxGradeCase Costing_Options::has_max_grade_case() const { - return Costing_Options::HasMaxGradeCase(_impl_._oneof_case_[18]); +inline CostingOptions::HasFerryCostCase CostingOptions::has_ferry_cost_case() const { + return CostingOptions::HasFerryCostCase(_impl_._oneof_case_[9]); } -inline Costing_Options::HasMaxHikingDifficultyCase Costing_Options::has_max_hiking_difficulty_case() const { - return Costing_Options::HasMaxHikingDifficultyCase(_impl_._oneof_case_[19]); +inline CostingOptions::HasAvoidBadSurfacesCase CostingOptions::has_avoid_bad_surfaces_case() const { + return CostingOptions::HasAvoidBadSurfacesCase(_impl_._oneof_case_[10]); } -inline Costing_Options::HasModeFactorCase Costing_Options::has_mode_factor_case() const { - return Costing_Options::HasModeFactorCase(_impl_._oneof_case_[20]); +inline CostingOptions::HasUseFerryCase CostingOptions::has_use_ferry_case() const { + return CostingOptions::HasUseFerryCase(_impl_._oneof_case_[11]); } -inline Costing_Options::HasWalkwayFactorCase Costing_Options::has_walkway_factor_case() const { - return Costing_Options::HasWalkwayFactorCase(_impl_._oneof_case_[21]); +inline CostingOptions::HasUseHighwaysCase CostingOptions::has_use_highways_case() const { + return CostingOptions::HasUseHighwaysCase(_impl_._oneof_case_[12]); } -inline Costing_Options::HasSidewalkFactorCase Costing_Options::has_sidewalk_factor_case() const { - return Costing_Options::HasSidewalkFactorCase(_impl_._oneof_case_[22]); +inline CostingOptions::HasUseTollsCase CostingOptions::has_use_tolls_case() const { + return CostingOptions::HasUseTollsCase(_impl_._oneof_case_[13]); } -inline Costing_Options::HasAlleyFactorCase Costing_Options::has_alley_factor_case() const { - return Costing_Options::HasAlleyFactorCase(_impl_._oneof_case_[23]); +inline CostingOptions::HasUseRoadsCase CostingOptions::has_use_roads_case() const { + return CostingOptions::HasUseRoadsCase(_impl_._oneof_case_[14]); } -inline Costing_Options::HasDrivewayFactorCase Costing_Options::has_driveway_factor_case() const { - return Costing_Options::HasDrivewayFactorCase(_impl_._oneof_case_[24]); +inline CostingOptions::HasMaxDistanceCase CostingOptions::has_max_distance_case() const { + return CostingOptions::HasMaxDistanceCase(_impl_._oneof_case_[15]); } -inline Costing_Options::HasDrivewayPenaltyCase Costing_Options::has_driveway_penalty_case() const { - return Costing_Options::HasDrivewayPenaltyCase(_impl_._oneof_case_[25]); +inline CostingOptions::HasWalkingSpeedCase CostingOptions::has_walking_speed_case() const { + return CostingOptions::HasWalkingSpeedCase(_impl_._oneof_case_[16]); } -inline Costing_Options::HasTransitStartEndMaxDistanceCase Costing_Options::has_transit_start_end_max_distance_case() const { - return Costing_Options::HasTransitStartEndMaxDistanceCase(_impl_._oneof_case_[26]); +inline CostingOptions::HasStepPenaltyCase CostingOptions::has_step_penalty_case() const { + return CostingOptions::HasStepPenaltyCase(_impl_._oneof_case_[17]); } -inline Costing_Options::HasTransitTransferMaxDistanceCase Costing_Options::has_transit_transfer_max_distance_case() const { - return Costing_Options::HasTransitTransferMaxDistanceCase(_impl_._oneof_case_[27]); +inline CostingOptions::HasMaxGradeCase CostingOptions::has_max_grade_case() const { + return CostingOptions::HasMaxGradeCase(_impl_._oneof_case_[18]); } -inline Costing_Options::HasTransportTypeCase Costing_Options::has_transport_type_case() const { - return Costing_Options::HasTransportTypeCase(_impl_._oneof_case_[28]); +inline CostingOptions::HasMaxHikingDifficultyCase CostingOptions::has_max_hiking_difficulty_case() const { + return CostingOptions::HasMaxHikingDifficultyCase(_impl_._oneof_case_[19]); } -inline Costing_Options::HasTopSpeedCase Costing_Options::has_top_speed_case() const { - return Costing_Options::HasTopSpeedCase(_impl_._oneof_case_[29]); +inline CostingOptions::HasModeFactorCase CostingOptions::has_mode_factor_case() const { + return CostingOptions::HasModeFactorCase(_impl_._oneof_case_[20]); } -inline Costing_Options::HasUseHillsCase Costing_Options::has_use_hills_case() const { - return Costing_Options::HasUseHillsCase(_impl_._oneof_case_[30]); +inline CostingOptions::HasWalkwayFactorCase CostingOptions::has_walkway_factor_case() const { + return CostingOptions::HasWalkwayFactorCase(_impl_._oneof_case_[21]); } -inline Costing_Options::HasUsePrimaryCase Costing_Options::has_use_primary_case() const { - return Costing_Options::HasUsePrimaryCase(_impl_._oneof_case_[31]); +inline CostingOptions::HasSidewalkFactorCase CostingOptions::has_sidewalk_factor_case() const { + return CostingOptions::HasSidewalkFactorCase(_impl_._oneof_case_[22]); } -inline Costing_Options::HasUseTrailsCase Costing_Options::has_use_trails_case() const { - return Costing_Options::HasUseTrailsCase(_impl_._oneof_case_[32]); +inline CostingOptions::HasAlleyFactorCase CostingOptions::has_alley_factor_case() const { + return CostingOptions::HasAlleyFactorCase(_impl_._oneof_case_[23]); } -inline Costing_Options::HasLowClassPenaltyCase Costing_Options::has_low_class_penalty_case() const { - return Costing_Options::HasLowClassPenaltyCase(_impl_._oneof_case_[33]); +inline CostingOptions::HasDrivewayFactorCase CostingOptions::has_driveway_factor_case() const { + return CostingOptions::HasDrivewayFactorCase(_impl_._oneof_case_[24]); } -inline Costing_Options::HasHazmatCase Costing_Options::has_hazmat_case() const { - return Costing_Options::HasHazmatCase(_impl_._oneof_case_[34]); +inline CostingOptions::HasDrivewayPenaltyCase CostingOptions::has_driveway_penalty_case() const { + return CostingOptions::HasDrivewayPenaltyCase(_impl_._oneof_case_[25]); } -inline Costing_Options::HasWeightCase Costing_Options::has_weight_case() const { - return Costing_Options::HasWeightCase(_impl_._oneof_case_[35]); +inline CostingOptions::HasTransitStartEndMaxDistanceCase CostingOptions::has_transit_start_end_max_distance_case() const { + return CostingOptions::HasTransitStartEndMaxDistanceCase(_impl_._oneof_case_[26]); } -inline Costing_Options::HasAxleLoadCase Costing_Options::has_axle_load_case() const { - return Costing_Options::HasAxleLoadCase(_impl_._oneof_case_[36]); +inline CostingOptions::HasTransitTransferMaxDistanceCase CostingOptions::has_transit_transfer_max_distance_case() const { + return CostingOptions::HasTransitTransferMaxDistanceCase(_impl_._oneof_case_[27]); } -inline Costing_Options::HasHeightCase Costing_Options::has_height_case() const { - return Costing_Options::HasHeightCase(_impl_._oneof_case_[37]); +inline CostingOptions::HasTransportTypeCase CostingOptions::has_transport_type_case() const { + return CostingOptions::HasTransportTypeCase(_impl_._oneof_case_[28]); } -inline Costing_Options::HasWidthCase Costing_Options::has_width_case() const { - return Costing_Options::HasWidthCase(_impl_._oneof_case_[38]); +inline CostingOptions::HasTopSpeedCase CostingOptions::has_top_speed_case() const { + return CostingOptions::HasTopSpeedCase(_impl_._oneof_case_[29]); } -inline Costing_Options::HasLengthCase Costing_Options::has_length_case() const { - return Costing_Options::HasLengthCase(_impl_._oneof_case_[39]); +inline CostingOptions::HasUseHillsCase CostingOptions::has_use_hills_case() const { + return CostingOptions::HasUseHillsCase(_impl_._oneof_case_[30]); } -inline Costing_Options::HasCyclingSpeedCase Costing_Options::has_cycling_speed_case() const { - return Costing_Options::HasCyclingSpeedCase(_impl_._oneof_case_[40]); +inline CostingOptions::HasUsePrimaryCase CostingOptions::has_use_primary_case() const { + return CostingOptions::HasUsePrimaryCase(_impl_._oneof_case_[31]); } -inline Costing_Options::HasWheelchairCase Costing_Options::has_wheelchair_case() const { - return Costing_Options::HasWheelchairCase(_impl_._oneof_case_[41]); +inline CostingOptions::HasUseTrailsCase CostingOptions::has_use_trails_case() const { + return CostingOptions::HasUseTrailsCase(_impl_._oneof_case_[32]); } -inline Costing_Options::HasBicycleCase Costing_Options::has_bicycle_case() const { - return Costing_Options::HasBicycleCase(_impl_._oneof_case_[42]); +inline CostingOptions::HasLowClassPenaltyCase CostingOptions::has_low_class_penalty_case() const { + return CostingOptions::HasLowClassPenaltyCase(_impl_._oneof_case_[33]); } -inline Costing_Options::HasUseBusCase Costing_Options::has_use_bus_case() const { - return Costing_Options::HasUseBusCase(_impl_._oneof_case_[43]); +inline CostingOptions::HasHazmatCase CostingOptions::has_hazmat_case() const { + return CostingOptions::HasHazmatCase(_impl_._oneof_case_[34]); } -inline Costing_Options::HasUseRailCase Costing_Options::has_use_rail_case() const { - return Costing_Options::HasUseRailCase(_impl_._oneof_case_[44]); +inline CostingOptions::HasWeightCase CostingOptions::has_weight_case() const { + return CostingOptions::HasWeightCase(_impl_._oneof_case_[35]); } -inline Costing_Options::HasUseTransfersCase Costing_Options::has_use_transfers_case() const { - return Costing_Options::HasUseTransfersCase(_impl_._oneof_case_[45]); +inline CostingOptions::HasAxleLoadCase CostingOptions::has_axle_load_case() const { + return CostingOptions::HasAxleLoadCase(_impl_._oneof_case_[36]); } -inline Costing_Options::HasTransferCostCase Costing_Options::has_transfer_cost_case() const { - return Costing_Options::HasTransferCostCase(_impl_._oneof_case_[46]); +inline CostingOptions::HasHeightCase CostingOptions::has_height_case() const { + return CostingOptions::HasHeightCase(_impl_._oneof_case_[37]); } -inline Costing_Options::HasTransferPenaltyCase Costing_Options::has_transfer_penalty_case() const { - return Costing_Options::HasTransferPenaltyCase(_impl_._oneof_case_[47]); +inline CostingOptions::HasWidthCase CostingOptions::has_width_case() const { + return CostingOptions::HasWidthCase(_impl_._oneof_case_[38]); } -inline Costing_Options::HasFlowMaskCase Costing_Options::has_flow_mask_case() const { - return Costing_Options::HasFlowMaskCase(_impl_._oneof_case_[48]); +inline CostingOptions::HasLengthCase CostingOptions::has_length_case() const { + return CostingOptions::HasLengthCase(_impl_._oneof_case_[39]); } -inline Costing_Options::HasBikeShareCostCase Costing_Options::has_bike_share_cost_case() const { - return Costing_Options::HasBikeShareCostCase(_impl_._oneof_case_[49]); +inline CostingOptions::HasCyclingSpeedCase CostingOptions::has_cycling_speed_case() const { + return CostingOptions::HasCyclingSpeedCase(_impl_._oneof_case_[40]); } -inline Costing_Options::HasBikeSharePenaltyCase Costing_Options::has_bike_share_penalty_case() const { - return Costing_Options::HasBikeSharePenaltyCase(_impl_._oneof_case_[50]); +inline CostingOptions::HasWheelchairCase CostingOptions::has_wheelchair_case() const { + return CostingOptions::HasWheelchairCase(_impl_._oneof_case_[41]); } -inline Costing_Options::HasRailFerryCostCase Costing_Options::has_rail_ferry_cost_case() const { - return Costing_Options::HasRailFerryCostCase(_impl_._oneof_case_[51]); +inline CostingOptions::HasBicycleCase CostingOptions::has_bicycle_case() const { + return CostingOptions::HasBicycleCase(_impl_._oneof_case_[42]); } -inline Costing_Options::HasUseRailFerryCase Costing_Options::has_use_rail_ferry_case() const { - return Costing_Options::HasUseRailFerryCase(_impl_._oneof_case_[52]); +inline CostingOptions::HasUseBusCase CostingOptions::has_use_bus_case() const { + return CostingOptions::HasUseBusCase(_impl_._oneof_case_[43]); } -inline Costing_Options::HasIgnoreRestrictionsCase Costing_Options::has_ignore_restrictions_case() const { - return Costing_Options::HasIgnoreRestrictionsCase(_impl_._oneof_case_[53]); +inline CostingOptions::HasUseRailCase CostingOptions::has_use_rail_case() const { + return CostingOptions::HasUseRailCase(_impl_._oneof_case_[44]); } -inline Costing_Options::HasIgnoreOnewaysCase Costing_Options::has_ignore_oneways_case() const { - return Costing_Options::HasIgnoreOnewaysCase(_impl_._oneof_case_[54]); +inline CostingOptions::HasUseTransfersCase CostingOptions::has_use_transfers_case() const { + return CostingOptions::HasUseTransfersCase(_impl_._oneof_case_[45]); } -inline Costing_Options::HasIgnoreAccessCase Costing_Options::has_ignore_access_case() const { - return Costing_Options::HasIgnoreAccessCase(_impl_._oneof_case_[55]); +inline CostingOptions::HasTransferCostCase CostingOptions::has_transfer_cost_case() const { + return CostingOptions::HasTransferCostCase(_impl_._oneof_case_[46]); } -inline Costing_Options::HasIgnoreClosuresCase Costing_Options::has_ignore_closures_case() const { - return Costing_Options::HasIgnoreClosuresCase(_impl_._oneof_case_[56]); +inline CostingOptions::HasTransferPenaltyCase CostingOptions::has_transfer_penalty_case() const { + return CostingOptions::HasTransferPenaltyCase(_impl_._oneof_case_[47]); } -inline Costing_Options::HasShortestCase Costing_Options::has_shortest_case() const { - return Costing_Options::HasShortestCase(_impl_._oneof_case_[57]); +inline CostingOptions::HasFlowMaskCase CostingOptions::has_flow_mask_case() const { + return CostingOptions::HasFlowMaskCase(_impl_._oneof_case_[48]); } -inline Costing_Options::HasServicePenaltyCase Costing_Options::has_service_penalty_case() const { - return Costing_Options::HasServicePenaltyCase(_impl_._oneof_case_[58]); +inline CostingOptions::HasBikeShareCostCase CostingOptions::has_bike_share_cost_case() const { + return CostingOptions::HasBikeShareCostCase(_impl_._oneof_case_[49]); } -inline Costing_Options::HasUseTracksCase Costing_Options::has_use_tracks_case() const { - return Costing_Options::HasUseTracksCase(_impl_._oneof_case_[59]); +inline CostingOptions::HasBikeSharePenaltyCase CostingOptions::has_bike_share_penalty_case() const { + return CostingOptions::HasBikeSharePenaltyCase(_impl_._oneof_case_[50]); } -inline Costing_Options::HasUseDistanceCase Costing_Options::has_use_distance_case() const { - return Costing_Options::HasUseDistanceCase(_impl_._oneof_case_[60]); +inline CostingOptions::HasRailFerryCostCase CostingOptions::has_rail_ferry_cost_case() const { + return CostingOptions::HasRailFerryCostCase(_impl_._oneof_case_[51]); } -inline Costing_Options::HasUseLivingStreetsCase Costing_Options::has_use_living_streets_case() const { - return Costing_Options::HasUseLivingStreetsCase(_impl_._oneof_case_[61]); +inline CostingOptions::HasUseRailFerryCase CostingOptions::has_use_rail_ferry_case() const { + return CostingOptions::HasUseRailFerryCase(_impl_._oneof_case_[52]); } -inline Costing_Options::HasServiceFactorCase Costing_Options::has_service_factor_case() const { - return Costing_Options::HasServiceFactorCase(_impl_._oneof_case_[62]); +inline CostingOptions::HasIgnoreRestrictionsCase CostingOptions::has_ignore_restrictions_case() const { + return CostingOptions::HasIgnoreRestrictionsCase(_impl_._oneof_case_[53]); } -inline Costing_Options::HasClosureFactorCase Costing_Options::has_closure_factor_case() const { - return Costing_Options::HasClosureFactorCase(_impl_._oneof_case_[63]); +inline CostingOptions::HasIgnoreOnewaysCase CostingOptions::has_ignore_oneways_case() const { + return CostingOptions::HasIgnoreOnewaysCase(_impl_._oneof_case_[54]); } -inline Costing_Options::HasPrivateAccessPenaltyCase Costing_Options::has_private_access_penalty_case() const { - return Costing_Options::HasPrivateAccessPenaltyCase(_impl_._oneof_case_[64]); +inline CostingOptions::HasIgnoreAccessCase CostingOptions::has_ignore_access_case() const { + return CostingOptions::HasIgnoreAccessCase(_impl_._oneof_case_[55]); } -inline Costing_Options::HasExcludeUnpavedCase Costing_Options::has_exclude_unpaved_case() const { - return Costing_Options::HasExcludeUnpavedCase(_impl_._oneof_case_[65]); +inline CostingOptions::HasIgnoreClosuresCase CostingOptions::has_ignore_closures_case() const { + return CostingOptions::HasIgnoreClosuresCase(_impl_._oneof_case_[56]); } -inline Costing_Options::HasIncludeHotCase Costing_Options::has_include_hot_case() const { - return Costing_Options::HasIncludeHotCase(_impl_._oneof_case_[66]); +inline CostingOptions::HasShortestCase CostingOptions::has_shortest_case() const { + return CostingOptions::HasShortestCase(_impl_._oneof_case_[57]); } -inline Costing_Options::HasIncludeHov2Case Costing_Options::has_include_hov2_case() const { - return Costing_Options::HasIncludeHov2Case(_impl_._oneof_case_[67]); +inline CostingOptions::HasServicePenaltyCase CostingOptions::has_service_penalty_case() const { + return CostingOptions::HasServicePenaltyCase(_impl_._oneof_case_[58]); } -inline Costing_Options::HasIncludeHov3Case Costing_Options::has_include_hov3_case() const { - return Costing_Options::HasIncludeHov3Case(_impl_._oneof_case_[68]); +inline CostingOptions::HasUseTracksCase CostingOptions::has_use_tracks_case() const { + return CostingOptions::HasUseTracksCase(_impl_._oneof_case_[59]); } -inline Costing_Options::HasExcludeCashOnlyTollsCase Costing_Options::has_exclude_cash_only_tolls_case() const { - return Costing_Options::HasExcludeCashOnlyTollsCase(_impl_._oneof_case_[69]); +inline CostingOptions::HasUseDistanceCase CostingOptions::has_use_distance_case() const { + return CostingOptions::HasUseDistanceCase(_impl_._oneof_case_[60]); } -inline Costing_Options::HasRestrictionProbabilityCase Costing_Options::has_restriction_probability_case() const { - return Costing_Options::HasRestrictionProbabilityCase(_impl_._oneof_case_[70]); +inline CostingOptions::HasUseLivingStreetsCase CostingOptions::has_use_living_streets_case() const { + return CostingOptions::HasUseLivingStreetsCase(_impl_._oneof_case_[61]); } -inline Costing_Options::HasElevatorPenaltyCase Costing_Options::has_elevator_penalty_case() const { - return Costing_Options::HasElevatorPenaltyCase(_impl_._oneof_case_[71]); +inline CostingOptions::HasServiceFactorCase CostingOptions::has_service_factor_case() const { + return CostingOptions::HasServiceFactorCase(_impl_._oneof_case_[62]); } -// ------------------------------------------------------------------- - -// Costing - -// .valhalla.Costing.Options options = 1; -inline bool Costing::_internal_has_options() const { - return has_options_case() == kOptions; +inline CostingOptions::HasClosureFactorCase CostingOptions::has_closure_factor_case() const { + return CostingOptions::HasClosureFactorCase(_impl_._oneof_case_[63]); } -inline bool Costing::has_options() const { - return _internal_has_options(); +inline CostingOptions::HasPrivateAccessPenaltyCase CostingOptions::has_private_access_penalty_case() const { + return CostingOptions::HasPrivateAccessPenaltyCase(_impl_._oneof_case_[64]); } -inline void Costing::set_has_options() { - _impl_._oneof_case_[0] = kOptions; +inline CostingOptions::HasExcludeUnpavedCase CostingOptions::has_exclude_unpaved_case() const { + return CostingOptions::HasExcludeUnpavedCase(_impl_._oneof_case_[65]); } -inline void Costing::clear_options() { - if (_internal_has_options()) { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.has_options_.options_; - } - clear_has_has_options(); - } +inline CostingOptions::HasIncludeHotCase CostingOptions::has_include_hot_case() const { + return CostingOptions::HasIncludeHotCase(_impl_._oneof_case_[66]); } -inline ::valhalla::Costing_Options* Costing::release_options() { - // @@protoc_insertion_point(field_release:valhalla.Costing.options) - if (_internal_has_options()) { - clear_has_has_options(); - ::valhalla::Costing_Options* temp = _impl_.has_options_.options_; - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - _impl_.has_options_.options_ = nullptr; - return temp; - } else { - return nullptr; - } +inline CostingOptions::HasIncludeHov2Case CostingOptions::has_include_hov2_case() const { + return CostingOptions::HasIncludeHov2Case(_impl_._oneof_case_[67]); } -inline const ::valhalla::Costing_Options& Costing::_internal_options() const { - return _internal_has_options() - ? *_impl_.has_options_.options_ - : reinterpret_cast< ::valhalla::Costing_Options&>(::valhalla::_Costing_Options_default_instance_); +inline CostingOptions::HasIncludeHov3Case CostingOptions::has_include_hov3_case() const { + return CostingOptions::HasIncludeHov3Case(_impl_._oneof_case_[68]); } -inline const ::valhalla::Costing_Options& Costing::options() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.options) - return _internal_options(); +inline CostingOptions::HasExcludeCashOnlyTollsCase CostingOptions::has_exclude_cash_only_tolls_case() const { + return CostingOptions::HasExcludeCashOnlyTollsCase(_impl_._oneof_case_[69]); } -inline ::valhalla::Costing_Options* Costing::unsafe_arena_release_options() { - // @@protoc_insertion_point(field_unsafe_arena_release:valhalla.Costing.options) - if (_internal_has_options()) { - clear_has_has_options(); - ::valhalla::Costing_Options* temp = _impl_.has_options_.options_; - _impl_.has_options_.options_ = nullptr; - return temp; - } else { - return nullptr; - } +inline CostingOptions::HasRestrictionProbabilityCase CostingOptions::has_restriction_probability_case() const { + return CostingOptions::HasRestrictionProbabilityCase(_impl_._oneof_case_[70]); } -inline void Costing::unsafe_arena_set_allocated_options(::valhalla::Costing_Options* options) { - clear_has_options(); - if (options) { - set_has_options(); - _impl_.has_options_.options_ = options; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Costing.options) +inline CostingOptions::HasCostingCase CostingOptions::has_costing_case() const { + return CostingOptions::HasCostingCase(_impl_._oneof_case_[71]); } -inline ::valhalla::Costing_Options* Costing::_internal_mutable_options() { - if (!_internal_has_options()) { - clear_has_options(); - set_has_options(); - _impl_.has_options_.options_ = CreateMaybeMessage< ::valhalla::Costing_Options >(GetArenaForAllocation()); - } - return _impl_.has_options_.options_; +inline CostingOptions::HasNameCase CostingOptions::has_name_case() const { + return CostingOptions::HasNameCase(_impl_._oneof_case_[72]); } -inline ::valhalla::Costing_Options* Costing::mutable_options() { - ::valhalla::Costing_Options* _msg = _internal_mutable_options(); - // @@protoc_insertion_point(field_mutable:valhalla.Costing.options) - return _msg; +inline CostingOptions::HasFilterClosuresCase CostingOptions::has_filter_closures_case() const { + return CostingOptions::HasFilterClosuresCase(_impl_._oneof_case_[73]); } +// ------------------------------------------------------------------- -// .valhalla.Costing.Type type = 2; -inline void Costing::clear_type() { - _impl_.type_ = 0; -} -inline ::valhalla::Costing_Type Costing::_internal_type() const { - return static_cast< ::valhalla::Costing_Type >(_impl_.type_); -} -inline ::valhalla::Costing_Type Costing::type() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.type) - return _internal_type(); -} -inline void Costing::_internal_set_type(::valhalla::Costing_Type value) { - - _impl_.type_ = value; -} -inline void Costing::set_type(::valhalla::Costing_Type value) { - _internal_set_type(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.type) -} +// Options_Ring -// string name = 3; -inline bool Costing::_internal_has_name() const { - return has_name_case() == kName; -} -inline bool Costing::has_name() const { - return _internal_has_name(); -} -inline void Costing::set_has_name() { - _impl_._oneof_case_[1] = kName; -} -inline void Costing::clear_name() { - if (_internal_has_name()) { - _impl_.has_name_.name_.Destroy(); - clear_has_has_name(); - } -} -inline const std::string& Costing::name() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.name) - return _internal_name(); -} -template -inline void Costing::set_name(ArgT0&& arg0, ArgT... args) { - if (!_internal_has_name()) { - clear_has_name(); - set_has_name(); - _impl_.has_name_.name_.InitDefault(); - } - _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:valhalla.Costing.name) -} -inline std::string* Costing::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:valhalla.Costing.name) - return _s; -} -inline const std::string& Costing::_internal_name() const { - if (_internal_has_name()) { - return _impl_.has_name_.name_.Get(); - } - return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); -} -inline void Costing::_internal_set_name(const std::string& value) { - if (!_internal_has_name()) { - clear_has_name(); - set_has_name(); - _impl_.has_name_.name_.InitDefault(); - } - _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); -} -inline std::string* Costing::_internal_mutable_name() { - if (!_internal_has_name()) { - clear_has_name(); - set_has_name(); - _impl_.has_name_.name_.InitDefault(); - } - return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); -} -inline std::string* Costing::release_name() { - // @@protoc_insertion_point(field_release:valhalla.Costing.name) - if (_internal_has_name()) { - clear_has_has_name(); - return _impl_.has_name_.name_.Release(); - } else { - return nullptr; - } -} -inline void Costing::set_allocated_name(std::string* name) { - if (has_has_name()) { - clear_has_name(); - } - if (name != nullptr) { - set_has_name(); - _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); - } - // @@protoc_insertion_point(field_set_allocated:valhalla.Costing.name) +// repeated .valhalla.LatLng coords = 1; +inline int Options_Ring::_internal_coords_size() const { + return _impl_.coords_.size(); } - -// bool filter_closures = 4; -inline bool Costing::_internal_has_filter_closures() const { - return has_filter_closures_case() == kFilterClosures; +inline int Options_Ring::coords_size() const { + return _internal_coords_size(); } -inline bool Costing::has_filter_closures() const { - return _internal_has_filter_closures(); +inline ::valhalla::LatLng* Options_Ring::mutable_coords(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.Options.Ring.coords) + return _impl_.coords_.Mutable(index); } -inline void Costing::set_has_filter_closures() { - _impl_._oneof_case_[2] = kFilterClosures; +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >* +Options_Ring::mutable_coords() { + // @@protoc_insertion_point(field_mutable_list:valhalla.Options.Ring.coords) + return &_impl_.coords_; } -inline void Costing::clear_filter_closures() { - if (_internal_has_filter_closures()) { - _impl_.has_filter_closures_.filter_closures_ = false; - clear_has_has_filter_closures(); - } +inline const ::valhalla::LatLng& Options_Ring::_internal_coords(int index) const { + return _impl_.coords_.Get(index); } -inline bool Costing::_internal_filter_closures() const { - if (_internal_has_filter_closures()) { - return _impl_.has_filter_closures_.filter_closures_; - } - return false; +inline const ::valhalla::LatLng& Options_Ring::coords(int index) const { + // @@protoc_insertion_point(field_get:valhalla.Options.Ring.coords) + return _internal_coords(index); } -inline void Costing::_internal_set_filter_closures(bool value) { - if (!_internal_has_filter_closures()) { - clear_has_filter_closures(); - set_has_filter_closures(); - } - _impl_.has_filter_closures_.filter_closures_ = value; +inline ::valhalla::LatLng* Options_Ring::_internal_add_coords() { + return _impl_.coords_.Add(); } -inline bool Costing::filter_closures() const { - // @@protoc_insertion_point(field_get:valhalla.Costing.filter_closures) - return _internal_filter_closures(); +inline ::valhalla::LatLng* Options_Ring::add_coords() { + ::valhalla::LatLng* _add = _internal_add_coords(); + // @@protoc_insertion_point(field_add:valhalla.Options.Ring.coords) + return _add; } -inline void Costing::set_filter_closures(bool value) { - _internal_set_filter_closures(value); - // @@protoc_insertion_point(field_set:valhalla.Costing.filter_closures) +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::LatLng >& +Options_Ring::coords() const { + // @@protoc_insertion_point(field_list:valhalla.Options.Ring.coords) + return _impl_.coords_; } -inline bool Costing::has_has_options() const { - return has_options_case() != HAS_OPTIONS_NOT_SET; -} -inline void Costing::clear_has_has_options() { - _impl_._oneof_case_[0] = HAS_OPTIONS_NOT_SET; -} -inline bool Costing::has_has_name() const { - return has_name_case() != HAS_NAME_NOT_SET; -} -inline void Costing::clear_has_has_name() { - _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; -} -inline bool Costing::has_has_filter_closures() const { - return has_filter_closures_case() != HAS_FILTER_CLOSURES_NOT_SET; -} -inline void Costing::clear_has_has_filter_closures() { - _impl_._oneof_case_[2] = HAS_FILTER_CLOSURES_NOT_SET; -} -inline Costing::HasOptionsCase Costing::has_options_case() const { - return Costing::HasOptionsCase(_impl_._oneof_case_[0]); -} -inline Costing::HasNameCase Costing::has_name_case() const { - return Costing::HasNameCase(_impl_._oneof_case_[1]); -} -inline Costing::HasFilterClosuresCase Costing::has_filter_closures_case() const { - return Costing::HasFilterClosuresCase(_impl_._oneof_case_[2]); -} // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -9786,19 +9174,37 @@ inline Costing::HasFilterClosuresCase Costing::has_filter_closures_case() const // Options // .valhalla.Options.Units units = 1; +inline bool Options::_internal_has_units() const { + return has_units_case() == kUnits; +} +inline bool Options::has_units() const { + return _internal_has_units(); +} +inline void Options::set_has_units() { + _impl_._oneof_case_[0] = kUnits; +} inline void Options::clear_units() { - _impl_.units_ = 0; + if (_internal_has_units()) { + _impl_.has_units_.units_ = 0; + clear_has_has_units(); + } } inline ::valhalla::Options_Units Options::_internal_units() const { - return static_cast< ::valhalla::Options_Units >(_impl_.units_); + if (_internal_has_units()) { + return static_cast< ::valhalla::Options_Units >(_impl_.has_units_.units_); + } + return static_cast< ::valhalla::Options_Units >(0); } inline ::valhalla::Options_Units Options::units() const { // @@protoc_insertion_point(field_get:valhalla.Options.units) return _internal_units(); } inline void Options::_internal_set_units(::valhalla::Options_Units value) { - - _impl_.units_ = value; + if (!_internal_has_units()) { + clear_has_units(); + set_has_units(); + } + _impl_.has_units_.units_ = value; } inline void Options::set_units(::valhalla::Options_Units value) { _internal_set_units(value); @@ -9813,7 +9219,7 @@ inline bool Options::has_language() const { return _internal_has_language(); } inline void Options::set_has_language() { - _impl_._oneof_case_[0] = kLanguage; + _impl_._oneof_case_[1] = kLanguage; } inline void Options::clear_language() { if (_internal_has_language()) { @@ -9883,19 +9289,37 @@ inline void Options::set_allocated_language(std::string* language) { } // .valhalla.DirectionsType directions_type = 3; +inline bool Options::_internal_has_directions_type() const { + return has_directions_type_case() == kDirectionsType; +} +inline bool Options::has_directions_type() const { + return _internal_has_directions_type(); +} +inline void Options::set_has_directions_type() { + _impl_._oneof_case_[2] = kDirectionsType; +} inline void Options::clear_directions_type() { - _impl_.directions_type_ = 0; + if (_internal_has_directions_type()) { + _impl_.has_directions_type_.directions_type_ = 0; + clear_has_has_directions_type(); + } } inline ::valhalla::DirectionsType Options::_internal_directions_type() const { - return static_cast< ::valhalla::DirectionsType >(_impl_.directions_type_); + if (_internal_has_directions_type()) { + return static_cast< ::valhalla::DirectionsType >(_impl_.has_directions_type_.directions_type_); + } + return static_cast< ::valhalla::DirectionsType >(0); } inline ::valhalla::DirectionsType Options::directions_type() const { // @@protoc_insertion_point(field_get:valhalla.Options.directions_type) return _internal_directions_type(); } inline void Options::_internal_set_directions_type(::valhalla::DirectionsType value) { - - _impl_.directions_type_ = value; + if (!_internal_has_directions_type()) { + clear_has_directions_type(); + set_has_directions_type(); + } + _impl_.has_directions_type_.directions_type_ = value; } inline void Options::set_directions_type(::valhalla::DirectionsType value) { _internal_set_directions_type(value); @@ -9903,19 +9327,37 @@ inline void Options::set_directions_type(::valhalla::DirectionsType value) { } // .valhalla.Options.Format format = 4; +inline bool Options::_internal_has_format() const { + return has_format_case() == kFormat; +} +inline bool Options::has_format() const { + return _internal_has_format(); +} +inline void Options::set_has_format() { + _impl_._oneof_case_[3] = kFormat; +} inline void Options::clear_format() { - _impl_.format_ = 0; + if (_internal_has_format()) { + _impl_.has_format_.format_ = 0; + clear_has_has_format(); + } } inline ::valhalla::Options_Format Options::_internal_format() const { - return static_cast< ::valhalla::Options_Format >(_impl_.format_); + if (_internal_has_format()) { + return static_cast< ::valhalla::Options_Format >(_impl_.has_format_.format_); + } + return static_cast< ::valhalla::Options_Format >(0); } inline ::valhalla::Options_Format Options::format() const { // @@protoc_insertion_point(field_get:valhalla.Options.format) return _internal_format(); } inline void Options::_internal_set_format(::valhalla::Options_Format value) { - - _impl_.format_ = value; + if (!_internal_has_format()) { + clear_has_format(); + set_has_format(); + } + _impl_.has_format_.format_ = value; } inline void Options::set_format(::valhalla::Options_Format value) { _internal_set_format(value); @@ -9930,7 +9372,7 @@ inline bool Options::has_id() const { return _internal_has_id(); } inline void Options::set_has_id() { - _impl_._oneof_case_[1] = kId; + _impl_._oneof_case_[4] = kId; } inline void Options::clear_id() { if (_internal_has_id()) { @@ -10007,7 +9449,7 @@ inline bool Options::has_jsonp() const { return _internal_has_jsonp(); } inline void Options::set_has_jsonp() { - _impl_._oneof_case_[2] = kJsonp; + _impl_._oneof_case_[5] = kJsonp; } inline void Options::clear_jsonp() { if (_internal_has_jsonp()) { @@ -10084,7 +9526,7 @@ inline bool Options::has_encoded_polyline() const { return _internal_has_encoded_polyline(); } inline void Options::set_has_encoded_polyline() { - _impl_._oneof_case_[3] = kEncodedPolyline; + _impl_._oneof_case_[6] = kEncodedPolyline; } inline void Options::clear_encoded_polyline() { if (_internal_has_encoded_polyline()) { @@ -10154,19 +9596,37 @@ inline void Options::set_allocated_encoded_polyline(std::string* encoded_polylin } // .valhalla.Options.Action action = 8; +inline bool Options::_internal_has_action() const { + return has_action_case() == kAction; +} +inline bool Options::has_action() const { + return _internal_has_action(); +} +inline void Options::set_has_action() { + _impl_._oneof_case_[7] = kAction; +} inline void Options::clear_action() { - _impl_.action_ = 0; + if (_internal_has_action()) { + _impl_.has_action_.action_ = 0; + clear_has_has_action(); + } } inline ::valhalla::Options_Action Options::_internal_action() const { - return static_cast< ::valhalla::Options_Action >(_impl_.action_); + if (_internal_has_action()) { + return static_cast< ::valhalla::Options_Action >(_impl_.has_action_.action_); + } + return static_cast< ::valhalla::Options_Action >(0); } inline ::valhalla::Options_Action Options::action() const { // @@protoc_insertion_point(field_get:valhalla.Options.action) return _internal_action(); } inline void Options::_internal_set_action(::valhalla::Options_Action value) { - - _impl_.action_ = value; + if (!_internal_has_action()) { + clear_has_action(); + set_has_action(); + } + _impl_.has_action_.action_ = value; } inline void Options::set_action(::valhalla::Options_Action value) { _internal_set_action(value); @@ -10181,7 +9641,7 @@ inline bool Options::has_range() const { return _internal_has_range(); } inline void Options::set_has_range() { - _impl_._oneof_case_[4] = kRange; + _impl_._oneof_case_[8] = kRange; } inline void Options::clear_range() { if (_internal_has_range()) { @@ -10219,7 +9679,7 @@ inline bool Options::has_verbose() const { return _internal_has_verbose(); } inline void Options::set_has_verbose() { - _impl_._oneof_case_[5] = kVerbose; + _impl_._oneof_case_[9] = kVerbose; } inline void Options::clear_verbose() { if (_internal_has_verbose()) { @@ -10249,53 +9709,71 @@ inline void Options::set_verbose(bool value) { // @@protoc_insertion_point(field_set:valhalla.Options.verbose) } -// .valhalla.Costing.Type costing_type = 12; -inline void Options::clear_costing_type() { - _impl_.costing_type_ = 0; +// .valhalla.Costing costing = 12; +inline bool Options::_internal_has_costing() const { + return has_costing_case() == kCosting; } -inline ::valhalla::Costing_Type Options::_internal_costing_type() const { - return static_cast< ::valhalla::Costing_Type >(_impl_.costing_type_); +inline bool Options::has_costing() const { + return _internal_has_costing(); } -inline ::valhalla::Costing_Type Options::costing_type() const { - // @@protoc_insertion_point(field_get:valhalla.Options.costing_type) - return _internal_costing_type(); +inline void Options::set_has_costing() { + _impl_._oneof_case_[10] = kCosting; } -inline void Options::_internal_set_costing_type(::valhalla::Costing_Type value) { - - _impl_.costing_type_ = value; +inline void Options::clear_costing() { + if (_internal_has_costing()) { + _impl_.has_costing_.costing_ = 0; + clear_has_has_costing(); + } } -inline void Options::set_costing_type(::valhalla::Costing_Type value) { - _internal_set_costing_type(value); - // @@protoc_insertion_point(field_set:valhalla.Options.costing_type) +inline ::valhalla::Costing Options::_internal_costing() const { + if (_internal_has_costing()) { + return static_cast< ::valhalla::Costing >(_impl_.has_costing_.costing_); + } + return static_cast< ::valhalla::Costing >(0); +} +inline ::valhalla::Costing Options::costing() const { + // @@protoc_insertion_point(field_get:valhalla.Options.costing) + return _internal_costing(); +} +inline void Options::_internal_set_costing(::valhalla::Costing value) { + if (!_internal_has_costing()) { + clear_has_costing(); + set_has_costing(); + } + _impl_.has_costing_.costing_ = value; +} +inline void Options::set_costing(::valhalla::Costing value) { + _internal_set_costing(value); + // @@protoc_insertion_point(field_set:valhalla.Options.costing) } -// map costings = 13; -inline int Options::_internal_costings_size() const { - return _impl_.costings_.size(); +// map costing_options = 13; +inline int Options::_internal_costing_options_size() const { + return _impl_.costing_options_.size(); } -inline int Options::costings_size() const { - return _internal_costings_size(); +inline int Options::costing_options_size() const { + return _internal_costing_options_size(); } -inline void Options::clear_costings() { - _impl_.costings_.Clear(); +inline void Options::clear_costing_options() { + _impl_.costing_options_.Clear(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >& -Options::_internal_costings() const { - return _impl_.costings_.GetMap(); +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >& +Options::_internal_costing_options() const { + return _impl_.costing_options_.GetMap(); } -inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >& -Options::costings() const { - // @@protoc_insertion_point(field_map:valhalla.Options.costings) - return _internal_costings(); +inline const ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >& +Options::costing_options() const { + // @@protoc_insertion_point(field_map:valhalla.Options.costing_options) + return _internal_costing_options(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >* -Options::_internal_mutable_costings() { - return _impl_.costings_.MutableMap(); +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >* +Options::_internal_mutable_costing_options() { + return _impl_.costing_options_.MutableMap(); } -inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::Costing >* -Options::mutable_costings() { - // @@protoc_insertion_point(field_mutable_map:valhalla.Options.costings) - return _internal_mutable_costings(); +inline ::PROTOBUF_NAMESPACE_ID::Map< int32_t, ::valhalla::CostingOptions >* +Options::mutable_costing_options() { + // @@protoc_insertion_point(field_mutable_map:valhalla.Options.costing_options) + return _internal_mutable_costing_options(); } // repeated .valhalla.Location locations = 14; @@ -10447,19 +9925,37 @@ Options::targets() const { } // .valhalla.Options.DateTimeType date_time_type = 18; +inline bool Options::_internal_has_date_time_type() const { + return has_date_time_type_case() == kDateTimeType; +} +inline bool Options::has_date_time_type() const { + return _internal_has_date_time_type(); +} +inline void Options::set_has_date_time_type() { + _impl_._oneof_case_[11] = kDateTimeType; +} inline void Options::clear_date_time_type() { - _impl_.date_time_type_ = 0; + if (_internal_has_date_time_type()) { + _impl_.has_date_time_type_.date_time_type_ = 0; + clear_has_has_date_time_type(); + } } inline ::valhalla::Options_DateTimeType Options::_internal_date_time_type() const { - return static_cast< ::valhalla::Options_DateTimeType >(_impl_.date_time_type_); + if (_internal_has_date_time_type()) { + return static_cast< ::valhalla::Options_DateTimeType >(_impl_.has_date_time_type_.date_time_type_); + } + return static_cast< ::valhalla::Options_DateTimeType >(0); } inline ::valhalla::Options_DateTimeType Options::date_time_type() const { // @@protoc_insertion_point(field_get:valhalla.Options.date_time_type) return _internal_date_time_type(); } inline void Options::_internal_set_date_time_type(::valhalla::Options_DateTimeType value) { - - _impl_.date_time_type_ = value; + if (!_internal_has_date_time_type()) { + clear_has_date_time_type(); + set_has_date_time_type(); + } + _impl_.has_date_time_type_.date_time_type_ = value; } inline void Options::set_date_time_type(::valhalla::Options_DateTimeType value) { _internal_set_date_time_type(value); @@ -10474,7 +9970,7 @@ inline bool Options::has_date_time() const { return _internal_has_date_time(); } inline void Options::set_has_date_time() { - _impl_._oneof_case_[6] = kDateTime; + _impl_._oneof_case_[12] = kDateTime; } inline void Options::clear_date_time() { if (_internal_has_date_time()) { @@ -10588,7 +10084,7 @@ inline bool Options::has_resample_distance() const { return _internal_has_resample_distance(); } inline void Options::set_has_resample_distance() { - _impl_._oneof_case_[7] = kResampleDistance; + _impl_._oneof_case_[13] = kResampleDistance; } inline void Options::clear_resample_distance() { if (_internal_has_resample_distance()) { @@ -10666,7 +10162,7 @@ inline bool Options::has_polygons() const { return _internal_has_polygons(); } inline void Options::set_has_polygons() { - _impl_._oneof_case_[8] = kPolygons; + _impl_._oneof_case_[14] = kPolygons; } inline void Options::clear_polygons() { if (_internal_has_polygons()) { @@ -10704,7 +10200,7 @@ inline bool Options::has_denoise() const { return _internal_has_denoise(); } inline void Options::set_has_denoise() { - _impl_._oneof_case_[9] = kDenoise; + _impl_._oneof_case_[15] = kDenoise; } inline void Options::clear_denoise() { if (_internal_has_denoise()) { @@ -10742,7 +10238,7 @@ inline bool Options::has_generalize() const { return _internal_has_generalize(); } inline void Options::set_has_generalize() { - _impl_._oneof_case_[10] = kGeneralize; + _impl_._oneof_case_[16] = kGeneralize; } inline void Options::clear_generalize() { if (_internal_has_generalize()) { @@ -10780,7 +10276,7 @@ inline bool Options::has_show_locations() const { return _internal_has_show_locations(); } inline void Options::set_has_show_locations() { - _impl_._oneof_case_[11] = kShowLocations; + _impl_._oneof_case_[17] = kShowLocations; } inline void Options::clear_show_locations() { if (_internal_has_show_locations()) { @@ -10848,19 +10344,37 @@ Options::trace() const { } // .valhalla.ShapeMatch shape_match = 28; +inline bool Options::_internal_has_shape_match() const { + return has_shape_match_case() == kShapeMatch; +} +inline bool Options::has_shape_match() const { + return _internal_has_shape_match(); +} +inline void Options::set_has_shape_match() { + _impl_._oneof_case_[18] = kShapeMatch; +} inline void Options::clear_shape_match() { - _impl_.shape_match_ = 0; + if (_internal_has_shape_match()) { + _impl_.has_shape_match_.shape_match_ = 0; + clear_has_has_shape_match(); + } } inline ::valhalla::ShapeMatch Options::_internal_shape_match() const { - return static_cast< ::valhalla::ShapeMatch >(_impl_.shape_match_); + if (_internal_has_shape_match()) { + return static_cast< ::valhalla::ShapeMatch >(_impl_.has_shape_match_.shape_match_); + } + return static_cast< ::valhalla::ShapeMatch >(0); } inline ::valhalla::ShapeMatch Options::shape_match() const { // @@protoc_insertion_point(field_get:valhalla.Options.shape_match) return _internal_shape_match(); } inline void Options::_internal_set_shape_match(::valhalla::ShapeMatch value) { - - _impl_.shape_match_ = value; + if (!_internal_has_shape_match()) { + clear_has_shape_match(); + set_has_shape_match(); + } + _impl_.has_shape_match_.shape_match_ = value; } inline void Options::set_shape_match(::valhalla::ShapeMatch value) { _internal_set_shape_match(value); @@ -10875,7 +10389,7 @@ inline bool Options::has_gps_accuracy() const { return _internal_has_gps_accuracy(); } inline void Options::set_has_gps_accuracy() { - _impl_._oneof_case_[12] = kGpsAccuracy; + _impl_._oneof_case_[19] = kGpsAccuracy; } inline void Options::clear_gps_accuracy() { if (_internal_has_gps_accuracy()) { @@ -10913,7 +10427,7 @@ inline bool Options::has_search_radius() const { return _internal_has_search_radius(); } inline void Options::set_has_search_radius() { - _impl_._oneof_case_[13] = kSearchRadius; + _impl_._oneof_case_[20] = kSearchRadius; } inline void Options::clear_search_radius() { if (_internal_has_search_radius()) { @@ -10951,7 +10465,7 @@ inline bool Options::has_turn_penalty_factor() const { return _internal_has_turn_penalty_factor(); } inline void Options::set_has_turn_penalty_factor() { - _impl_._oneof_case_[14] = kTurnPenaltyFactor; + _impl_._oneof_case_[21] = kTurnPenaltyFactor; } inline void Options::clear_turn_penalty_factor() { if (_internal_has_turn_penalty_factor()) { @@ -11084,7 +10598,7 @@ inline bool Options::has_breakage_distance() const { return _internal_has_breakage_distance(); } inline void Options::set_has_breakage_distance() { - _impl_._oneof_case_[15] = kBreakageDistance; + _impl_._oneof_case_[22] = kBreakageDistance; } inline void Options::clear_breakage_distance() { if (_internal_has_breakage_distance()) { @@ -11122,7 +10636,7 @@ inline bool Options::has_use_timestamps() const { return _internal_has_use_timestamps(); } inline void Options::set_has_use_timestamps() { - _impl_._oneof_case_[16] = kUseTimestamps; + _impl_._oneof_case_[23] = kUseTimestamps; } inline void Options::clear_use_timestamps() { if (_internal_has_use_timestamps()) { @@ -11153,19 +10667,37 @@ inline void Options::set_use_timestamps(bool value) { } // .valhalla.ShapeFormat shape_format = 38; +inline bool Options::_internal_has_shape_format() const { + return has_shape_format_case() == kShapeFormat; +} +inline bool Options::has_shape_format() const { + return _internal_has_shape_format(); +} +inline void Options::set_has_shape_format() { + _impl_._oneof_case_[24] = kShapeFormat; +} inline void Options::clear_shape_format() { - _impl_.shape_format_ = 0; + if (_internal_has_shape_format()) { + _impl_.has_shape_format_.shape_format_ = 0; + clear_has_has_shape_format(); + } } inline ::valhalla::ShapeFormat Options::_internal_shape_format() const { - return static_cast< ::valhalla::ShapeFormat >(_impl_.shape_format_); + if (_internal_has_shape_format()) { + return static_cast< ::valhalla::ShapeFormat >(_impl_.has_shape_format_.shape_format_); + } + return static_cast< ::valhalla::ShapeFormat >(0); } inline ::valhalla::ShapeFormat Options::shape_format() const { // @@protoc_insertion_point(field_get:valhalla.Options.shape_format) return _internal_shape_format(); } inline void Options::_internal_set_shape_format(::valhalla::ShapeFormat value) { - - _impl_.shape_format_ = value; + if (!_internal_has_shape_format()) { + clear_has_shape_format(); + set_has_shape_format(); + } + _impl_.has_shape_format_.shape_format_ = value; } inline void Options::set_shape_format(::valhalla::ShapeFormat value) { _internal_set_shape_format(value); @@ -11180,7 +10712,7 @@ inline bool Options::has_alternates() const { return _internal_has_alternates(); } inline void Options::set_has_alternates() { - _impl_._oneof_case_[17] = kAlternates; + _impl_._oneof_case_[25] = kAlternates; } inline void Options::clear_alternates() { if (_internal_has_alternates()) { @@ -11218,7 +10750,7 @@ inline bool Options::has_interpolation_distance() const { return _internal_has_interpolation_distance(); } inline void Options::set_has_interpolation_distance() { - _impl_._oneof_case_[18] = kInterpolationDistance; + _impl_._oneof_case_[26] = kInterpolationDistance; } inline void Options::clear_interpolation_distance() { if (_internal_has_interpolation_distance()) { @@ -11256,7 +10788,7 @@ inline bool Options::has_guidance_views() const { return _internal_has_guidance_views(); } inline void Options::set_has_guidance_views() { - _impl_._oneof_case_[19] = kGuidanceViews; + _impl_._oneof_case_[27] = kGuidanceViews; } inline void Options::clear_guidance_views() { if (_internal_has_guidance_views()) { @@ -11294,7 +10826,7 @@ inline bool Options::has_height_precision() const { return _internal_has_height_precision(); } inline void Options::set_has_height_precision() { - _impl_._oneof_case_[20] = kHeightPrecision; + _impl_._oneof_case_[28] = kHeightPrecision; } inline void Options::clear_height_precision() { if (_internal_has_height_precision()) { @@ -11332,7 +10864,7 @@ inline bool Options::has_roundabout_exits() const { return _internal_has_roundabout_exits(); } inline void Options::set_has_roundabout_exits() { - _impl_._oneof_case_[21] = kRoundaboutExits; + _impl_._oneof_case_[29] = kRoundaboutExits; } inline void Options::clear_roundabout_exits() { if (_internal_has_roundabout_exits()) { @@ -11370,7 +10902,7 @@ inline bool Options::has_linear_references() const { return _internal_has_linear_references(); } inline void Options::set_has_linear_references() { - _impl_._oneof_case_[22] = kLinearReferences; + _impl_._oneof_case_[30] = kLinearReferences; } inline void Options::clear_linear_references() { if (_internal_has_linear_references()) { @@ -11400,7 +10932,7 @@ inline void Options::set_linear_references(bool value) { // @@protoc_insertion_point(field_set:valhalla.Options.linear_references) } -// repeated .valhalla.Costing recostings = 46; +// repeated .valhalla.CostingOptions recostings = 46; inline int Options::_internal_recostings_size() const { return _impl_.recostings_.size(); } @@ -11410,37 +10942,37 @@ inline int Options::recostings_size() const { inline void Options::clear_recostings() { _impl_.recostings_.Clear(); } -inline ::valhalla::Costing* Options::mutable_recostings(int index) { +inline ::valhalla::CostingOptions* Options::mutable_recostings(int index) { // @@protoc_insertion_point(field_mutable:valhalla.Options.recostings) return _impl_.recostings_.Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Costing >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CostingOptions >* Options::mutable_recostings() { // @@protoc_insertion_point(field_mutable_list:valhalla.Options.recostings) return &_impl_.recostings_; } -inline const ::valhalla::Costing& Options::_internal_recostings(int index) const { +inline const ::valhalla::CostingOptions& Options::_internal_recostings(int index) const { return _impl_.recostings_.Get(index); } -inline const ::valhalla::Costing& Options::recostings(int index) const { +inline const ::valhalla::CostingOptions& Options::recostings(int index) const { // @@protoc_insertion_point(field_get:valhalla.Options.recostings) return _internal_recostings(index); } -inline ::valhalla::Costing* Options::_internal_add_recostings() { +inline ::valhalla::CostingOptions* Options::_internal_add_recostings() { return _impl_.recostings_.Add(); } -inline ::valhalla::Costing* Options::add_recostings() { - ::valhalla::Costing* _add = _internal_add_recostings(); +inline ::valhalla::CostingOptions* Options::add_recostings() { + ::valhalla::CostingOptions* _add = _internal_add_recostings(); // @@protoc_insertion_point(field_add:valhalla.Options.recostings) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Costing >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::CostingOptions >& Options::recostings() const { // @@protoc_insertion_point(field_list:valhalla.Options.recostings) return _impl_.recostings_; } -// repeated .valhalla.Ring exclude_polygons = 47; +// repeated .valhalla.Options.Ring exclude_polygons = 47; inline int Options::_internal_exclude_polygons_size() const { return _impl_.exclude_polygons_.size(); } @@ -11450,31 +10982,31 @@ inline int Options::exclude_polygons_size() const { inline void Options::clear_exclude_polygons() { _impl_.exclude_polygons_.Clear(); } -inline ::valhalla::Ring* Options::mutable_exclude_polygons(int index) { +inline ::valhalla::Options_Ring* Options::mutable_exclude_polygons(int index) { // @@protoc_insertion_point(field_mutable:valhalla.Options.exclude_polygons) return _impl_.exclude_polygons_.Mutable(index); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Ring >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Options_Ring >* Options::mutable_exclude_polygons() { // @@protoc_insertion_point(field_mutable_list:valhalla.Options.exclude_polygons) return &_impl_.exclude_polygons_; } -inline const ::valhalla::Ring& Options::_internal_exclude_polygons(int index) const { +inline const ::valhalla::Options_Ring& Options::_internal_exclude_polygons(int index) const { return _impl_.exclude_polygons_.Get(index); } -inline const ::valhalla::Ring& Options::exclude_polygons(int index) const { +inline const ::valhalla::Options_Ring& Options::exclude_polygons(int index) const { // @@protoc_insertion_point(field_get:valhalla.Options.exclude_polygons) return _internal_exclude_polygons(index); } -inline ::valhalla::Ring* Options::_internal_add_exclude_polygons() { +inline ::valhalla::Options_Ring* Options::_internal_add_exclude_polygons() { return _impl_.exclude_polygons_.Add(); } -inline ::valhalla::Ring* Options::add_exclude_polygons() { - ::valhalla::Ring* _add = _internal_add_exclude_polygons(); +inline ::valhalla::Options_Ring* Options::add_exclude_polygons() { + ::valhalla::Options_Ring* _add = _internal_add_exclude_polygons(); // @@protoc_insertion_point(field_add:valhalla.Options.exclude_polygons) return _add; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Ring >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Options_Ring >& Options::exclude_polygons() const { // @@protoc_insertion_point(field_list:valhalla.Options.exclude_polygons) return _impl_.exclude_polygons_; @@ -11488,7 +11020,7 @@ inline bool Options::has_prioritize_bidirectional() const { return _internal_has_prioritize_bidirectional(); } inline void Options::set_has_prioritize_bidirectional() { - _impl_._oneof_case_[23] = kPrioritizeBidirectional; + _impl_._oneof_case_[31] = kPrioritizeBidirectional; } inline void Options::clear_prioritize_bidirectional() { if (_internal_has_prioritize_bidirectional()) { @@ -11526,7 +11058,7 @@ inline bool Options::has_expansion_action() const { return _internal_has_expansion_action(); } inline void Options::set_has_expansion_action() { - _impl_._oneof_case_[24] = kExpansionAction; + _impl_._oneof_case_[32] = kExpansionAction; } inline void Options::clear_expansion_action() { if (_internal_has_expansion_action()) { @@ -11564,7 +11096,7 @@ inline bool Options::has_skip_opposites() const { return _internal_has_skip_opposites(); } inline void Options::set_has_skip_opposites() { - _impl_._oneof_case_[25] = kSkipOpposites; + _impl_._oneof_case_[33] = kSkipOpposites; } inline void Options::clear_skip_opposites() { if (_internal_has_skip_opposites()) { @@ -11637,396 +11169,311 @@ Options::mutable_expansion_properties() { return _internal_mutable_expansion_properties(); } -// .valhalla.PbfFieldSelector pbf_field_selector = 52; -inline bool Options::_internal_has_pbf_field_selector() const { - return this != internal_default_instance() && _impl_.pbf_field_selector_ != nullptr; -} -inline bool Options::has_pbf_field_selector() const { - return _internal_has_pbf_field_selector(); -} -inline void Options::clear_pbf_field_selector() { - if (GetArenaForAllocation() == nullptr && _impl_.pbf_field_selector_ != nullptr) { - delete _impl_.pbf_field_selector_; - } - _impl_.pbf_field_selector_ = nullptr; -} -inline const ::valhalla::PbfFieldSelector& Options::_internal_pbf_field_selector() const { - const ::valhalla::PbfFieldSelector* p = _impl_.pbf_field_selector_; - return p != nullptr ? *p : reinterpret_cast( - ::valhalla::_PbfFieldSelector_default_instance_); -} -inline const ::valhalla::PbfFieldSelector& Options::pbf_field_selector() const { - // @@protoc_insertion_point(field_get:valhalla.Options.pbf_field_selector) - return _internal_pbf_field_selector(); -} -inline void Options::unsafe_arena_set_allocated_pbf_field_selector( - ::valhalla::PbfFieldSelector* pbf_field_selector) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.pbf_field_selector_); - } - _impl_.pbf_field_selector_ = pbf_field_selector; - if (pbf_field_selector) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Options.pbf_field_selector) -} -inline ::valhalla::PbfFieldSelector* Options::release_pbf_field_selector() { - - ::valhalla::PbfFieldSelector* temp = _impl_.pbf_field_selector_; - _impl_.pbf_field_selector_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; -} -inline ::valhalla::PbfFieldSelector* Options::unsafe_arena_release_pbf_field_selector() { - // @@protoc_insertion_point(field_release:valhalla.Options.pbf_field_selector) - - ::valhalla::PbfFieldSelector* temp = _impl_.pbf_field_selector_; - _impl_.pbf_field_selector_ = nullptr; - return temp; -} -inline ::valhalla::PbfFieldSelector* Options::_internal_mutable_pbf_field_selector() { - - if (_impl_.pbf_field_selector_ == nullptr) { - auto* p = CreateMaybeMessage<::valhalla::PbfFieldSelector>(GetArenaForAllocation()); - _impl_.pbf_field_selector_ = p; - } - return _impl_.pbf_field_selector_; -} -inline ::valhalla::PbfFieldSelector* Options::mutable_pbf_field_selector() { - ::valhalla::PbfFieldSelector* _msg = _internal_mutable_pbf_field_selector(); - // @@protoc_insertion_point(field_mutable:valhalla.Options.pbf_field_selector) - return _msg; -} -inline void Options::set_allocated_pbf_field_selector(::valhalla::PbfFieldSelector* pbf_field_selector) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.pbf_field_selector_; - } - if (pbf_field_selector) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(pbf_field_selector); - if (message_arena != submessage_arena) { - pbf_field_selector = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, pbf_field_selector, submessage_arena); - } - - } else { - - } - _impl_.pbf_field_selector_ = pbf_field_selector; - // @@protoc_insertion_point(field_set_allocated:valhalla.Options.pbf_field_selector) -} - -// bool reverse = 53; -inline void Options::clear_reverse() { - _impl_.reverse_ = false; -} -inline bool Options::_internal_reverse() const { - return _impl_.reverse_; -} -inline bool Options::reverse() const { - // @@protoc_insertion_point(field_get:valhalla.Options.reverse) - return _internal_reverse(); -} -inline void Options::_internal_set_reverse(bool value) { - - _impl_.reverse_ = value; -} -inline void Options::set_reverse(bool value) { - _internal_set_reverse(value); - // @@protoc_insertion_point(field_set:valhalla.Options.reverse) -} - -// uint32 matrix_locations = 54; -inline bool Options::_internal_has_matrix_locations() const { - return has_matrix_locations_case() == kMatrixLocations; +inline bool Options::has_has_units() const { + return has_units_case() != HAS_UNITS_NOT_SET; } -inline bool Options::has_matrix_locations() const { - return _internal_has_matrix_locations(); +inline void Options::clear_has_has_units() { + _impl_._oneof_case_[0] = HAS_UNITS_NOT_SET; } -inline void Options::set_has_matrix_locations() { - _impl_._oneof_case_[26] = kMatrixLocations; -} -inline void Options::clear_matrix_locations() { - if (_internal_has_matrix_locations()) { - _impl_.has_matrix_locations_.matrix_locations_ = 0u; - clear_has_has_matrix_locations(); - } -} -inline uint32_t Options::_internal_matrix_locations() const { - if (_internal_has_matrix_locations()) { - return _impl_.has_matrix_locations_.matrix_locations_; - } - return 0u; +inline bool Options::has_has_language() const { + return has_language_case() != HAS_LANGUAGE_NOT_SET; } -inline void Options::_internal_set_matrix_locations(uint32_t value) { - if (!_internal_has_matrix_locations()) { - clear_has_matrix_locations(); - set_has_matrix_locations(); - } - _impl_.has_matrix_locations_.matrix_locations_ = value; +inline void Options::clear_has_has_language() { + _impl_._oneof_case_[1] = HAS_LANGUAGE_NOT_SET; } -inline uint32_t Options::matrix_locations() const { - // @@protoc_insertion_point(field_get:valhalla.Options.matrix_locations) - return _internal_matrix_locations(); +inline bool Options::has_has_directions_type() const { + return has_directions_type_case() != HAS_DIRECTIONS_TYPE_NOT_SET; } -inline void Options::set_matrix_locations(uint32_t value) { - _internal_set_matrix_locations(value); - // @@protoc_insertion_point(field_set:valhalla.Options.matrix_locations) +inline void Options::clear_has_has_directions_type() { + _impl_._oneof_case_[2] = HAS_DIRECTIONS_TYPE_NOT_SET; } - -inline bool Options::has_has_language() const { - return has_language_case() != HAS_LANGUAGE_NOT_SET; +inline bool Options::has_has_format() const { + return has_format_case() != HAS_FORMAT_NOT_SET; } -inline void Options::clear_has_has_language() { - _impl_._oneof_case_[0] = HAS_LANGUAGE_NOT_SET; +inline void Options::clear_has_has_format() { + _impl_._oneof_case_[3] = HAS_FORMAT_NOT_SET; } inline bool Options::has_has_id() const { return has_id_case() != HAS_ID_NOT_SET; } inline void Options::clear_has_has_id() { - _impl_._oneof_case_[1] = HAS_ID_NOT_SET; + _impl_._oneof_case_[4] = HAS_ID_NOT_SET; } inline bool Options::has_has_jsonp() const { return has_jsonp_case() != HAS_JSONP_NOT_SET; } inline void Options::clear_has_has_jsonp() { - _impl_._oneof_case_[2] = HAS_JSONP_NOT_SET; + _impl_._oneof_case_[5] = HAS_JSONP_NOT_SET; } inline bool Options::has_has_encoded_polyline() const { return has_encoded_polyline_case() != HAS_ENCODED_POLYLINE_NOT_SET; } inline void Options::clear_has_has_encoded_polyline() { - _impl_._oneof_case_[3] = HAS_ENCODED_POLYLINE_NOT_SET; + _impl_._oneof_case_[6] = HAS_ENCODED_POLYLINE_NOT_SET; +} +inline bool Options::has_has_action() const { + return has_action_case() != HAS_ACTION_NOT_SET; +} +inline void Options::clear_has_has_action() { + _impl_._oneof_case_[7] = HAS_ACTION_NOT_SET; } inline bool Options::has_has_range() const { return has_range_case() != HAS_RANGE_NOT_SET; } inline void Options::clear_has_has_range() { - _impl_._oneof_case_[4] = HAS_RANGE_NOT_SET; + _impl_._oneof_case_[8] = HAS_RANGE_NOT_SET; } inline bool Options::has_has_verbose() const { return has_verbose_case() != HAS_VERBOSE_NOT_SET; } inline void Options::clear_has_has_verbose() { - _impl_._oneof_case_[5] = HAS_VERBOSE_NOT_SET; + _impl_._oneof_case_[9] = HAS_VERBOSE_NOT_SET; +} +inline bool Options::has_has_costing() const { + return has_costing_case() != HAS_COSTING_NOT_SET; +} +inline void Options::clear_has_has_costing() { + _impl_._oneof_case_[10] = HAS_COSTING_NOT_SET; +} +inline bool Options::has_has_date_time_type() const { + return has_date_time_type_case() != HAS_DATE_TIME_TYPE_NOT_SET; +} +inline void Options::clear_has_has_date_time_type() { + _impl_._oneof_case_[11] = HAS_DATE_TIME_TYPE_NOT_SET; } inline bool Options::has_has_date_time() const { return has_date_time_case() != HAS_DATE_TIME_NOT_SET; } inline void Options::clear_has_has_date_time() { - _impl_._oneof_case_[6] = HAS_DATE_TIME_NOT_SET; + _impl_._oneof_case_[12] = HAS_DATE_TIME_NOT_SET; } inline bool Options::has_has_resample_distance() const { return has_resample_distance_case() != HAS_RESAMPLE_DISTANCE_NOT_SET; } inline void Options::clear_has_has_resample_distance() { - _impl_._oneof_case_[7] = HAS_RESAMPLE_DISTANCE_NOT_SET; + _impl_._oneof_case_[13] = HAS_RESAMPLE_DISTANCE_NOT_SET; } inline bool Options::has_has_polygons() const { return has_polygons_case() != HAS_POLYGONS_NOT_SET; } inline void Options::clear_has_has_polygons() { - _impl_._oneof_case_[8] = HAS_POLYGONS_NOT_SET; + _impl_._oneof_case_[14] = HAS_POLYGONS_NOT_SET; } inline bool Options::has_has_denoise() const { return has_denoise_case() != HAS_DENOISE_NOT_SET; } inline void Options::clear_has_has_denoise() { - _impl_._oneof_case_[9] = HAS_DENOISE_NOT_SET; + _impl_._oneof_case_[15] = HAS_DENOISE_NOT_SET; } inline bool Options::has_has_generalize() const { return has_generalize_case() != HAS_GENERALIZE_NOT_SET; } inline void Options::clear_has_has_generalize() { - _impl_._oneof_case_[10] = HAS_GENERALIZE_NOT_SET; + _impl_._oneof_case_[16] = HAS_GENERALIZE_NOT_SET; } inline bool Options::has_has_show_locations() const { return has_show_locations_case() != HAS_SHOW_LOCATIONS_NOT_SET; } inline void Options::clear_has_has_show_locations() { - _impl_._oneof_case_[11] = HAS_SHOW_LOCATIONS_NOT_SET; + _impl_._oneof_case_[17] = HAS_SHOW_LOCATIONS_NOT_SET; +} +inline bool Options::has_has_shape_match() const { + return has_shape_match_case() != HAS_SHAPE_MATCH_NOT_SET; +} +inline void Options::clear_has_has_shape_match() { + _impl_._oneof_case_[18] = HAS_SHAPE_MATCH_NOT_SET; } inline bool Options::has_has_gps_accuracy() const { return has_gps_accuracy_case() != HAS_GPS_ACCURACY_NOT_SET; } inline void Options::clear_has_has_gps_accuracy() { - _impl_._oneof_case_[12] = HAS_GPS_ACCURACY_NOT_SET; + _impl_._oneof_case_[19] = HAS_GPS_ACCURACY_NOT_SET; } inline bool Options::has_has_search_radius() const { return has_search_radius_case() != HAS_SEARCH_RADIUS_NOT_SET; } inline void Options::clear_has_has_search_radius() { - _impl_._oneof_case_[13] = HAS_SEARCH_RADIUS_NOT_SET; + _impl_._oneof_case_[20] = HAS_SEARCH_RADIUS_NOT_SET; } inline bool Options::has_has_turn_penalty_factor() const { return has_turn_penalty_factor_case() != HAS_TURN_PENALTY_FACTOR_NOT_SET; } inline void Options::clear_has_has_turn_penalty_factor() { - _impl_._oneof_case_[14] = HAS_TURN_PENALTY_FACTOR_NOT_SET; + _impl_._oneof_case_[21] = HAS_TURN_PENALTY_FACTOR_NOT_SET; } inline bool Options::has_has_breakage_distance() const { return has_breakage_distance_case() != HAS_BREAKAGE_DISTANCE_NOT_SET; } inline void Options::clear_has_has_breakage_distance() { - _impl_._oneof_case_[15] = HAS_BREAKAGE_DISTANCE_NOT_SET; + _impl_._oneof_case_[22] = HAS_BREAKAGE_DISTANCE_NOT_SET; } inline bool Options::has_has_use_timestamps() const { return has_use_timestamps_case() != HAS_USE_TIMESTAMPS_NOT_SET; } inline void Options::clear_has_has_use_timestamps() { - _impl_._oneof_case_[16] = HAS_USE_TIMESTAMPS_NOT_SET; + _impl_._oneof_case_[23] = HAS_USE_TIMESTAMPS_NOT_SET; +} +inline bool Options::has_has_shape_format() const { + return has_shape_format_case() != HAS_SHAPE_FORMAT_NOT_SET; +} +inline void Options::clear_has_has_shape_format() { + _impl_._oneof_case_[24] = HAS_SHAPE_FORMAT_NOT_SET; } inline bool Options::has_has_alternates() const { return has_alternates_case() != HAS_ALTERNATES_NOT_SET; } inline void Options::clear_has_has_alternates() { - _impl_._oneof_case_[17] = HAS_ALTERNATES_NOT_SET; + _impl_._oneof_case_[25] = HAS_ALTERNATES_NOT_SET; } inline bool Options::has_has_interpolation_distance() const { return has_interpolation_distance_case() != HAS_INTERPOLATION_DISTANCE_NOT_SET; } inline void Options::clear_has_has_interpolation_distance() { - _impl_._oneof_case_[18] = HAS_INTERPOLATION_DISTANCE_NOT_SET; + _impl_._oneof_case_[26] = HAS_INTERPOLATION_DISTANCE_NOT_SET; } inline bool Options::has_has_guidance_views() const { return has_guidance_views_case() != HAS_GUIDANCE_VIEWS_NOT_SET; } inline void Options::clear_has_has_guidance_views() { - _impl_._oneof_case_[19] = HAS_GUIDANCE_VIEWS_NOT_SET; + _impl_._oneof_case_[27] = HAS_GUIDANCE_VIEWS_NOT_SET; } inline bool Options::has_has_height_precision() const { return has_height_precision_case() != HAS_HEIGHT_PRECISION_NOT_SET; } inline void Options::clear_has_has_height_precision() { - _impl_._oneof_case_[20] = HAS_HEIGHT_PRECISION_NOT_SET; + _impl_._oneof_case_[28] = HAS_HEIGHT_PRECISION_NOT_SET; } inline bool Options::has_has_roundabout_exits() const { return has_roundabout_exits_case() != HAS_ROUNDABOUT_EXITS_NOT_SET; } inline void Options::clear_has_has_roundabout_exits() { - _impl_._oneof_case_[21] = HAS_ROUNDABOUT_EXITS_NOT_SET; + _impl_._oneof_case_[29] = HAS_ROUNDABOUT_EXITS_NOT_SET; } inline bool Options::has_has_linear_references() const { return has_linear_references_case() != HAS_LINEAR_REFERENCES_NOT_SET; } inline void Options::clear_has_has_linear_references() { - _impl_._oneof_case_[22] = HAS_LINEAR_REFERENCES_NOT_SET; + _impl_._oneof_case_[30] = HAS_LINEAR_REFERENCES_NOT_SET; } inline bool Options::has_has_prioritize_bidirectional() const { return has_prioritize_bidirectional_case() != HAS_PRIORITIZE_BIDIRECTIONAL_NOT_SET; } inline void Options::clear_has_has_prioritize_bidirectional() { - _impl_._oneof_case_[23] = HAS_PRIORITIZE_BIDIRECTIONAL_NOT_SET; + _impl_._oneof_case_[31] = HAS_PRIORITIZE_BIDIRECTIONAL_NOT_SET; } inline bool Options::has_has_expansion_action() const { return has_expansion_action_case() != HAS_EXPANSION_ACTION_NOT_SET; } inline void Options::clear_has_has_expansion_action() { - _impl_._oneof_case_[24] = HAS_EXPANSION_ACTION_NOT_SET; + _impl_._oneof_case_[32] = HAS_EXPANSION_ACTION_NOT_SET; } inline bool Options::has_has_skip_opposites() const { return has_skip_opposites_case() != HAS_SKIP_OPPOSITES_NOT_SET; } inline void Options::clear_has_has_skip_opposites() { - _impl_._oneof_case_[25] = HAS_SKIP_OPPOSITES_NOT_SET; -} -inline bool Options::has_has_matrix_locations() const { - return has_matrix_locations_case() != HAS_MATRIX_LOCATIONS_NOT_SET; + _impl_._oneof_case_[33] = HAS_SKIP_OPPOSITES_NOT_SET; } -inline void Options::clear_has_has_matrix_locations() { - _impl_._oneof_case_[26] = HAS_MATRIX_LOCATIONS_NOT_SET; +inline Options::HasUnitsCase Options::has_units_case() const { + return Options::HasUnitsCase(_impl_._oneof_case_[0]); } inline Options::HasLanguageCase Options::has_language_case() const { - return Options::HasLanguageCase(_impl_._oneof_case_[0]); + return Options::HasLanguageCase(_impl_._oneof_case_[1]); +} +inline Options::HasDirectionsTypeCase Options::has_directions_type_case() const { + return Options::HasDirectionsTypeCase(_impl_._oneof_case_[2]); +} +inline Options::HasFormatCase Options::has_format_case() const { + return Options::HasFormatCase(_impl_._oneof_case_[3]); } inline Options::HasIdCase Options::has_id_case() const { - return Options::HasIdCase(_impl_._oneof_case_[1]); + return Options::HasIdCase(_impl_._oneof_case_[4]); } inline Options::HasJsonpCase Options::has_jsonp_case() const { - return Options::HasJsonpCase(_impl_._oneof_case_[2]); + return Options::HasJsonpCase(_impl_._oneof_case_[5]); } inline Options::HasEncodedPolylineCase Options::has_encoded_polyline_case() const { - return Options::HasEncodedPolylineCase(_impl_._oneof_case_[3]); + return Options::HasEncodedPolylineCase(_impl_._oneof_case_[6]); +} +inline Options::HasActionCase Options::has_action_case() const { + return Options::HasActionCase(_impl_._oneof_case_[7]); } inline Options::HasRangeCase Options::has_range_case() const { - return Options::HasRangeCase(_impl_._oneof_case_[4]); + return Options::HasRangeCase(_impl_._oneof_case_[8]); } inline Options::HasVerboseCase Options::has_verbose_case() const { - return Options::HasVerboseCase(_impl_._oneof_case_[5]); + return Options::HasVerboseCase(_impl_._oneof_case_[9]); +} +inline Options::HasCostingCase Options::has_costing_case() const { + return Options::HasCostingCase(_impl_._oneof_case_[10]); +} +inline Options::HasDateTimeTypeCase Options::has_date_time_type_case() const { + return Options::HasDateTimeTypeCase(_impl_._oneof_case_[11]); } inline Options::HasDateTimeCase Options::has_date_time_case() const { - return Options::HasDateTimeCase(_impl_._oneof_case_[6]); + return Options::HasDateTimeCase(_impl_._oneof_case_[12]); } inline Options::HasResampleDistanceCase Options::has_resample_distance_case() const { - return Options::HasResampleDistanceCase(_impl_._oneof_case_[7]); + return Options::HasResampleDistanceCase(_impl_._oneof_case_[13]); } inline Options::HasPolygonsCase Options::has_polygons_case() const { - return Options::HasPolygonsCase(_impl_._oneof_case_[8]); + return Options::HasPolygonsCase(_impl_._oneof_case_[14]); } inline Options::HasDenoiseCase Options::has_denoise_case() const { - return Options::HasDenoiseCase(_impl_._oneof_case_[9]); + return Options::HasDenoiseCase(_impl_._oneof_case_[15]); } inline Options::HasGeneralizeCase Options::has_generalize_case() const { - return Options::HasGeneralizeCase(_impl_._oneof_case_[10]); + return Options::HasGeneralizeCase(_impl_._oneof_case_[16]); } inline Options::HasShowLocationsCase Options::has_show_locations_case() const { - return Options::HasShowLocationsCase(_impl_._oneof_case_[11]); + return Options::HasShowLocationsCase(_impl_._oneof_case_[17]); +} +inline Options::HasShapeMatchCase Options::has_shape_match_case() const { + return Options::HasShapeMatchCase(_impl_._oneof_case_[18]); } inline Options::HasGpsAccuracyCase Options::has_gps_accuracy_case() const { - return Options::HasGpsAccuracyCase(_impl_._oneof_case_[12]); + return Options::HasGpsAccuracyCase(_impl_._oneof_case_[19]); } inline Options::HasSearchRadiusCase Options::has_search_radius_case() const { - return Options::HasSearchRadiusCase(_impl_._oneof_case_[13]); + return Options::HasSearchRadiusCase(_impl_._oneof_case_[20]); } inline Options::HasTurnPenaltyFactorCase Options::has_turn_penalty_factor_case() const { - return Options::HasTurnPenaltyFactorCase(_impl_._oneof_case_[14]); + return Options::HasTurnPenaltyFactorCase(_impl_._oneof_case_[21]); } inline Options::HasBreakageDistanceCase Options::has_breakage_distance_case() const { - return Options::HasBreakageDistanceCase(_impl_._oneof_case_[15]); + return Options::HasBreakageDistanceCase(_impl_._oneof_case_[22]); } inline Options::HasUseTimestampsCase Options::has_use_timestamps_case() const { - return Options::HasUseTimestampsCase(_impl_._oneof_case_[16]); + return Options::HasUseTimestampsCase(_impl_._oneof_case_[23]); +} +inline Options::HasShapeFormatCase Options::has_shape_format_case() const { + return Options::HasShapeFormatCase(_impl_._oneof_case_[24]); } inline Options::HasAlternatesCase Options::has_alternates_case() const { - return Options::HasAlternatesCase(_impl_._oneof_case_[17]); + return Options::HasAlternatesCase(_impl_._oneof_case_[25]); } inline Options::HasInterpolationDistanceCase Options::has_interpolation_distance_case() const { - return Options::HasInterpolationDistanceCase(_impl_._oneof_case_[18]); + return Options::HasInterpolationDistanceCase(_impl_._oneof_case_[26]); } inline Options::HasGuidanceViewsCase Options::has_guidance_views_case() const { - return Options::HasGuidanceViewsCase(_impl_._oneof_case_[19]); + return Options::HasGuidanceViewsCase(_impl_._oneof_case_[27]); } inline Options::HasHeightPrecisionCase Options::has_height_precision_case() const { - return Options::HasHeightPrecisionCase(_impl_._oneof_case_[20]); + return Options::HasHeightPrecisionCase(_impl_._oneof_case_[28]); } inline Options::HasRoundaboutExitsCase Options::has_roundabout_exits_case() const { - return Options::HasRoundaboutExitsCase(_impl_._oneof_case_[21]); + return Options::HasRoundaboutExitsCase(_impl_._oneof_case_[29]); } inline Options::HasLinearReferencesCase Options::has_linear_references_case() const { - return Options::HasLinearReferencesCase(_impl_._oneof_case_[22]); + return Options::HasLinearReferencesCase(_impl_._oneof_case_[30]); } inline Options::HasPrioritizeBidirectionalCase Options::has_prioritize_bidirectional_case() const { - return Options::HasPrioritizeBidirectionalCase(_impl_._oneof_case_[23]); + return Options::HasPrioritizeBidirectionalCase(_impl_._oneof_case_[31]); } inline Options::HasExpansionActionCase Options::has_expansion_action_case() const { - return Options::HasExpansionActionCase(_impl_._oneof_case_[24]); + return Options::HasExpansionActionCase(_impl_._oneof_case_[32]); } inline Options::HasSkipOppositesCase Options::has_skip_opposites_case() const { - return Options::HasSkipOppositesCase(_impl_._oneof_case_[25]); -} -inline Options::HasMatrixLocationsCase Options::has_matrix_locations_case() const { - return Options::HasMatrixLocationsCase(_impl_._oneof_case_[26]); + return Options::HasSkipOppositesCase(_impl_._oneof_case_[33]); } #ifdef __GNUC__ #pragma GCC diagnostic pop @@ -12041,10 +11488,6 @@ inline Options::HasMatrixLocationsCase Options::has_matrix_locations_case() cons // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) @@ -12052,7 +11495,6 @@ inline Options::HasMatrixLocationsCase Options::has_matrix_locations_case() cons PROTOBUF_NAMESPACE_OPEN -template <> struct is_proto_enum< ::valhalla::Costing_Type> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::Options_Units> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::Options_Format> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::Options_Action> : ::std::true_type {}; @@ -12062,6 +11504,7 @@ template <> struct is_proto_enum< ::valhalla::ShapeMatch> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::FilterAction> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::DirectionsType> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::ShapeFormat> : ::std::true_type {}; +template <> struct is_proto_enum< ::valhalla::Costing> : ::std::true_type {}; PROTOBUF_NAMESPACE_CLOSE diff --git a/include/linux/valhalla/proto/sign.pb.cc b/include/linux/valhalla/proto/sign.pb.cc index 11dd4da..bd93f95 100644 --- a/include/linux/valhalla/proto/sign.pb.cc +++ b/include/linux/valhalla/proto/sign.pb.cc @@ -20,11 +20,12 @@ namespace _pbi = _pb::internal; namespace valhalla { PROTOBUF_CONSTEXPR TripSignElement::TripSignElement( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.text_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.pronunciation_)*/nullptr - , /*decltype(_impl_.is_route_number_)*/false - , /*decltype(_impl_.consecutive_count_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.pronunciation_)*/nullptr + , /*decltype(_impl_.has_text_)*/{} + , /*decltype(_impl_.has_is_route_number_)*/{} + , /*decltype(_impl_.has_consecutive_count_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripSignElementDefaultTypeInternal { PROTOBUF_CONSTEXPR TripSignElementDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -85,27 +86,47 @@ TripSignElement::TripSignElement(const TripSignElement& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripSignElement* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.text_){} - , decltype(_impl_.pronunciation_){nullptr} - , decltype(_impl_.is_route_number_){} - , decltype(_impl_.consecutive_count_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.pronunciation_){nullptr} + , decltype(_impl_.has_text_){} + , decltype(_impl_.has_is_route_number_){} + , decltype(_impl_.has_consecutive_count_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_text().empty()) { - _this->_impl_.text_.Set(from._internal_text(), - _this->GetArenaForAllocation()); - } if (from._internal_has_pronunciation()) { _this->_impl_.pronunciation_ = new ::valhalla::Pronunciation(*from._impl_.pronunciation_); } - ::memcpy(&_impl_.is_route_number_, &from._impl_.is_route_number_, - static_cast(reinterpret_cast(&_impl_.consecutive_count_) - - reinterpret_cast(&_impl_.is_route_number_)) + sizeof(_impl_.consecutive_count_)); + clear_has_has_text(); + switch (from.has_text_case()) { + case kText: { + _this->_internal_set_text(from._internal_text()); + break; + } + case HAS_TEXT_NOT_SET: { + break; + } + } + clear_has_has_is_route_number(); + switch (from.has_is_route_number_case()) { + case kIsRouteNumber: { + _this->_internal_set_is_route_number(from._internal_is_route_number()); + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } + } + clear_has_has_consecutive_count(); + switch (from.has_consecutive_count_case()) { + case kConsecutiveCount: { + _this->_internal_set_consecutive_count(from._internal_consecutive_count()); + break; + } + case HAS_CONSECUTIVE_COUNT_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripSignElement) } @@ -114,16 +135,16 @@ inline void TripSignElement::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.text_){} - , decltype(_impl_.pronunciation_){nullptr} - , decltype(_impl_.is_route_number_){false} - , decltype(_impl_.consecutive_count_){0u} + decltype(_impl_.pronunciation_){nullptr} + , decltype(_impl_.has_text_){} + , decltype(_impl_.has_is_route_number_){} + , decltype(_impl_.has_consecutive_count_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_text(); + clear_has_has_is_route_number(); + clear_has_has_consecutive_count(); } TripSignElement::~TripSignElement() { @@ -137,28 +158,78 @@ TripSignElement::~TripSignElement() { inline void TripSignElement::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.text_.Destroy(); if (this != internal_default_instance()) delete _impl_.pronunciation_; + if (has_has_text()) { + clear_has_text(); + } + if (has_has_is_route_number()) { + clear_has_is_route_number(); + } + if (has_has_consecutive_count()) { + clear_has_consecutive_count(); + } } void TripSignElement::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripSignElement::clear_has_text() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripSignElement) + switch (has_text_case()) { + case kText: { + _impl_.has_text_.text_.Destroy(); + break; + } + case HAS_TEXT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TEXT_NOT_SET; +} + +void TripSignElement::clear_has_is_route_number() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripSignElement) + switch (has_is_route_number_case()) { + case kIsRouteNumber: { + // No need to clear + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_IS_ROUTE_NUMBER_NOT_SET; +} + +void TripSignElement::clear_has_consecutive_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripSignElement) + switch (has_consecutive_count_case()) { + case kConsecutiveCount: { + // No need to clear + break; + } + case HAS_CONSECUTIVE_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_CONSECUTIVE_COUNT_NOT_SET; +} + + void TripSignElement::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripSignElement) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.text_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.pronunciation_ != nullptr) { delete _impl_.pronunciation_; } _impl_.pronunciation_ = nullptr; - ::memset(&_impl_.is_route_number_, 0, static_cast( - reinterpret_cast(&_impl_.consecutive_count_) - - reinterpret_cast(&_impl_.is_route_number_)) + sizeof(_impl_.consecutive_count_)); + clear_has_text(); + clear_has_is_route_number(); + clear_has_consecutive_count(); _internal_metadata_.Clear(); } @@ -181,7 +252,7 @@ const char* TripSignElement::_InternalParse(const char* ptr, ::_pbi::ParseContex // bool is_route_number = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.is_route_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_is_route_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -189,7 +260,7 @@ const char* TripSignElement::_InternalParse(const char* ptr, ::_pbi::ParseContex // uint32 consecutive_count = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.consecutive_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_consecutive_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -232,7 +303,7 @@ uint8_t* TripSignElement::_InternalSerialize( (void) cached_has_bits; // string text = 1; - if (!this->_internal_text().empty()) { + if (_internal_has_text()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_text().data(), static_cast(this->_internal_text().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -242,13 +313,13 @@ uint8_t* TripSignElement::_InternalSerialize( } // bool is_route_number = 2; - if (this->_internal_is_route_number() != 0) { + if (_internal_has_is_route_number()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_is_route_number(), target); } // uint32 consecutive_count = 3; - if (this->_internal_consecutive_count() != 0) { + if (_internal_has_consecutive_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_consecutive_count(), target); } @@ -276,13 +347,6 @@ size_t TripSignElement::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string text = 1; - if (!this->_internal_text().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_text()); - } - // .valhalla.Pronunciation pronunciation = 4; if (this->_internal_has_pronunciation()) { total_size += 1 + @@ -290,16 +354,38 @@ size_t TripSignElement::ByteSizeLong() const { *_impl_.pronunciation_); } - // bool is_route_number = 2; - if (this->_internal_is_route_number() != 0) { - total_size += 1 + 1; + switch (has_text_case()) { + // string text = 1; + case kText: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_text()); + break; + } + case HAS_TEXT_NOT_SET: { + break; + } } - - // uint32 consecutive_count = 3; - if (this->_internal_consecutive_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_consecutive_count()); + switch (has_is_route_number_case()) { + // bool is_route_number = 2; + case kIsRouteNumber: { + total_size += 1 + 1; + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } + } + switch (has_consecutive_count_case()) { + // uint32 consecutive_count = 3; + case kConsecutiveCount: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_consecutive_count()); + break; + } + case HAS_CONSECUTIVE_COUNT_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -321,18 +407,36 @@ void TripSignElement::MergeFrom(const TripSignElement& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_text().empty()) { - _this->_internal_set_text(from._internal_text()); - } if (from._internal_has_pronunciation()) { _this->_internal_mutable_pronunciation()->::valhalla::Pronunciation::MergeFrom( from._internal_pronunciation()); } - if (from._internal_is_route_number() != 0) { - _this->_internal_set_is_route_number(from._internal_is_route_number()); + switch (from.has_text_case()) { + case kText: { + _this->_internal_set_text(from._internal_text()); + break; + } + case HAS_TEXT_NOT_SET: { + break; + } + } + switch (from.has_is_route_number_case()) { + case kIsRouteNumber: { + _this->_internal_set_is_route_number(from._internal_is_route_number()); + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } } - if (from._internal_consecutive_count() != 0) { - _this->_internal_set_consecutive_count(from._internal_consecutive_count()); + switch (from.has_consecutive_count_case()) { + case kConsecutiveCount: { + _this->_internal_set_consecutive_count(from._internal_consecutive_count()); + break; + } + case HAS_CONSECUTIVE_COUNT_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -350,19 +454,14 @@ bool TripSignElement::IsInitialized() const { void TripSignElement::InternalSwap(TripSignElement* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.text_, lhs_arena, - &other->_impl_.text_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripSignElement, _impl_.consecutive_count_) - + sizeof(TripSignElement::_impl_.consecutive_count_) - - PROTOBUF_FIELD_OFFSET(TripSignElement, _impl_.pronunciation_)>( - reinterpret_cast(&_impl_.pronunciation_), - reinterpret_cast(&other->_impl_.pronunciation_)); + swap(_impl_.pronunciation_, other->_impl_.pronunciation_); + swap(_impl_.has_text_, other->_impl_.has_text_); + swap(_impl_.has_is_route_number_, other->_impl_.has_is_route_number_); + swap(_impl_.has_consecutive_count_, other->_impl_.has_consecutive_count_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); } std::string TripSignElement::GetTypeName() const { diff --git a/include/linux/valhalla/proto/sign.pb.h b/include/linux/valhalla/proto/sign.pb.h index 0800a7c..ace4255 100644 --- a/include/linux/valhalla/proto/sign.pb.h +++ b/include/linux/valhalla/proto/sign.pb.h @@ -28,7 +28,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export -#include "common.pb.h" +#include "tripcommon.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_sign_2eproto @@ -92,6 +92,21 @@ class TripSignElement final : static const TripSignElement& default_instance() { return *internal_default_instance(); } + enum HasTextCase { + kText = 1, + HAS_TEXT_NOT_SET = 0, + }; + + enum HasIsRouteNumberCase { + kIsRouteNumber = 2, + HAS_IS_ROUTE_NUMBER_NOT_SET = 0, + }; + + enum HasConsecutiveCountCase { + kConsecutiveCount = 3, + HAS_CONSECUTIVE_COUNT_NOT_SET = 0, + }; + static inline const TripSignElement* internal_default_instance() { return reinterpret_cast( &_TripSignElement_default_instance_); @@ -161,25 +176,11 @@ class TripSignElement final : // accessors ------------------------------------------------------- enum : int { - kTextFieldNumber = 1, kPronunciationFieldNumber = 4, + kTextFieldNumber = 1, kIsRouteNumberFieldNumber = 2, kConsecutiveCountFieldNumber = 3, }; - // string text = 1; - void clear_text(); - const std::string& text() const; - template - void set_text(ArgT0&& arg0, ArgT... args); - std::string* mutable_text(); - PROTOBUF_NODISCARD std::string* release_text(); - void set_allocated_text(std::string* text); - private: - const std::string& _internal_text() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_text(const std::string& value); - std::string* _internal_mutable_text(); - public: - // .valhalla.Pronunciation pronunciation = 4; bool has_pronunciation() const; private: @@ -198,7 +199,29 @@ class TripSignElement final : ::valhalla::Pronunciation* pronunciation); ::valhalla::Pronunciation* unsafe_arena_release_pronunciation(); + // string text = 1; + bool has_text() const; + private: + bool _internal_has_text() const; + public: + void clear_text(); + const std::string& text() const; + template + void set_text(ArgT0&& arg0, ArgT... args); + std::string* mutable_text(); + PROTOBUF_NODISCARD std::string* release_text(); + void set_allocated_text(std::string* text); + private: + const std::string& _internal_text() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_text(const std::string& value); + std::string* _internal_mutable_text(); + public: + // bool is_route_number = 2; + bool has_is_route_number() const; + private: + bool _internal_has_is_route_number() const; + public: void clear_is_route_number(); bool is_route_number() const; void set_is_route_number(bool value); @@ -208,6 +231,10 @@ class TripSignElement final : public: // uint32 consecutive_count = 3; + bool has_consecutive_count() const; + private: + bool _internal_has_consecutive_count() const; + public: void clear_consecutive_count(); uint32_t consecutive_count() const; void set_consecutive_count(uint32_t value); @@ -216,19 +243,51 @@ class TripSignElement final : void _internal_set_consecutive_count(uint32_t value); public: + void clear_has_text(); + HasTextCase has_text_case() const; + void clear_has_is_route_number(); + HasIsRouteNumberCase has_is_route_number_case() const; + void clear_has_consecutive_count(); + HasConsecutiveCountCase has_consecutive_count_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripSignElement) private: class _Internal; + void set_has_text(); + void set_has_is_route_number(); + void set_has_consecutive_count(); + + inline bool has_has_text() const; + inline void clear_has_has_text(); + + inline bool has_has_is_route_number() const; + inline void clear_has_has_is_route_number(); + + inline bool has_has_consecutive_count() const; + inline void clear_has_has_consecutive_count(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; ::valhalla::Pronunciation* pronunciation_; - bool is_route_number_; - uint32_t consecutive_count_; + union HasTextUnion { + constexpr HasTextUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; + } has_text_; + union HasIsRouteNumberUnion { + constexpr HasIsRouteNumberUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool is_route_number_; + } has_is_route_number_; + union HasConsecutiveCountUnion { + constexpr HasConsecutiveCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t consecutive_count_; + } has_consecutive_count_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[3]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_sign_2eproto; @@ -544,18 +603,33 @@ class TripSign final : // TripSignElement // string text = 1; +inline bool TripSignElement::_internal_has_text() const { + return has_text_case() == kText; +} +inline bool TripSignElement::has_text() const { + return _internal_has_text(); +} +inline void TripSignElement::set_has_text() { + _impl_._oneof_case_[0] = kText; +} inline void TripSignElement::clear_text() { - _impl_.text_.ClearToEmpty(); + if (_internal_has_text()) { + _impl_.has_text_.text_.Destroy(); + clear_has_has_text(); + } } inline const std::string& TripSignElement::text() const { // @@protoc_insertion_point(field_get:valhalla.TripSignElement.text) return _internal_text(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripSignElement::set_text(ArgT0&& arg0, ArgT... args) { - - _impl_.text_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripSignElement::set_text(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_text()) { + clear_has_text(); + set_has_text(); + _impl_.has_text_.text_.InitDefault(); + } + _impl_.has_text_.text_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripSignElement.text) } inline std::string* TripSignElement::mutable_text() { @@ -564,70 +638,118 @@ inline std::string* TripSignElement::mutable_text() { return _s; } inline const std::string& TripSignElement::_internal_text() const { - return _impl_.text_.Get(); + if (_internal_has_text()) { + return _impl_.has_text_.text_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripSignElement::_internal_set_text(const std::string& value) { - - _impl_.text_.Set(value, GetArenaForAllocation()); + if (!_internal_has_text()) { + clear_has_text(); + set_has_text(); + _impl_.has_text_.text_.InitDefault(); + } + _impl_.has_text_.text_.Set(value, GetArenaForAllocation()); } inline std::string* TripSignElement::_internal_mutable_text() { - - return _impl_.text_.Mutable(GetArenaForAllocation()); + if (!_internal_has_text()) { + clear_has_text(); + set_has_text(); + _impl_.has_text_.text_.InitDefault(); + } + return _impl_.has_text_.text_.Mutable( GetArenaForAllocation()); } inline std::string* TripSignElement::release_text() { // @@protoc_insertion_point(field_release:valhalla.TripSignElement.text) - return _impl_.text_.Release(); + if (_internal_has_text()) { + clear_has_has_text(); + return _impl_.has_text_.text_.Release(); + } else { + return nullptr; + } } inline void TripSignElement::set_allocated_text(std::string* text) { - if (text != nullptr) { - - } else { - + if (has_has_text()) { + clear_has_text(); } - _impl_.text_.SetAllocated(text, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.text_.IsDefault()) { - _impl_.text_.Set("", GetArenaForAllocation()); + if (text != nullptr) { + set_has_text(); + _impl_.has_text_.text_.InitAllocated(text, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripSignElement.text) } // bool is_route_number = 2; +inline bool TripSignElement::_internal_has_is_route_number() const { + return has_is_route_number_case() == kIsRouteNumber; +} +inline bool TripSignElement::has_is_route_number() const { + return _internal_has_is_route_number(); +} +inline void TripSignElement::set_has_is_route_number() { + _impl_._oneof_case_[1] = kIsRouteNumber; +} inline void TripSignElement::clear_is_route_number() { - _impl_.is_route_number_ = false; + if (_internal_has_is_route_number()) { + _impl_.has_is_route_number_.is_route_number_ = false; + clear_has_has_is_route_number(); + } } inline bool TripSignElement::_internal_is_route_number() const { - return _impl_.is_route_number_; + if (_internal_has_is_route_number()) { + return _impl_.has_is_route_number_.is_route_number_; + } + return false; +} +inline void TripSignElement::_internal_set_is_route_number(bool value) { + if (!_internal_has_is_route_number()) { + clear_has_is_route_number(); + set_has_is_route_number(); + } + _impl_.has_is_route_number_.is_route_number_ = value; } inline bool TripSignElement::is_route_number() const { // @@protoc_insertion_point(field_get:valhalla.TripSignElement.is_route_number) return _internal_is_route_number(); } -inline void TripSignElement::_internal_set_is_route_number(bool value) { - - _impl_.is_route_number_ = value; -} inline void TripSignElement::set_is_route_number(bool value) { _internal_set_is_route_number(value); // @@protoc_insertion_point(field_set:valhalla.TripSignElement.is_route_number) } // uint32 consecutive_count = 3; +inline bool TripSignElement::_internal_has_consecutive_count() const { + return has_consecutive_count_case() == kConsecutiveCount; +} +inline bool TripSignElement::has_consecutive_count() const { + return _internal_has_consecutive_count(); +} +inline void TripSignElement::set_has_consecutive_count() { + _impl_._oneof_case_[2] = kConsecutiveCount; +} inline void TripSignElement::clear_consecutive_count() { - _impl_.consecutive_count_ = 0u; + if (_internal_has_consecutive_count()) { + _impl_.has_consecutive_count_.consecutive_count_ = 0u; + clear_has_has_consecutive_count(); + } } inline uint32_t TripSignElement::_internal_consecutive_count() const { - return _impl_.consecutive_count_; + if (_internal_has_consecutive_count()) { + return _impl_.has_consecutive_count_.consecutive_count_; + } + return 0u; +} +inline void TripSignElement::_internal_set_consecutive_count(uint32_t value) { + if (!_internal_has_consecutive_count()) { + clear_has_consecutive_count(); + set_has_consecutive_count(); + } + _impl_.has_consecutive_count_.consecutive_count_ = value; } inline uint32_t TripSignElement::consecutive_count() const { // @@protoc_insertion_point(field_get:valhalla.TripSignElement.consecutive_count) return _internal_consecutive_count(); } -inline void TripSignElement::_internal_set_consecutive_count(uint32_t value) { - - _impl_.consecutive_count_ = value; -} inline void TripSignElement::set_consecutive_count(uint32_t value) { _internal_set_consecutive_count(value); // @@protoc_insertion_point(field_set:valhalla.TripSignElement.consecutive_count) @@ -718,6 +840,33 @@ inline void TripSignElement::set_allocated_pronunciation(::valhalla::Pronunciati // @@protoc_insertion_point(field_set_allocated:valhalla.TripSignElement.pronunciation) } +inline bool TripSignElement::has_has_text() const { + return has_text_case() != HAS_TEXT_NOT_SET; +} +inline void TripSignElement::clear_has_has_text() { + _impl_._oneof_case_[0] = HAS_TEXT_NOT_SET; +} +inline bool TripSignElement::has_has_is_route_number() const { + return has_is_route_number_case() != HAS_IS_ROUTE_NUMBER_NOT_SET; +} +inline void TripSignElement::clear_has_has_is_route_number() { + _impl_._oneof_case_[1] = HAS_IS_ROUTE_NUMBER_NOT_SET; +} +inline bool TripSignElement::has_has_consecutive_count() const { + return has_consecutive_count_case() != HAS_CONSECUTIVE_COUNT_NOT_SET; +} +inline void TripSignElement::clear_has_has_consecutive_count() { + _impl_._oneof_case_[2] = HAS_CONSECUTIVE_COUNT_NOT_SET; +} +inline TripSignElement::HasTextCase TripSignElement::has_text_case() const { + return TripSignElement::HasTextCase(_impl_._oneof_case_[0]); +} +inline TripSignElement::HasIsRouteNumberCase TripSignElement::has_is_route_number_case() const { + return TripSignElement::HasIsRouteNumberCase(_impl_._oneof_case_[1]); +} +inline TripSignElement::HasConsecutiveCountCase TripSignElement::has_consecutive_count_case() const { + return TripSignElement::HasConsecutiveCountCase(_impl_._oneof_case_[2]); +} // ------------------------------------------------------------------- // TripSign diff --git a/include/linux/valhalla/proto/status.pb.cc b/include/linux/valhalla/proto/status.pb.cc index 6e1ad24..c5810aa 100644 --- a/include/linux/valhalla/proto/status.pb.cc +++ b/include/linux/valhalla/proto/status.pb.cc @@ -20,16 +20,13 @@ namespace _pbi = _pb::internal; namespace valhalla { PROTOBUF_CONSTEXPR Status::Status( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.available_actions_)*/{} - , /*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.tileset_last_modified_)*/0u - , /*decltype(_impl_.has_has_tiles_)*/{} + /*decltype(_impl_.has_has_tiles_)*/{} , /*decltype(_impl_.has_has_admins_)*/{} , /*decltype(_impl_.has_has_timezones_)*/{} , /*decltype(_impl_.has_has_live_traffic_)*/{} , /*decltype(_impl_.has_bbox_)*/{} - , /*decltype(_impl_.has_has_transit_tiles_)*/{} - , /*decltype(_impl_.has_osm_changeset_)*/{} + , /*decltype(_impl_.has_version_)*/{} + , /*decltype(_impl_.has_tileset_last_modified_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}} {} struct StatusDefaultTypeInternal { @@ -60,29 +57,17 @@ Status::Status(const Status& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { Status* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.available_actions_){from._impl_.available_actions_} - , decltype(_impl_.version_){} - , decltype(_impl_.tileset_last_modified_){} - , decltype(_impl_.has_has_tiles_){} + decltype(_impl_.has_has_tiles_){} , decltype(_impl_.has_has_admins_){} , decltype(_impl_.has_has_timezones_){} , decltype(_impl_.has_has_live_traffic_){} , decltype(_impl_.has_bbox_){} - , decltype(_impl_.has_has_transit_tiles_){} - , decltype(_impl_.has_osm_changeset_){} + , decltype(_impl_.has_version_){} + , decltype(_impl_.has_tileset_last_modified_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_version().empty()) { - _this->_impl_.version_.Set(from._internal_version(), - _this->GetArenaForAllocation()); - } - _this->_impl_.tileset_last_modified_ = from._impl_.tileset_last_modified_; clear_has_has_has_tiles(); switch (from.has_has_tiles_case()) { case kHasTiles: { @@ -133,23 +118,23 @@ Status::Status(const Status& from) break; } } - clear_has_has_has_transit_tiles(); - switch (from.has_has_transit_tiles_case()) { - case kHasTransitTiles: { - _this->_internal_set_has_transit_tiles(from._internal_has_transit_tiles()); + clear_has_has_version(); + switch (from.has_version_case()) { + case kVersion: { + _this->_internal_set_version(from._internal_version()); break; } - case HAS_HAS_TRANSIT_TILES_NOT_SET: { + case HAS_VERSION_NOT_SET: { break; } } - clear_has_has_osm_changeset(); - switch (from.has_osm_changeset_case()) { - case kOsmChangeset: { - _this->_internal_set_osm_changeset(from._internal_osm_changeset()); + clear_has_has_tileset_last_modified(); + switch (from.has_tileset_last_modified_case()) { + case kTilesetLastModified: { + _this->_internal_set_tileset_last_modified(from._internal_tileset_last_modified()); break; } - case HAS_OSM_CHANGESET_NOT_SET: { + case HAS_TILESET_LAST_MODIFIED_NOT_SET: { break; } } @@ -161,30 +146,23 @@ inline void Status::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.available_actions_){arena} - , decltype(_impl_.version_){} - , decltype(_impl_.tileset_last_modified_){0u} - , decltype(_impl_.has_has_tiles_){} + decltype(_impl_.has_has_tiles_){} , decltype(_impl_.has_has_admins_){} , decltype(_impl_.has_has_timezones_){} , decltype(_impl_.has_has_live_traffic_){} , decltype(_impl_.has_bbox_){} - , decltype(_impl_.has_has_transit_tiles_){} - , decltype(_impl_.has_osm_changeset_){} + , decltype(_impl_.has_version_){} + , decltype(_impl_.has_tileset_last_modified_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.version_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.version_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING clear_has_has_has_tiles(); clear_has_has_has_admins(); clear_has_has_has_timezones(); clear_has_has_has_live_traffic(); clear_has_has_bbox(); - clear_has_has_has_transit_tiles(); - clear_has_has_osm_changeset(); + clear_has_has_version(); + clear_has_has_tileset_last_modified(); } Status::~Status() { @@ -198,8 +176,6 @@ Status::~Status() { inline void Status::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.available_actions_.~RepeatedPtrField(); - _impl_.version_.Destroy(); if (has_has_has_tiles()) { clear_has_has_tiles(); } @@ -215,11 +191,11 @@ inline void Status::SharedDtor() { if (has_has_bbox()) { clear_has_bbox(); } - if (has_has_has_transit_tiles()) { - clear_has_has_transit_tiles(); + if (has_has_version()) { + clear_has_version(); } - if (has_has_osm_changeset()) { - clear_has_osm_changeset(); + if (has_has_tileset_last_modified()) { + clear_has_tileset_last_modified(); } } @@ -297,32 +273,32 @@ void Status::clear_has_bbox() { _impl_._oneof_case_[4] = HAS_BBOX_NOT_SET; } -void Status::clear_has_has_transit_tiles() { +void Status::clear_has_version() { // @@protoc_insertion_point(one_of_clear_start:valhalla.Status) - switch (has_has_transit_tiles_case()) { - case kHasTransitTiles: { - // No need to clear + switch (has_version_case()) { + case kVersion: { + _impl_.has_version_.version_.Destroy(); break; } - case HAS_HAS_TRANSIT_TILES_NOT_SET: { + case HAS_VERSION_NOT_SET: { break; } } - _impl_._oneof_case_[5] = HAS_HAS_TRANSIT_TILES_NOT_SET; + _impl_._oneof_case_[5] = HAS_VERSION_NOT_SET; } -void Status::clear_has_osm_changeset() { +void Status::clear_has_tileset_last_modified() { // @@protoc_insertion_point(one_of_clear_start:valhalla.Status) - switch (has_osm_changeset_case()) { - case kOsmChangeset: { + switch (has_tileset_last_modified_case()) { + case kTilesetLastModified: { // No need to clear break; } - case HAS_OSM_CHANGESET_NOT_SET: { + case HAS_TILESET_LAST_MODIFIED_NOT_SET: { break; } } - _impl_._oneof_case_[6] = HAS_OSM_CHANGESET_NOT_SET; + _impl_._oneof_case_[6] = HAS_TILESET_LAST_MODIFIED_NOT_SET; } @@ -332,16 +308,13 @@ void Status::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.available_actions_.Clear(); - _impl_.version_.ClearToEmpty(); - _impl_.tileset_last_modified_ = 0u; clear_has_has_tiles(); clear_has_has_admins(); clear_has_has_timezones(); clear_has_has_live_traffic(); clear_has_bbox(); - clear_has_has_transit_tiles(); - clear_has_osm_changeset(); + clear_has_version(); + clear_has_tileset_last_modified(); _internal_metadata_.Clear(); } @@ -406,38 +379,7 @@ const char* Status::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { // uint32 tileset_last_modified = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.tileset_last_modified_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated string available_actions = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_available_actions(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, nullptr)); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); - } else - goto handle_unusual; - continue; - // bool has_transit_tiles = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _internal_set_has_transit_tiles(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint64 osm_changeset = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - _internal_set_osm_changeset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + _internal_set_tileset_last_modified(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -506,7 +448,7 @@ uint8_t* Status::_InternalSerialize( } // string version = 6; - if (!this->_internal_version().empty()) { + if (_internal_has_version()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_version().data(), static_cast(this->_internal_version().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -516,33 +458,11 @@ uint8_t* Status::_InternalSerialize( } // uint32 tileset_last_modified = 7; - if (this->_internal_tileset_last_modified() != 0) { + if (_internal_has_tileset_last_modified()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_tileset_last_modified(), target); } - // repeated string available_actions = 8; - for (int i = 0, n = this->_internal_available_actions_size(); i < n; i++) { - const auto& s = this->_internal_available_actions(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.Status.available_actions"); - target = stream->WriteString(8, s, target); - } - - // bool has_transit_tiles = 9; - if (_internal_has_has_transit_tiles()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_has_transit_tiles(), target); - } - - // uint64 osm_changeset = 10; - if (_internal_has_osm_changeset()) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(10, this->_internal_osm_changeset(), target); - } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); @@ -559,26 +479,6 @@ size_t Status::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated string available_actions = 8; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.available_actions_.size()); - for (int i = 0, n = _impl_.available_actions_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - _impl_.available_actions_.Get(i)); - } - - // string version = 6; - if (!this->_internal_version().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_version()); - } - - // uint32 tileset_last_modified = 7; - if (this->_internal_tileset_last_modified() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tileset_last_modified()); - } - switch (has_has_tiles_case()) { // bool has_tiles = 1; case kHasTiles: { @@ -631,23 +531,25 @@ size_t Status::ByteSizeLong() const { break; } } - switch (has_has_transit_tiles_case()) { - // bool has_transit_tiles = 9; - case kHasTransitTiles: { - total_size += 1 + 1; + switch (has_version_case()) { + // string version = 6; + case kVersion: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_version()); break; } - case HAS_HAS_TRANSIT_TILES_NOT_SET: { + case HAS_VERSION_NOT_SET: { break; } } - switch (has_osm_changeset_case()) { - // uint64 osm_changeset = 10; - case kOsmChangeset: { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_osm_changeset()); + switch (has_tileset_last_modified_case()) { + // uint32 tileset_last_modified = 7; + case kTilesetLastModified: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_tileset_last_modified()); break; } - case HAS_OSM_CHANGESET_NOT_SET: { + case HAS_TILESET_LAST_MODIFIED_NOT_SET: { break; } } @@ -672,13 +574,6 @@ void Status::MergeFrom(const Status& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.available_actions_.MergeFrom(from._impl_.available_actions_); - if (!from._internal_version().empty()) { - _this->_internal_set_version(from._internal_version()); - } - if (from._internal_tileset_last_modified() != 0) { - _this->_internal_set_tileset_last_modified(from._internal_tileset_last_modified()); - } switch (from.has_has_tiles_case()) { case kHasTiles: { _this->_internal_set_has_tiles(from._internal_has_tiles()); @@ -724,21 +619,21 @@ void Status::MergeFrom(const Status& from) { break; } } - switch (from.has_has_transit_tiles_case()) { - case kHasTransitTiles: { - _this->_internal_set_has_transit_tiles(from._internal_has_transit_tiles()); + switch (from.has_version_case()) { + case kVersion: { + _this->_internal_set_version(from._internal_version()); break; } - case HAS_HAS_TRANSIT_TILES_NOT_SET: { + case HAS_VERSION_NOT_SET: { break; } } - switch (from.has_osm_changeset_case()) { - case kOsmChangeset: { - _this->_internal_set_osm_changeset(from._internal_osm_changeset()); + switch (from.has_tileset_last_modified_case()) { + case kTilesetLastModified: { + _this->_internal_set_tileset_last_modified(from._internal_tileset_last_modified()); break; } - case HAS_OSM_CHANGESET_NOT_SET: { + case HAS_TILESET_LAST_MODIFIED_NOT_SET: { break; } } @@ -758,22 +653,14 @@ bool Status::IsInitialized() const { void Status::InternalSwap(Status* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.available_actions_.InternalSwap(&other->_impl_.available_actions_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.version_, lhs_arena, - &other->_impl_.version_, rhs_arena - ); - swap(_impl_.tileset_last_modified_, other->_impl_.tileset_last_modified_); swap(_impl_.has_has_tiles_, other->_impl_.has_has_tiles_); swap(_impl_.has_has_admins_, other->_impl_.has_has_admins_); swap(_impl_.has_has_timezones_, other->_impl_.has_has_timezones_); swap(_impl_.has_has_live_traffic_, other->_impl_.has_has_live_traffic_); swap(_impl_.has_bbox_, other->_impl_.has_bbox_); - swap(_impl_.has_has_transit_tiles_, other->_impl_.has_has_transit_tiles_); - swap(_impl_.has_osm_changeset_, other->_impl_.has_osm_changeset_); + swap(_impl_.has_version_, other->_impl_.has_version_); + swap(_impl_.has_tileset_last_modified_, other->_impl_.has_tileset_last_modified_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); diff --git a/include/linux/valhalla/proto/status.pb.h b/include/linux/valhalla/proto/status.pb.h index 1258813..81f4ed6 100644 --- a/include/linux/valhalla/proto/status.pb.h +++ b/include/linux/valhalla/proto/status.pb.h @@ -112,14 +112,14 @@ class Status final : HAS_BBOX_NOT_SET = 0, }; - enum HasHasTransitTilesCase { - kHasTransitTiles = 9, - HAS_HAS_TRANSIT_TILES_NOT_SET = 0, + enum HasVersionCase { + kVersion = 6, + HAS_VERSION_NOT_SET = 0, }; - enum HasOsmChangesetCase { - kOsmChangeset = 10, - HAS_OSM_CHANGESET_NOT_SET = 0, + enum HasTilesetLastModifiedCase { + kTilesetLastModified = 7, + HAS_TILESET_LAST_MODIFIED_NOT_SET = 0, }; static inline const Status* internal_default_instance() { @@ -191,64 +191,14 @@ class Status final : // accessors ------------------------------------------------------- enum : int { - kAvailableActionsFieldNumber = 8, - kVersionFieldNumber = 6, - kTilesetLastModifiedFieldNumber = 7, kHasTilesFieldNumber = 1, kHasAdminsFieldNumber = 2, kHasTimezonesFieldNumber = 3, kHasLiveTrafficFieldNumber = 4, kBboxFieldNumber = 5, - kHasTransitTilesFieldNumber = 9, - kOsmChangesetFieldNumber = 10, + kVersionFieldNumber = 6, + kTilesetLastModifiedFieldNumber = 7, }; - // repeated string available_actions = 8; - int available_actions_size() const; - private: - int _internal_available_actions_size() const; - public: - void clear_available_actions(); - const std::string& available_actions(int index) const; - std::string* mutable_available_actions(int index); - void set_available_actions(int index, const std::string& value); - void set_available_actions(int index, std::string&& value); - void set_available_actions(int index, const char* value); - void set_available_actions(int index, const char* value, size_t size); - std::string* add_available_actions(); - void add_available_actions(const std::string& value); - void add_available_actions(std::string&& value); - void add_available_actions(const char* value); - void add_available_actions(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& available_actions() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_available_actions(); - private: - const std::string& _internal_available_actions(int index) const; - std::string* _internal_add_available_actions(); - public: - - // string version = 6; - void clear_version(); - const std::string& version() const; - template - void set_version(ArgT0&& arg0, ArgT... args); - std::string* mutable_version(); - PROTOBUF_NODISCARD std::string* release_version(); - void set_allocated_version(std::string* version); - private: - const std::string& _internal_version() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value); - std::string* _internal_mutable_version(); - public: - - // uint32 tileset_last_modified = 7; - void clear_tileset_last_modified(); - uint32_t tileset_last_modified() const; - void set_tileset_last_modified(uint32_t value); - private: - uint32_t _internal_tileset_last_modified() const; - void _internal_set_tileset_last_modified(uint32_t value); - public: - // bool has_tiles = 1; bool has_has_tiles() const; private: @@ -319,30 +269,35 @@ class Status final : std::string* _internal_mutable_bbox(); public: - // bool has_transit_tiles = 9; - bool has_has_transit_tiles() const; + // string version = 6; + bool has_version() const; private: - bool _internal_has_has_transit_tiles() const; + bool _internal_has_version() const; public: - void clear_has_transit_tiles(); - bool has_transit_tiles() const; - void set_has_transit_tiles(bool value); + void clear_version(); + const std::string& version() const; + template + void set_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_version(); + PROTOBUF_NODISCARD std::string* release_version(); + void set_allocated_version(std::string* version); private: - bool _internal_has_transit_tiles() const; - void _internal_set_has_transit_tiles(bool value); + const std::string& _internal_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value); + std::string* _internal_mutable_version(); public: - // uint64 osm_changeset = 10; - bool has_osm_changeset() const; + // uint32 tileset_last_modified = 7; + bool has_tileset_last_modified() const; private: - bool _internal_has_osm_changeset() const; + bool _internal_has_tileset_last_modified() const; public: - void clear_osm_changeset(); - uint64_t osm_changeset() const; - void set_osm_changeset(uint64_t value); + void clear_tileset_last_modified(); + uint32_t tileset_last_modified() const; + void set_tileset_last_modified(uint32_t value); private: - uint64_t _internal_osm_changeset() const; - void _internal_set_osm_changeset(uint64_t value); + uint32_t _internal_tileset_last_modified() const; + void _internal_set_tileset_last_modified(uint32_t value); public: void clear_has_has_tiles(); @@ -355,10 +310,10 @@ class Status final : HasHasLiveTrafficCase has_has_live_traffic_case() const; void clear_has_bbox(); HasBboxCase has_bbox_case() const; - void clear_has_has_transit_tiles(); - HasHasTransitTilesCase has_has_transit_tiles_case() const; - void clear_has_osm_changeset(); - HasOsmChangesetCase has_osm_changeset_case() const; + void clear_has_version(); + HasVersionCase has_version_case() const; + void clear_has_tileset_last_modified(); + HasTilesetLastModifiedCase has_tileset_last_modified_case() const; // @@protoc_insertion_point(class_scope:valhalla.Status) private: class _Internal; @@ -367,8 +322,8 @@ class Status final : void set_has_has_timezones(); void set_has_has_live_traffic(); void set_has_bbox(); - void set_has_has_transit_tiles(); - void set_has_osm_changeset(); + void set_has_version(); + void set_has_tileset_last_modified(); inline bool has_has_has_tiles() const; inline void clear_has_has_has_tiles(); @@ -385,19 +340,16 @@ class Status final : inline bool has_has_bbox() const; inline void clear_has_has_bbox(); - inline bool has_has_has_transit_tiles() const; - inline void clear_has_has_has_transit_tiles(); + inline bool has_has_version() const; + inline void clear_has_has_version(); - inline bool has_has_osm_changeset() const; - inline void clear_has_has_osm_changeset(); + inline bool has_has_tileset_last_modified() const; + inline void clear_has_has_tileset_last_modified(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField available_actions_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; - uint32_t tileset_last_modified_; union HasHasTilesUnion { constexpr HasHasTilesUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -423,16 +375,16 @@ class Status final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bbox_; } has_bbox_; - union HasHasTransitTilesUnion { - constexpr HasHasTransitTilesUnion() : _constinit_{} {} + union HasVersionUnion { + constexpr HasVersionUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - bool has_transit_tiles_; - } has_has_transit_tiles_; - union HasOsmChangesetUnion { - constexpr HasOsmChangesetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; + } has_version_; + union HasTilesetLastModifiedUnion { + constexpr HasTilesetLastModifiedUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - uint64_t osm_changeset_; - } has_osm_changeset_; + uint32_t tileset_last_modified_; + } has_tileset_last_modified_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[7]; @@ -681,18 +633,33 @@ inline void Status::set_allocated_bbox(std::string* bbox) { } // string version = 6; +inline bool Status::_internal_has_version() const { + return has_version_case() == kVersion; +} +inline bool Status::has_version() const { + return _internal_has_version(); +} +inline void Status::set_has_version() { + _impl_._oneof_case_[5] = kVersion; +} inline void Status::clear_version() { - _impl_.version_.ClearToEmpty(); + if (_internal_has_version()) { + _impl_.has_version_.version_.Destroy(); + clear_has_has_version(); + } } inline const std::string& Status::version() const { // @@protoc_insertion_point(field_get:valhalla.Status.version) return _internal_version(); } template -inline PROTOBUF_ALWAYS_INLINE -void Status::set_version(ArgT0&& arg0, ArgT... args) { - - _impl_.version_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Status::set_version(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_version()) { + clear_has_version(); + set_has_version(); + _impl_.has_version_.version_.InitDefault(); + } + _impl_.has_version_.version_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Status.version) } inline std::string* Status::mutable_version() { @@ -701,206 +668,85 @@ inline std::string* Status::mutable_version() { return _s; } inline const std::string& Status::_internal_version() const { - return _impl_.version_.Get(); + if (_internal_has_version()) { + return _impl_.has_version_.version_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Status::_internal_set_version(const std::string& value) { - - _impl_.version_.Set(value, GetArenaForAllocation()); + if (!_internal_has_version()) { + clear_has_version(); + set_has_version(); + _impl_.has_version_.version_.InitDefault(); + } + _impl_.has_version_.version_.Set(value, GetArenaForAllocation()); } inline std::string* Status::_internal_mutable_version() { - - return _impl_.version_.Mutable(GetArenaForAllocation()); + if (!_internal_has_version()) { + clear_has_version(); + set_has_version(); + _impl_.has_version_.version_.InitDefault(); + } + return _impl_.has_version_.version_.Mutable( GetArenaForAllocation()); } inline std::string* Status::release_version() { // @@protoc_insertion_point(field_release:valhalla.Status.version) - return _impl_.version_.Release(); + if (_internal_has_version()) { + clear_has_has_version(); + return _impl_.has_version_.version_.Release(); + } else { + return nullptr; + } } inline void Status::set_allocated_version(std::string* version) { - if (version != nullptr) { - - } else { - + if (has_has_version()) { + clear_has_version(); } - _impl_.version_.SetAllocated(version, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.version_.IsDefault()) { - _impl_.version_.Set("", GetArenaForAllocation()); + if (version != nullptr) { + set_has_version(); + _impl_.has_version_.version_.InitAllocated(version, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.Status.version) } // uint32 tileset_last_modified = 7; +inline bool Status::_internal_has_tileset_last_modified() const { + return has_tileset_last_modified_case() == kTilesetLastModified; +} +inline bool Status::has_tileset_last_modified() const { + return _internal_has_tileset_last_modified(); +} +inline void Status::set_has_tileset_last_modified() { + _impl_._oneof_case_[6] = kTilesetLastModified; +} inline void Status::clear_tileset_last_modified() { - _impl_.tileset_last_modified_ = 0u; + if (_internal_has_tileset_last_modified()) { + _impl_.has_tileset_last_modified_.tileset_last_modified_ = 0u; + clear_has_has_tileset_last_modified(); + } } inline uint32_t Status::_internal_tileset_last_modified() const { - return _impl_.tileset_last_modified_; + if (_internal_has_tileset_last_modified()) { + return _impl_.has_tileset_last_modified_.tileset_last_modified_; + } + return 0u; +} +inline void Status::_internal_set_tileset_last_modified(uint32_t value) { + if (!_internal_has_tileset_last_modified()) { + clear_has_tileset_last_modified(); + set_has_tileset_last_modified(); + } + _impl_.has_tileset_last_modified_.tileset_last_modified_ = value; } inline uint32_t Status::tileset_last_modified() const { // @@protoc_insertion_point(field_get:valhalla.Status.tileset_last_modified) return _internal_tileset_last_modified(); } -inline void Status::_internal_set_tileset_last_modified(uint32_t value) { - - _impl_.tileset_last_modified_ = value; -} inline void Status::set_tileset_last_modified(uint32_t value) { _internal_set_tileset_last_modified(value); // @@protoc_insertion_point(field_set:valhalla.Status.tileset_last_modified) } -// repeated string available_actions = 8; -inline int Status::_internal_available_actions_size() const { - return _impl_.available_actions_.size(); -} -inline int Status::available_actions_size() const { - return _internal_available_actions_size(); -} -inline void Status::clear_available_actions() { - _impl_.available_actions_.Clear(); -} -inline std::string* Status::add_available_actions() { - std::string* _s = _internal_add_available_actions(); - // @@protoc_insertion_point(field_add_mutable:valhalla.Status.available_actions) - return _s; -} -inline const std::string& Status::_internal_available_actions(int index) const { - return _impl_.available_actions_.Get(index); -} -inline const std::string& Status::available_actions(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Status.available_actions) - return _internal_available_actions(index); -} -inline std::string* Status::mutable_available_actions(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Status.available_actions) - return _impl_.available_actions_.Mutable(index); -} -inline void Status::set_available_actions(int index, const std::string& value) { - _impl_.available_actions_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:valhalla.Status.available_actions) -} -inline void Status::set_available_actions(int index, std::string&& value) { - _impl_.available_actions_.Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:valhalla.Status.available_actions) -} -inline void Status::set_available_actions(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.available_actions_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:valhalla.Status.available_actions) -} -inline void Status::set_available_actions(int index, const char* value, size_t size) { - _impl_.available_actions_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:valhalla.Status.available_actions) -} -inline std::string* Status::_internal_add_available_actions() { - return _impl_.available_actions_.Add(); -} -inline void Status::add_available_actions(const std::string& value) { - _impl_.available_actions_.Add()->assign(value); - // @@protoc_insertion_point(field_add:valhalla.Status.available_actions) -} -inline void Status::add_available_actions(std::string&& value) { - _impl_.available_actions_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:valhalla.Status.available_actions) -} -inline void Status::add_available_actions(const char* value) { - GOOGLE_DCHECK(value != nullptr); - _impl_.available_actions_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:valhalla.Status.available_actions) -} -inline void Status::add_available_actions(const char* value, size_t size) { - _impl_.available_actions_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:valhalla.Status.available_actions) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -Status::available_actions() const { - // @@protoc_insertion_point(field_list:valhalla.Status.available_actions) - return _impl_.available_actions_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -Status::mutable_available_actions() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Status.available_actions) - return &_impl_.available_actions_; -} - -// bool has_transit_tiles = 9; -inline bool Status::_internal_has_has_transit_tiles() const { - return has_has_transit_tiles_case() == kHasTransitTiles; -} -inline bool Status::has_has_transit_tiles() const { - return _internal_has_has_transit_tiles(); -} -inline void Status::set_has_has_transit_tiles() { - _impl_._oneof_case_[5] = kHasTransitTiles; -} -inline void Status::clear_has_transit_tiles() { - if (_internal_has_has_transit_tiles()) { - _impl_.has_has_transit_tiles_.has_transit_tiles_ = false; - clear_has_has_has_transit_tiles(); - } -} -inline bool Status::_internal_has_transit_tiles() const { - if (_internal_has_has_transit_tiles()) { - return _impl_.has_has_transit_tiles_.has_transit_tiles_; - } - return false; -} -inline void Status::_internal_set_has_transit_tiles(bool value) { - if (!_internal_has_has_transit_tiles()) { - clear_has_has_transit_tiles(); - set_has_has_transit_tiles(); - } - _impl_.has_has_transit_tiles_.has_transit_tiles_ = value; -} -inline bool Status::has_transit_tiles() const { - // @@protoc_insertion_point(field_get:valhalla.Status.has_transit_tiles) - return _internal_has_transit_tiles(); -} -inline void Status::set_has_transit_tiles(bool value) { - _internal_set_has_transit_tiles(value); - // @@protoc_insertion_point(field_set:valhalla.Status.has_transit_tiles) -} - -// uint64 osm_changeset = 10; -inline bool Status::_internal_has_osm_changeset() const { - return has_osm_changeset_case() == kOsmChangeset; -} -inline bool Status::has_osm_changeset() const { - return _internal_has_osm_changeset(); -} -inline void Status::set_has_osm_changeset() { - _impl_._oneof_case_[6] = kOsmChangeset; -} -inline void Status::clear_osm_changeset() { - if (_internal_has_osm_changeset()) { - _impl_.has_osm_changeset_.osm_changeset_ = uint64_t{0u}; - clear_has_has_osm_changeset(); - } -} -inline uint64_t Status::_internal_osm_changeset() const { - if (_internal_has_osm_changeset()) { - return _impl_.has_osm_changeset_.osm_changeset_; - } - return uint64_t{0u}; -} -inline void Status::_internal_set_osm_changeset(uint64_t value) { - if (!_internal_has_osm_changeset()) { - clear_has_osm_changeset(); - set_has_osm_changeset(); - } - _impl_.has_osm_changeset_.osm_changeset_ = value; -} -inline uint64_t Status::osm_changeset() const { - // @@protoc_insertion_point(field_get:valhalla.Status.osm_changeset) - return _internal_osm_changeset(); -} -inline void Status::set_osm_changeset(uint64_t value) { - _internal_set_osm_changeset(value); - // @@protoc_insertion_point(field_set:valhalla.Status.osm_changeset) -} - inline bool Status::has_has_has_tiles() const { return has_has_tiles_case() != HAS_HAS_TILES_NOT_SET; } @@ -931,17 +777,17 @@ inline bool Status::has_has_bbox() const { inline void Status::clear_has_has_bbox() { _impl_._oneof_case_[4] = HAS_BBOX_NOT_SET; } -inline bool Status::has_has_has_transit_tiles() const { - return has_has_transit_tiles_case() != HAS_HAS_TRANSIT_TILES_NOT_SET; +inline bool Status::has_has_version() const { + return has_version_case() != HAS_VERSION_NOT_SET; } -inline void Status::clear_has_has_has_transit_tiles() { - _impl_._oneof_case_[5] = HAS_HAS_TRANSIT_TILES_NOT_SET; +inline void Status::clear_has_has_version() { + _impl_._oneof_case_[5] = HAS_VERSION_NOT_SET; } -inline bool Status::has_has_osm_changeset() const { - return has_osm_changeset_case() != HAS_OSM_CHANGESET_NOT_SET; +inline bool Status::has_has_tileset_last_modified() const { + return has_tileset_last_modified_case() != HAS_TILESET_LAST_MODIFIED_NOT_SET; } -inline void Status::clear_has_has_osm_changeset() { - _impl_._oneof_case_[6] = HAS_OSM_CHANGESET_NOT_SET; +inline void Status::clear_has_has_tileset_last_modified() { + _impl_._oneof_case_[6] = HAS_TILESET_LAST_MODIFIED_NOT_SET; } inline Status::HasHasTilesCase Status::has_has_tiles_case() const { return Status::HasHasTilesCase(_impl_._oneof_case_[0]); @@ -958,11 +804,11 @@ inline Status::HasHasLiveTrafficCase Status::has_has_live_traffic_case() const { inline Status::HasBboxCase Status::has_bbox_case() const { return Status::HasBboxCase(_impl_._oneof_case_[4]); } -inline Status::HasHasTransitTilesCase Status::has_has_transit_tiles_case() const { - return Status::HasHasTransitTilesCase(_impl_._oneof_case_[5]); +inline Status::HasVersionCase Status::has_version_case() const { + return Status::HasVersionCase(_impl_._oneof_case_[5]); } -inline Status::HasOsmChangesetCase Status::has_osm_changeset_case() const { - return Status::HasOsmChangesetCase(_impl_._oneof_case_[6]); +inline Status::HasTilesetLastModifiedCase Status::has_tileset_last_modified_case() const { + return Status::HasTilesetLastModifiedCase(_impl_._oneof_case_[6]); } #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/include/linux/valhalla/proto/transit.pb.cc b/include/linux/valhalla/proto/transit.pb.cc index 7150fe1..95b0846 100644 --- a/include/linux/valhalla/proto/transit.pb.cc +++ b/include/linux/valhalla/proto/transit.pb.cc @@ -30,12 +30,10 @@ PROTOBUF_CONSTEXPR Transit_Node::Transit_Node( , /*decltype(_impl_.lat_)*/0 , /*decltype(_impl_.graphid_)*/uint64_t{0u} , /*decltype(_impl_.prev_type_graphid_)*/uint64_t{0u} - , /*decltype(_impl_.osm_connecting_way_id_)*/uint64_t{0u} + , /*decltype(_impl_.osm_way_id_)*/uint64_t{0u} , /*decltype(_impl_.type_)*/0u , /*decltype(_impl_.wheelchair_boarding_)*/false , /*decltype(_impl_.generated_)*/false - , /*decltype(_impl_.osm_connecting_lon_)*/0 - , /*decltype(_impl_.osm_connecting_lat_)*/0 , /*decltype(_impl_.traversability_)*/0u} {} struct Transit_NodeDefaultTypeInternal { PROTOBUF_CONSTEXPR Transit_NodeDefaultTypeInternal() @@ -255,7 +253,7 @@ class Transit_Node::_Internal { static void set_has_onestop_id(HasBits* has_bits) { (*has_bits)[0] |= 2u; } - static void set_has_osm_connecting_way_id(HasBits* has_bits) { + static void set_has_osm_way_id(HasBits* has_bits) { (*has_bits)[0] |= 128u; } static void set_has_timezone(HasBits* has_bits) { @@ -268,14 +266,8 @@ class Transit_Node::_Internal { (*has_bits)[0] |= 1024u; } static void set_has_traversability(HasBits* has_bits) { - (*has_bits)[0] |= 8192u; - } - static void set_has_osm_connecting_lon(HasBits* has_bits) { (*has_bits)[0] |= 2048u; } - static void set_has_osm_connecting_lat(HasBits* has_bits) { - (*has_bits)[0] |= 4096u; - } }; Transit_Node::Transit_Node(::PROTOBUF_NAMESPACE_ID::Arena* arena, @@ -297,12 +289,10 @@ Transit_Node::Transit_Node(const Transit_Node& from) , decltype(_impl_.lat_){} , decltype(_impl_.graphid_){} , decltype(_impl_.prev_type_graphid_){} - , decltype(_impl_.osm_connecting_way_id_){} + , decltype(_impl_.osm_way_id_){} , decltype(_impl_.type_){} , decltype(_impl_.wheelchair_boarding_){} , decltype(_impl_.generated_){} - , decltype(_impl_.osm_connecting_lon_){} - , decltype(_impl_.osm_connecting_lat_){} , decltype(_impl_.traversability_){}}; _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -350,12 +340,10 @@ inline void Transit_Node::SharedCtor( , decltype(_impl_.lat_){0} , decltype(_impl_.graphid_){uint64_t{0u}} , decltype(_impl_.prev_type_graphid_){uint64_t{0u}} - , decltype(_impl_.osm_connecting_way_id_){uint64_t{0u}} + , decltype(_impl_.osm_way_id_){uint64_t{0u}} , decltype(_impl_.type_){0u} , decltype(_impl_.wheelchair_boarding_){false} , decltype(_impl_.generated_){false} - , decltype(_impl_.osm_connecting_lon_){0} - , decltype(_impl_.osm_connecting_lat_){0} , decltype(_impl_.traversability_){0u} }; _impl_.name_.InitDefault(); @@ -412,10 +400,10 @@ void Transit_Node::Clear() { } if (cached_has_bits & 0x000000f8u) { ::memset(&_impl_.lon_, 0, static_cast( - reinterpret_cast(&_impl_.osm_connecting_way_id_) - - reinterpret_cast(&_impl_.lon_)) + sizeof(_impl_.osm_connecting_way_id_)); + reinterpret_cast(&_impl_.osm_way_id_) - + reinterpret_cast(&_impl_.lon_)) + sizeof(_impl_.osm_way_id_)); } - if (cached_has_bits & 0x00003f00u) { + if (cached_has_bits & 0x00000f00u) { ::memset(&_impl_.type_, 0, static_cast( reinterpret_cast(&_impl_.traversability_) - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.traversability_)); @@ -431,21 +419,21 @@ const char* Transit_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // optional double lon = 1; + // optional float lon = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 9)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 13)) { _Internal::set_has_lon(&has_bits); - _impl_.lon_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); + _impl_.lon_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); } else goto handle_unusual; continue; - // optional double lat = 2; + // optional float lat = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { _Internal::set_has_lat(&has_bits); - _impl_.lat_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); + _impl_.lat_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); } else goto handle_unusual; continue; @@ -494,11 +482,11 @@ const char* Transit_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // optional uint64 osm_connecting_way_id = 8; + // optional uint64 osm_way_id = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _Internal::set_has_osm_connecting_way_id(&has_bits); - _impl_.osm_connecting_way_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _Internal::set_has_osm_way_id(&has_bits); + _impl_.osm_way_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -539,24 +527,6 @@ const char* Transit_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // optional double osm_connecting_lon = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 105)) { - _Internal::set_has_osm_connecting_lon(&has_bits); - _impl_.osm_connecting_lon_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // optional double osm_connecting_lat = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 113)) { - _Internal::set_has_osm_connecting_lat(&has_bits); - _impl_.osm_connecting_lat_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -588,16 +558,16 @@ uint8_t* Transit_Node::_InternalSerialize( (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - // optional double lon = 1; + // optional float lon = 1; if (cached_has_bits & 0x00000008u) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_lon(), target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_lon(), target); } - // optional double lat = 2; + // optional float lat = 2; if (cached_has_bits & 0x00000010u) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_lat(), target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_lat(), target); } // optional uint32 type = 3; @@ -630,10 +600,10 @@ uint8_t* Transit_Node::_InternalSerialize( 7, this->_internal_onestop_id(), target); } - // optional uint64 osm_connecting_way_id = 8; + // optional uint64 osm_way_id = 8; if (cached_has_bits & 0x00000080u) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_osm_connecting_way_id(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_osm_way_id(), target); } // optional string timezone = 9; @@ -655,21 +625,9 @@ uint8_t* Transit_Node::_InternalSerialize( } // optional uint32 traversability = 12; - if (cached_has_bits & 0x00002000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(12, this->_internal_traversability(), target); - } - - // optional double osm_connecting_lon = 13; if (cached_has_bits & 0x00000800u) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(13, this->_internal_osm_connecting_lon(), target); - } - - // optional double osm_connecting_lat = 14; - if (cached_has_bits & 0x00001000u) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(14, this->_internal_osm_connecting_lat(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(12, this->_internal_traversability(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -711,14 +669,14 @@ size_t Transit_Node::ByteSizeLong() const { this->_internal_timezone()); } - // optional double lon = 1; + // optional float lon = 1; if (cached_has_bits & 0x00000008u) { - total_size += 1 + 8; + total_size += 1 + 4; } - // optional double lat = 2; + // optional float lat = 2; if (cached_has_bits & 0x00000010u) { - total_size += 1 + 8; + total_size += 1 + 4; } // optional uint64 graphid = 4; @@ -731,13 +689,13 @@ size_t Transit_Node::ByteSizeLong() const { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_prev_type_graphid()); } - // optional uint64 osm_connecting_way_id = 8; + // optional uint64 osm_way_id = 8; if (cached_has_bits & 0x00000080u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_osm_connecting_way_id()); + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_osm_way_id()); } } - if (cached_has_bits & 0x00003f00u) { + if (cached_has_bits & 0x00000f00u) { // optional uint32 type = 3; if (cached_has_bits & 0x00000100u) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type()); @@ -753,18 +711,8 @@ size_t Transit_Node::ByteSizeLong() const { total_size += 1 + 1; } - // optional double osm_connecting_lon = 13; - if (cached_has_bits & 0x00000800u) { - total_size += 1 + 8; - } - - // optional double osm_connecting_lat = 14; - if (cached_has_bits & 0x00001000u) { - total_size += 1 + 8; - } - // optional uint32 traversability = 12; - if (cached_has_bits & 0x00002000u) { + if (cached_has_bits & 0x00000800u) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_traversability()); } @@ -814,11 +762,11 @@ void Transit_Node::MergeFrom(const Transit_Node& from) { _this->_impl_.prev_type_graphid_ = from._impl_.prev_type_graphid_; } if (cached_has_bits & 0x00000080u) { - _this->_impl_.osm_connecting_way_id_ = from._impl_.osm_connecting_way_id_; + _this->_impl_.osm_way_id_ = from._impl_.osm_way_id_; } _this->_impl_._has_bits_[0] |= cached_has_bits; } - if (cached_has_bits & 0x00003f00u) { + if (cached_has_bits & 0x00000f00u) { if (cached_has_bits & 0x00000100u) { _this->_impl_.type_ = from._impl_.type_; } @@ -829,12 +777,6 @@ void Transit_Node::MergeFrom(const Transit_Node& from) { _this->_impl_.generated_ = from._impl_.generated_; } if (cached_has_bits & 0x00000800u) { - _this->_impl_.osm_connecting_lon_ = from._impl_.osm_connecting_lon_; - } - if (cached_has_bits & 0x00001000u) { - _this->_impl_.osm_connecting_lat_ = from._impl_.osm_connecting_lat_; - } - if (cached_has_bits & 0x00002000u) { _this->_impl_.traversability_ = from._impl_.traversability_; } _this->_impl_._has_bits_[0] |= cached_has_bits; diff --git a/include/linux/valhalla/proto/transit.pb.h b/include/linux/valhalla/proto/transit.pb.h index d7f12e2..a29f1b3 100644 --- a/include/linux/valhalla/proto/transit.pb.h +++ b/include/linux/valhalla/proto/transit.pb.h @@ -215,12 +215,10 @@ class Transit_Node final : kLatFieldNumber = 2, kGraphidFieldNumber = 4, kPrevTypeGraphidFieldNumber = 5, - kOsmConnectingWayIdFieldNumber = 8, + kOsmWayIdFieldNumber = 8, kTypeFieldNumber = 3, kWheelchairBoardingFieldNumber = 10, kGeneratedFieldNumber = 11, - kOsmConnectingLonFieldNumber = 13, - kOsmConnectingLatFieldNumber = 14, kTraversabilityFieldNumber = 12, }; // optional string name = 6; @@ -277,30 +275,30 @@ class Transit_Node final : std::string* _internal_mutable_timezone(); public: - // optional double lon = 1; + // optional float lon = 1; bool has_lon() const; private: bool _internal_has_lon() const; public: void clear_lon(); - double lon() const; - void set_lon(double value); + float lon() const; + void set_lon(float value); private: - double _internal_lon() const; - void _internal_set_lon(double value); + float _internal_lon() const; + void _internal_set_lon(float value); public: - // optional double lat = 2; + // optional float lat = 2; bool has_lat() const; private: bool _internal_has_lat() const; public: void clear_lat(); - double lat() const; - void set_lat(double value); + float lat() const; + void set_lat(float value); private: - double _internal_lat() const; - void _internal_set_lat(double value); + float _internal_lat() const; + void _internal_set_lat(float value); public: // optional uint64 graphid = 4; @@ -329,17 +327,17 @@ class Transit_Node final : void _internal_set_prev_type_graphid(uint64_t value); public: - // optional uint64 osm_connecting_way_id = 8; - bool has_osm_connecting_way_id() const; + // optional uint64 osm_way_id = 8; + bool has_osm_way_id() const; private: - bool _internal_has_osm_connecting_way_id() const; + bool _internal_has_osm_way_id() const; public: - void clear_osm_connecting_way_id(); - uint64_t osm_connecting_way_id() const; - void set_osm_connecting_way_id(uint64_t value); + void clear_osm_way_id(); + uint64_t osm_way_id() const; + void set_osm_way_id(uint64_t value); private: - uint64_t _internal_osm_connecting_way_id() const; - void _internal_set_osm_connecting_way_id(uint64_t value); + uint64_t _internal_osm_way_id() const; + void _internal_set_osm_way_id(uint64_t value); public: // optional uint32 type = 3; @@ -381,32 +379,6 @@ class Transit_Node final : void _internal_set_generated(bool value); public: - // optional double osm_connecting_lon = 13; - bool has_osm_connecting_lon() const; - private: - bool _internal_has_osm_connecting_lon() const; - public: - void clear_osm_connecting_lon(); - double osm_connecting_lon() const; - void set_osm_connecting_lon(double value); - private: - double _internal_osm_connecting_lon() const; - void _internal_set_osm_connecting_lon(double value); - public: - - // optional double osm_connecting_lat = 14; - bool has_osm_connecting_lat() const; - private: - bool _internal_has_osm_connecting_lat() const; - public: - void clear_osm_connecting_lat(); - double osm_connecting_lat() const; - void set_osm_connecting_lat(double value); - private: - double _internal_osm_connecting_lat() const; - void _internal_set_osm_connecting_lat(double value); - public: - // optional uint32 traversability = 12; bool has_traversability() const; private: @@ -433,16 +405,14 @@ class Transit_Node final : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr timezone_; - double lon_; - double lat_; + float lon_; + float lat_; uint64_t graphid_; uint64_t prev_type_graphid_; - uint64_t osm_connecting_way_id_; + uint64_t osm_way_id_; uint32_t type_; bool wheelchair_boarding_; bool generated_; - double osm_connecting_lon_; - double osm_connecting_lat_; uint32_t traversability_; }; union { Impl_ _impl_; }; @@ -1701,7 +1671,7 @@ class Transit final : #endif // __GNUC__ // Transit_Node -// optional double lon = 1; +// optional float lon = 1; inline bool Transit_Node::_internal_has_lon() const { bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; return value; @@ -1713,23 +1683,23 @@ inline void Transit_Node::clear_lon() { _impl_.lon_ = 0; _impl_._has_bits_[0] &= ~0x00000008u; } -inline double Transit_Node::_internal_lon() const { +inline float Transit_Node::_internal_lon() const { return _impl_.lon_; } -inline double Transit_Node::lon() const { +inline float Transit_Node::lon() const { // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.lon) return _internal_lon(); } -inline void Transit_Node::_internal_set_lon(double value) { +inline void Transit_Node::_internal_set_lon(float value) { _impl_._has_bits_[0] |= 0x00000008u; _impl_.lon_ = value; } -inline void Transit_Node::set_lon(double value) { +inline void Transit_Node::set_lon(float value) { _internal_set_lon(value); // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.lon) } -// optional double lat = 2; +// optional float lat = 2; inline bool Transit_Node::_internal_has_lat() const { bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; return value; @@ -1741,18 +1711,18 @@ inline void Transit_Node::clear_lat() { _impl_.lat_ = 0; _impl_._has_bits_[0] &= ~0x00000010u; } -inline double Transit_Node::_internal_lat() const { +inline float Transit_Node::_internal_lat() const { return _impl_.lat_; } -inline double Transit_Node::lat() const { +inline float Transit_Node::lat() const { // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.lat) return _internal_lat(); } -inline void Transit_Node::_internal_set_lat(double value) { +inline void Transit_Node::_internal_set_lat(float value) { _impl_._has_bits_[0] |= 0x00000010u; _impl_.lat_ = value; } -inline void Transit_Node::set_lat(double value) { +inline void Transit_Node::set_lat(float value) { _internal_set_lat(value); // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.lat) } @@ -1977,32 +1947,32 @@ inline void Transit_Node::set_allocated_onestop_id(std::string* onestop_id) { // @@protoc_insertion_point(field_set_allocated:valhalla.mjolnir.Transit.Node.onestop_id) } -// optional uint64 osm_connecting_way_id = 8; -inline bool Transit_Node::_internal_has_osm_connecting_way_id() const { +// optional uint64 osm_way_id = 8; +inline bool Transit_Node::_internal_has_osm_way_id() const { bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; return value; } -inline bool Transit_Node::has_osm_connecting_way_id() const { - return _internal_has_osm_connecting_way_id(); +inline bool Transit_Node::has_osm_way_id() const { + return _internal_has_osm_way_id(); } -inline void Transit_Node::clear_osm_connecting_way_id() { - _impl_.osm_connecting_way_id_ = uint64_t{0u}; +inline void Transit_Node::clear_osm_way_id() { + _impl_.osm_way_id_ = uint64_t{0u}; _impl_._has_bits_[0] &= ~0x00000080u; } -inline uint64_t Transit_Node::_internal_osm_connecting_way_id() const { - return _impl_.osm_connecting_way_id_; +inline uint64_t Transit_Node::_internal_osm_way_id() const { + return _impl_.osm_way_id_; } -inline uint64_t Transit_Node::osm_connecting_way_id() const { - // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.osm_connecting_way_id) - return _internal_osm_connecting_way_id(); +inline uint64_t Transit_Node::osm_way_id() const { + // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.osm_way_id) + return _internal_osm_way_id(); } -inline void Transit_Node::_internal_set_osm_connecting_way_id(uint64_t value) { +inline void Transit_Node::_internal_set_osm_way_id(uint64_t value) { _impl_._has_bits_[0] |= 0x00000080u; - _impl_.osm_connecting_way_id_ = value; + _impl_.osm_way_id_ = value; } -inline void Transit_Node::set_osm_connecting_way_id(uint64_t value) { - _internal_set_osm_connecting_way_id(value); - // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.osm_connecting_way_id) +inline void Transit_Node::set_osm_way_id(uint64_t value) { + _internal_set_osm_way_id(value); + // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.osm_way_id) } // optional string timezone = 9; @@ -2131,7 +2101,7 @@ inline void Transit_Node::set_generated(bool value) { // optional uint32 traversability = 12; inline bool Transit_Node::_internal_has_traversability() const { - bool value = (_impl_._has_bits_[0] & 0x00002000u) != 0; + bool value = (_impl_._has_bits_[0] & 0x00000800u) != 0; return value; } inline bool Transit_Node::has_traversability() const { @@ -2139,7 +2109,7 @@ inline bool Transit_Node::has_traversability() const { } inline void Transit_Node::clear_traversability() { _impl_.traversability_ = 0u; - _impl_._has_bits_[0] &= ~0x00002000u; + _impl_._has_bits_[0] &= ~0x00000800u; } inline uint32_t Transit_Node::_internal_traversability() const { return _impl_.traversability_; @@ -2149,7 +2119,7 @@ inline uint32_t Transit_Node::traversability() const { return _internal_traversability(); } inline void Transit_Node::_internal_set_traversability(uint32_t value) { - _impl_._has_bits_[0] |= 0x00002000u; + _impl_._has_bits_[0] |= 0x00000800u; _impl_.traversability_ = value; } inline void Transit_Node::set_traversability(uint32_t value) { @@ -2157,62 +2127,6 @@ inline void Transit_Node::set_traversability(uint32_t value) { // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.traversability) } -// optional double osm_connecting_lon = 13; -inline bool Transit_Node::_internal_has_osm_connecting_lon() const { - bool value = (_impl_._has_bits_[0] & 0x00000800u) != 0; - return value; -} -inline bool Transit_Node::has_osm_connecting_lon() const { - return _internal_has_osm_connecting_lon(); -} -inline void Transit_Node::clear_osm_connecting_lon() { - _impl_.osm_connecting_lon_ = 0; - _impl_._has_bits_[0] &= ~0x00000800u; -} -inline double Transit_Node::_internal_osm_connecting_lon() const { - return _impl_.osm_connecting_lon_; -} -inline double Transit_Node::osm_connecting_lon() const { - // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.osm_connecting_lon) - return _internal_osm_connecting_lon(); -} -inline void Transit_Node::_internal_set_osm_connecting_lon(double value) { - _impl_._has_bits_[0] |= 0x00000800u; - _impl_.osm_connecting_lon_ = value; -} -inline void Transit_Node::set_osm_connecting_lon(double value) { - _internal_set_osm_connecting_lon(value); - // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.osm_connecting_lon) -} - -// optional double osm_connecting_lat = 14; -inline bool Transit_Node::_internal_has_osm_connecting_lat() const { - bool value = (_impl_._has_bits_[0] & 0x00001000u) != 0; - return value; -} -inline bool Transit_Node::has_osm_connecting_lat() const { - return _internal_has_osm_connecting_lat(); -} -inline void Transit_Node::clear_osm_connecting_lat() { - _impl_.osm_connecting_lat_ = 0; - _impl_._has_bits_[0] &= ~0x00001000u; -} -inline double Transit_Node::_internal_osm_connecting_lat() const { - return _impl_.osm_connecting_lat_; -} -inline double Transit_Node::osm_connecting_lat() const { - // @@protoc_insertion_point(field_get:valhalla.mjolnir.Transit.Node.osm_connecting_lat) - return _internal_osm_connecting_lat(); -} -inline void Transit_Node::_internal_set_osm_connecting_lat(double value) { - _impl_._has_bits_[0] |= 0x00001000u; - _impl_.osm_connecting_lat_ = value; -} -inline void Transit_Node::set_osm_connecting_lat(double value) { - _internal_set_osm_connecting_lat(value); - // @@protoc_insertion_point(field_set:valhalla.mjolnir.Transit.Node.osm_connecting_lat) -} - // ------------------------------------------------------------------- // Transit_StopPair diff --git a/include/linux/valhalla/proto/trip.pb.cc b/include/linux/valhalla/proto/trip.pb.cc index d13808b..b5b31e9 100644 --- a/include/linux/valhalla/proto/trip.pb.cc +++ b/include/linux/valhalla/proto/trip.pb.cc @@ -20,10 +20,11 @@ namespace _pbi = _pb::internal; namespace valhalla { PROTOBUF_CONSTEXPR TripLeg_LaneConnectivity::TripLeg_LaneConnectivity( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.from_lanes_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.to_lanes_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.from_way_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_from_way_id_)*/{} + , /*decltype(_impl_.has_from_lanes_)*/{} + , /*decltype(_impl_.has_to_lanes_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_LaneConnectivityDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_LaneConnectivityDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -35,12 +36,13 @@ struct TripLeg_LaneConnectivityDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TripLeg_LaneConnectivityDefaultTypeInternal _TripLeg_LaneConnectivity_default_instance_; PROTOBUF_CONSTEXPR TripLeg_TrafficSegment::TripLeg_TrafficSegment( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.segment_id_)*/uint64_t{0u} - , /*decltype(_impl_.begin_percent_)*/0 - , /*decltype(_impl_.end_percent_)*/0 - , /*decltype(_impl_.starts_segment_)*/false - , /*decltype(_impl_.ends_segment_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_segment_id_)*/{} + , /*decltype(_impl_.has_begin_percent_)*/{} + , /*decltype(_impl_.has_end_percent_)*/{} + , /*decltype(_impl_.has_starts_segment_)*/{} + , /*decltype(_impl_.has_ends_segment_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_TrafficSegmentDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_TrafficSegmentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -52,8 +54,9 @@ struct TripLeg_TrafficSegmentDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TripLeg_TrafficSegmentDefaultTypeInternal _TripLeg_TrafficSegment_default_instance_; PROTOBUF_CONSTEXPR TripLeg_Restriction::TripLeg_Restriction( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.type_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_RestrictionDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_RestrictionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -73,52 +76,54 @@ PROTOBUF_CONSTEXPR TripLeg_Edge::TripLeg_Edge( , /*decltype(_impl_.sign_)*/nullptr , /*decltype(_impl_.transit_route_info_)*/nullptr , /*decltype(_impl_.restriction_)*/nullptr - , /*decltype(_impl_.length_km_)*/0 - , /*decltype(_impl_.speed_)*/0 - , /*decltype(_impl_.road_class_)*/0 - , /*decltype(_impl_.begin_heading_)*/0u - , /*decltype(_impl_.end_heading_)*/0u - , /*decltype(_impl_.begin_shape_index_)*/0u - , /*decltype(_impl_.end_shape_index_)*/0u - , /*decltype(_impl_.traversability_)*/0 - , /*decltype(_impl_.use_)*/0 - , /*decltype(_impl_.toll_)*/false - , /*decltype(_impl_.unpaved_)*/false - , /*decltype(_impl_.tunnel_)*/false - , /*decltype(_impl_.bridge_)*/false - , /*decltype(_impl_.surface_)*/0 - , /*decltype(_impl_.travel_mode_)*/0 - , /*decltype(_impl_.roundabout_)*/false - , /*decltype(_impl_.internal_intersection_)*/false - , /*decltype(_impl_.drive_on_left_)*/false - , /*decltype(_impl_.bicycle_network_)*/false - , /*decltype(_impl_.vehicle_type_)*/0 - , /*decltype(_impl_.pedestrian_type_)*/0 - , /*decltype(_impl_.bicycle_type_)*/0 - , /*decltype(_impl_.id_)*/uint64_t{0u} - , /*decltype(_impl_.transit_type_)*/0 - , /*decltype(_impl_.weighted_grade_)*/0 - , /*decltype(_impl_.way_id_)*/uint64_t{0u} - , /*decltype(_impl_.max_upward_grade_)*/0 - , /*decltype(_impl_.max_downward_grade_)*/0 - , /*decltype(_impl_.lane_count_)*/0u - , /*decltype(_impl_.cycle_lane_)*/0 - , /*decltype(_impl_.sidewalk_)*/0 - , /*decltype(_impl_.density_)*/0u - , /*decltype(_impl_.speed_limit_)*/0u - , /*decltype(_impl_.truck_speed_)*/0 - , /*decltype(_impl_.mean_elevation_)*/0 - , /*decltype(_impl_.truck_route_)*/false - , /*decltype(_impl_.has_time_restrictions_)*/false - , /*decltype(_impl_.destination_only_)*/false - , /*decltype(_impl_.is_urban_)*/false - , /*decltype(_impl_.default_speed_)*/0 - , /*decltype(_impl_.source_along_edge_)*/0 - , /*decltype(_impl_.target_along_edge_)*/0 - , /*decltype(_impl_.sac_scale_)*/0 - , /*decltype(_impl_.shoulder_)*/false - , /*decltype(_impl_.indoor_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_length_km_)*/{} + , /*decltype(_impl_.has_speed_)*/{} + , /*decltype(_impl_.has_road_class_)*/{} + , /*decltype(_impl_.has_begin_heading_)*/{} + , /*decltype(_impl_.has_end_heading_)*/{} + , /*decltype(_impl_.has_begin_shape_index_)*/{} + , /*decltype(_impl_.has_end_shape_index_)*/{} + , /*decltype(_impl_.has_traversability_)*/{} + , /*decltype(_impl_.has_use_)*/{} + , /*decltype(_impl_.has_toll_)*/{} + , /*decltype(_impl_.has_unpaved_)*/{} + , /*decltype(_impl_.has_tunnel_)*/{} + , /*decltype(_impl_.has_bridge_)*/{} + , /*decltype(_impl_.has_roundabout_)*/{} + , /*decltype(_impl_.has_internal_intersection_)*/{} + , /*decltype(_impl_.has_drive_on_left_)*/{} + , /*decltype(_impl_.has_surface_)*/{} + , /*decltype(_impl_.has_travel_mode_)*/{} + , /*decltype(_impl_.has_vehicle_type_)*/{} + , /*decltype(_impl_.has_pedestrian_type_)*/{} + , /*decltype(_impl_.has_bicycle_type_)*/{} + , /*decltype(_impl_.has_transit_type_)*/{} + , /*decltype(_impl_.has_id_)*/{} + , /*decltype(_impl_.has_way_id_)*/{} + , /*decltype(_impl_.has_weighted_grade_)*/{} + , /*decltype(_impl_.has_max_upward_grade_)*/{} + , /*decltype(_impl_.has_max_downward_grade_)*/{} + , /*decltype(_impl_.has_lane_count_)*/{} + , /*decltype(_impl_.has_cycle_lane_)*/{} + , /*decltype(_impl_.has_bicycle_network_)*/{} + , /*decltype(_impl_.has_sidewalk_)*/{} + , /*decltype(_impl_.has_density_)*/{} + , /*decltype(_impl_.has_speed_limit_)*/{} + , /*decltype(_impl_.has_truck_speed_)*/{} + , /*decltype(_impl_.has_truck_route_)*/{} + , /*decltype(_impl_.has_mean_elevation_)*/{} + , /*decltype(_impl_.has_has_time_restrictions_)*/{} + , /*decltype(_impl_.has_default_speed_)*/{} + , /*decltype(_impl_.has_destination_only_)*/{} + , /*decltype(_impl_.has_is_urban_)*/{} + , /*decltype(_impl_.has_source_along_edge_)*/{} + , /*decltype(_impl_.has_target_along_edge_)*/{} + , /*decltype(_impl_.has_sac_scale_)*/{} + , /*decltype(_impl_.has_shoulder_)*/{} + , /*decltype(_impl_.has_total_length_km_)*/{} + , /*decltype(_impl_.has_shortcut_id_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_EdgeDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_EdgeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -131,16 +136,17 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR TripLeg_IntersectingEdge::TripLeg_IntersectingEdge( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.sign_)*/nullptr - , /*decltype(_impl_.begin_heading_)*/0u - , /*decltype(_impl_.prev_name_consistency_)*/false - , /*decltype(_impl_.curr_name_consistency_)*/false - , /*decltype(_impl_.driveability_)*/0 - , /*decltype(_impl_.cyclability_)*/0 - , /*decltype(_impl_.walkability_)*/0 - , /*decltype(_impl_.use_)*/0 - , /*decltype(_impl_.road_class_)*/0 - , /*decltype(_impl_.lane_count_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_begin_heading_)*/{} + , /*decltype(_impl_.has_prev_name_consistency_)*/{} + , /*decltype(_impl_.has_curr_name_consistency_)*/{} + , /*decltype(_impl_.has_driveability_)*/{} + , /*decltype(_impl_.has_cyclability_)*/{} + , /*decltype(_impl_.has_walkability_)*/{} + , /*decltype(_impl_.has_use_)*/{} + , /*decltype(_impl_.has_road_class_)*/{} + , /*decltype(_impl_.has_lane_count_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_IntersectingEdgeDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_IntersectingEdgeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -152,9 +158,10 @@ struct TripLeg_IntersectingEdgeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TripLeg_IntersectingEdgeDefaultTypeInternal _TripLeg_IntersectingEdge_default_instance_; PROTOBUF_CONSTEXPR TripLeg_Cost::TripLeg_Cost( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.seconds_)*/0 - , /*decltype(_impl_.cost_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_seconds_)*/{} + , /*decltype(_impl_.has_cost_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_CostDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_CostDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -182,17 +189,18 @@ PROTOBUF_CONSTEXPR TripLeg_Node::TripLeg_Node( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.intersecting_edge_)*/{} , /*decltype(_impl_.recosts_)*/{} - , /*decltype(_impl_.time_zone_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.edge_)*/nullptr , /*decltype(_impl_.transit_platform_info_)*/nullptr , /*decltype(_impl_.transit_station_info_)*/nullptr , /*decltype(_impl_.transit_egress_info_)*/nullptr , /*decltype(_impl_.cost_)*/nullptr , /*decltype(_impl_.bss_info_)*/nullptr - , /*decltype(_impl_.admin_index_)*/0u - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_.fork_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_admin_index_)*/{} + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_.has_fork_)*/{} + , /*decltype(_impl_.has_time_zone_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_NodeDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_NodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -204,11 +212,12 @@ struct TripLeg_NodeDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TripLeg_NodeDefaultTypeInternal _TripLeg_Node_default_instance_; PROTOBUF_CONSTEXPR TripLeg_Admin::TripLeg_Admin( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.country_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.country_text_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.state_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.state_text_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_country_code_)*/{} + , /*decltype(_impl_.has_country_text_)*/{} + , /*decltype(_impl_.has_state_code_)*/{} + , /*decltype(_impl_.has_state_text_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_AdminDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_AdminDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -241,9 +250,10 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR TripLeg_Incident::TripLeg_Incident( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.metadata_)*/nullptr - , /*decltype(_impl_.begin_shape_index_)*/0u - , /*decltype(_impl_.end_shape_index_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_begin_shape_index_)*/{} + , /*decltype(_impl_.has_end_shape_index_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLeg_IncidentDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLeg_IncidentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -276,14 +286,15 @@ PROTOBUF_CONSTEXPR TripLeg::TripLeg( , /*decltype(_impl_.incidents_)*/{} , /*decltype(_impl_.algorithms_)*/{} , /*decltype(_impl_.closures_)*/{} - , /*decltype(_impl_.shape_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.bbox_)*/nullptr , /*decltype(_impl_.shape_attributes_)*/nullptr - , /*decltype(_impl_.osm_changeset_)*/uint64_t{0u} - , /*decltype(_impl_.trip_id_)*/uint64_t{0u} - , /*decltype(_impl_.leg_id_)*/0u - , /*decltype(_impl_.leg_count_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_osm_changeset_)*/{} + , /*decltype(_impl_.has_trip_id_)*/{} + , /*decltype(_impl_.has_leg_id_)*/{} + , /*decltype(_impl_.has_leg_count_)*/{} + , /*decltype(_impl_.has_shape_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TripLegDefaultTypeInternal { PROTOBUF_CONSTEXPR TripLegDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -336,22 +347,18 @@ bool TripLeg_Node_Type_IsValid(int value) { case 10: case 11: case 12: - case 13: - case 14: return true; default: return false; } } -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TripLeg_Node_Type_strings[15] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TripLeg_Node_Type_strings[13] = {}; static const char TripLeg_Node_Type_names[] = "kBikeShare" "kBollard" "kBorderControl" - "kBuildingEntrance" - "kElevator" "kGate" "kMotorwayJunction" "kParking" @@ -367,36 +374,32 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TripLeg_Node_Type_entr { {TripLeg_Node_Type_names + 0, 10}, 7 }, { {TripLeg_Node_Type_names + 10, 8}, 2 }, { {TripLeg_Node_Type_names + 18, 14}, 10 }, - { {TripLeg_Node_Type_names + 32, 17}, 13 }, - { {TripLeg_Node_Type_names + 49, 9}, 14 }, - { {TripLeg_Node_Type_names + 58, 5}, 1 }, - { {TripLeg_Node_Type_names + 63, 17}, 9 }, - { {TripLeg_Node_Type_names + 80, 8}, 8 }, - { {TripLeg_Node_Type_names + 88, 19}, 0 }, - { {TripLeg_Node_Type_names + 107, 11}, 12 }, - { {TripLeg_Node_Type_names + 118, 10}, 3 }, - { {TripLeg_Node_Type_names + 128, 11}, 11 }, - { {TripLeg_Node_Type_names + 139, 14}, 4 }, - { {TripLeg_Node_Type_names + 153, 16}, 6 }, - { {TripLeg_Node_Type_names + 169, 15}, 5 }, + { {TripLeg_Node_Type_names + 32, 5}, 1 }, + { {TripLeg_Node_Type_names + 37, 17}, 9 }, + { {TripLeg_Node_Type_names + 54, 8}, 8 }, + { {TripLeg_Node_Type_names + 62, 19}, 0 }, + { {TripLeg_Node_Type_names + 81, 11}, 12 }, + { {TripLeg_Node_Type_names + 92, 10}, 3 }, + { {TripLeg_Node_Type_names + 102, 11}, 11 }, + { {TripLeg_Node_Type_names + 113, 14}, 4 }, + { {TripLeg_Node_Type_names + 127, 16}, 6 }, + { {TripLeg_Node_Type_names + 143, 15}, 5 }, }; static const int TripLeg_Node_Type_entries_by_number[] = { - 8, // 0 -> kStreetIntersection - 5, // 1 -> kGate + 6, // 0 -> kStreetIntersection + 3, // 1 -> kGate 1, // 2 -> kBollard - 10, // 3 -> kTollBooth - 12, // 4 -> kTransitEgress - 14, // 5 -> kTransitStation - 13, // 6 -> kTransitPlatform + 8, // 3 -> kTollBooth + 10, // 4 -> kTransitEgress + 12, // 5 -> kTransitStation + 11, // 6 -> kTransitPlatform 0, // 7 -> kBikeShare - 7, // 8 -> kParking - 6, // 9 -> kMotorwayJunction + 5, // 8 -> kParking + 4, // 9 -> kMotorwayJunction 2, // 10 -> kBorderControl - 11, // 11 -> kTollGantry - 9, // 12 -> kSumpBuster - 3, // 13 -> kBuildingEntrance - 4, // 14 -> kElevator + 9, // 11 -> kTollGantry + 7, // 12 -> kSumpBuster }; const std::string& TripLeg_Node_Type_Name( @@ -405,12 +408,12 @@ const std::string& TripLeg_Node_Type_Name( ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( TripLeg_Node_Type_entries, TripLeg_Node_Type_entries_by_number, - 15, TripLeg_Node_Type_strings); + 13, TripLeg_Node_Type_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( TripLeg_Node_Type_entries, TripLeg_Node_Type_entries_by_number, - 15, value); + 13, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : TripLeg_Node_Type_strings[idx].get(); } @@ -418,7 +421,7 @@ bool TripLeg_Node_Type_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TripLeg_Node_Type* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - TripLeg_Node_Type_entries, 15, name, &int_value); + TripLeg_Node_Type_entries, 13, name, &int_value); if (success) { *value = static_cast(int_value); } @@ -438,8 +441,6 @@ constexpr TripLeg_Node_Type TripLeg_Node::kMotorwayJunction; constexpr TripLeg_Node_Type TripLeg_Node::kBorderControl; constexpr TripLeg_Node_Type TripLeg_Node::kTollGantry; constexpr TripLeg_Node_Type TripLeg_Node::kSumpBuster; -constexpr TripLeg_Node_Type TripLeg_Node::kBuildingEntrance; -constexpr TripLeg_Node_Type TripLeg_Node::kElevator; constexpr TripLeg_Node_Type TripLeg_Node::Type_MIN; constexpr TripLeg_Node_Type TripLeg_Node::Type_MAX; constexpr int TripLeg_Node::Type_ARRAYSIZE; @@ -537,12 +538,9 @@ bool TripLeg_Use_IsValid(int value) { case 30: case 31: case 32: - case 33: - case 34: case 40: case 41: case 42: - case 43: case 50: case 51: case 52: @@ -554,21 +552,18 @@ bool TripLeg_Use_IsValid(int value) { } } -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TripLeg_Use_strings[34] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TripLeg_Use_strings[31] = {}; static const char TripLeg_Use_names[] = "kAlleyUse" "kBridlewayUse" "kBusUse" - "kConstructionUse" "kCuldesacUse" "kCyclewayUse" "kDriveThruUse" "kDrivewayUse" "kEgressConnectionUse" - "kElevatorUse" "kEmergencyAccessUse" - "kEscalatorUse" "kFerryUse" "kFootwayUse" "kLivingStreetUse" @@ -596,74 +591,68 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TripLeg_Use_entries[] { {TripLeg_Use_names + 0, 9}, 5 }, { {TripLeg_Use_names + 9, 13}, 29 }, { {TripLeg_Use_names + 22, 7}, 51 }, - { {TripLeg_Use_names + 29, 16}, 43 }, - { {TripLeg_Use_names + 45, 12}, 9 }, - { {TripLeg_Use_names + 57, 12}, 20 }, - { {TripLeg_Use_names + 69, 13}, 8 }, - { {TripLeg_Use_names + 82, 12}, 4 }, - { {TripLeg_Use_names + 94, 20}, 52 }, - { {TripLeg_Use_names + 114, 12}, 33 }, - { {TripLeg_Use_names + 126, 19}, 7 }, - { {TripLeg_Use_names + 145, 13}, 34 }, - { {TripLeg_Use_names + 158, 9}, 41 }, - { {TripLeg_Use_names + 167, 11}, 25 }, - { {TripLeg_Use_names + 178, 16}, 10 }, - { {TripLeg_Use_names + 194, 16}, 21 }, - { {TripLeg_Use_names + 210, 9}, 40 }, - { {TripLeg_Use_names + 219, 16}, 6 }, - { {TripLeg_Use_names + 235, 8}, 27 }, - { {TripLeg_Use_names + 243, 22}, 32 }, - { {TripLeg_Use_names + 265, 14}, 28 }, - { {TripLeg_Use_names + 279, 22}, 53 }, - { {TripLeg_Use_names + 301, 13}, 42 }, - { {TripLeg_Use_names + 314, 8}, 50 }, - { {TripLeg_Use_names + 322, 8}, 1 }, - { {TripLeg_Use_names + 330, 12}, 30 }, - { {TripLeg_Use_names + 342, 8}, 0 }, - { {TripLeg_Use_names + 350, 15}, 31 }, - { {TripLeg_Use_names + 365, 15}, 11 }, - { {TripLeg_Use_names + 380, 12}, 24 }, - { {TripLeg_Use_names + 392, 9}, 26 }, - { {TripLeg_Use_names + 401, 9}, 3 }, - { {TripLeg_Use_names + 410, 21}, 54 }, - { {TripLeg_Use_names + 431, 15}, 2 }, + { {TripLeg_Use_names + 29, 12}, 9 }, + { {TripLeg_Use_names + 41, 12}, 20 }, + { {TripLeg_Use_names + 53, 13}, 8 }, + { {TripLeg_Use_names + 66, 12}, 4 }, + { {TripLeg_Use_names + 78, 20}, 52 }, + { {TripLeg_Use_names + 98, 19}, 7 }, + { {TripLeg_Use_names + 117, 9}, 41 }, + { {TripLeg_Use_names + 126, 11}, 25 }, + { {TripLeg_Use_names + 137, 16}, 10 }, + { {TripLeg_Use_names + 153, 16}, 21 }, + { {TripLeg_Use_names + 169, 9}, 40 }, + { {TripLeg_Use_names + 178, 16}, 6 }, + { {TripLeg_Use_names + 194, 8}, 27 }, + { {TripLeg_Use_names + 202, 22}, 32 }, + { {TripLeg_Use_names + 224, 14}, 28 }, + { {TripLeg_Use_names + 238, 22}, 53 }, + { {TripLeg_Use_names + 260, 13}, 42 }, + { {TripLeg_Use_names + 273, 8}, 50 }, + { {TripLeg_Use_names + 281, 8}, 1 }, + { {TripLeg_Use_names + 289, 12}, 30 }, + { {TripLeg_Use_names + 301, 8}, 0 }, + { {TripLeg_Use_names + 309, 15}, 31 }, + { {TripLeg_Use_names + 324, 15}, 11 }, + { {TripLeg_Use_names + 339, 12}, 24 }, + { {TripLeg_Use_names + 351, 9}, 26 }, + { {TripLeg_Use_names + 360, 9}, 3 }, + { {TripLeg_Use_names + 369, 21}, 54 }, + { {TripLeg_Use_names + 390, 15}, 2 }, }; static const int TripLeg_Use_entries_by_number[] = { - 26, // 0 -> kRoadUse - 24, // 1 -> kRampUse - 33, // 2 -> kTurnChannelUse - 31, // 3 -> kTrackUse - 7, // 4 -> kDrivewayUse + 23, // 0 -> kRoadUse + 21, // 1 -> kRampUse + 30, // 2 -> kTurnChannelUse + 28, // 3 -> kTrackUse + 6, // 4 -> kDrivewayUse 0, // 5 -> kAlleyUse - 17, // 6 -> kParkingAisleUse - 10, // 7 -> kEmergencyAccessUse - 6, // 8 -> kDriveThruUse - 4, // 9 -> kCuldesacUse - 14, // 10 -> kLivingStreetUse - 28, // 11 -> kServiceRoadUse - 5, // 20 -> kCyclewayUse - 15, // 21 -> kMountainBikeUse - 29, // 24 -> kSidewalkUse - 13, // 25 -> kFootwayUse - 30, // 26 -> kStepsUse - 18, // 27 -> kPathUse - 20, // 28 -> kPedestrianUse + 14, // 6 -> kParkingAisleUse + 8, // 7 -> kEmergencyAccessUse + 5, // 8 -> kDriveThruUse + 3, // 9 -> kCuldesacUse + 11, // 10 -> kLivingStreetUse + 25, // 11 -> kServiceRoadUse + 4, // 20 -> kCyclewayUse + 12, // 21 -> kMountainBikeUse + 26, // 24 -> kSidewalkUse + 10, // 25 -> kFootwayUse + 27, // 26 -> kStepsUse + 15, // 27 -> kPathUse + 17, // 28 -> kPedestrianUse 1, // 29 -> kBridlewayUse - 25, // 30 -> kRestAreaUse - 27, // 31 -> kServiceAreaUse - 19, // 32 -> kPedestrianCrossingUse - 9, // 33 -> kElevatorUse - 11, // 34 -> kEscalatorUse - 16, // 40 -> kOtherUse - 12, // 41 -> kFerryUse - 22, // 42 -> kRailFerryUse - 3, // 43 -> kConstructionUse - 23, // 50 -> kRailUse + 22, // 30 -> kRestAreaUse + 24, // 31 -> kServiceAreaUse + 16, // 32 -> kPedestrianCrossingUse + 13, // 40 -> kOtherUse + 9, // 41 -> kFerryUse + 19, // 42 -> kRailFerryUse + 20, // 50 -> kRailUse 2, // 51 -> kBusUse - 8, // 52 -> kEgressConnectionUse - 21, // 53 -> kPlatformConnectionUse - 32, // 54 -> kTransitConnectionUse + 7, // 52 -> kEgressConnectionUse + 18, // 53 -> kPlatformConnectionUse + 29, // 54 -> kTransitConnectionUse }; const std::string& TripLeg_Use_Name( @@ -672,12 +661,12 @@ const std::string& TripLeg_Use_Name( ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( TripLeg_Use_entries, TripLeg_Use_entries_by_number, - 34, TripLeg_Use_strings); + 31, TripLeg_Use_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( TripLeg_Use_entries, TripLeg_Use_entries_by_number, - 34, value); + 31, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : TripLeg_Use_strings[idx].get(); } @@ -685,7 +674,7 @@ bool TripLeg_Use_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TripLeg_Use* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - TripLeg_Use_entries, 34, name, &int_value); + TripLeg_Use_entries, 31, name, &int_value); if (success) { *value = static_cast(int_value); } @@ -713,14 +702,11 @@ constexpr TripLeg_Use TripLeg::kPathUse; constexpr TripLeg_Use TripLeg::kPedestrianUse; constexpr TripLeg_Use TripLeg::kBridlewayUse; constexpr TripLeg_Use TripLeg::kPedestrianCrossingUse; -constexpr TripLeg_Use TripLeg::kElevatorUse; -constexpr TripLeg_Use TripLeg::kEscalatorUse; constexpr TripLeg_Use TripLeg::kRestAreaUse; constexpr TripLeg_Use TripLeg::kServiceAreaUse; constexpr TripLeg_Use TripLeg::kOtherUse; constexpr TripLeg_Use TripLeg::kFerryUse; constexpr TripLeg_Use TripLeg::kRailFerryUse; -constexpr TripLeg_Use TripLeg::kConstructionUse; constexpr TripLeg_Use TripLeg::kRailUse; constexpr TripLeg_Use TripLeg::kBusUse; constexpr TripLeg_Use TripLeg::kEgressConnectionUse; @@ -1054,29 +1040,43 @@ TripLeg_LaneConnectivity::TripLeg_LaneConnectivity(const TripLeg_LaneConnectivit : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripLeg_LaneConnectivity* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.from_lanes_){} - , decltype(_impl_.to_lanes_){} - , decltype(_impl_.from_way_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_from_way_id_){} + , decltype(_impl_.has_from_lanes_){} + , decltype(_impl_.has_to_lanes_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.from_lanes_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.from_lanes_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_from_lanes().empty()) { - _this->_impl_.from_lanes_.Set(from._internal_from_lanes(), - _this->GetArenaForAllocation()); - } - _impl_.to_lanes_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.to_lanes_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_to_lanes().empty()) { - _this->_impl_.to_lanes_.Set(from._internal_to_lanes(), - _this->GetArenaForAllocation()); - } - _this->_impl_.from_way_id_ = from._impl_.from_way_id_; + clear_has_has_from_way_id(); + switch (from.has_from_way_id_case()) { + case kFromWayId: { + _this->_internal_set_from_way_id(from._internal_from_way_id()); + break; + } + case HAS_FROM_WAY_ID_NOT_SET: { + break; + } + } + clear_has_has_from_lanes(); + switch (from.has_from_lanes_case()) { + case kFromLanes: { + _this->_internal_set_from_lanes(from._internal_from_lanes()); + break; + } + case HAS_FROM_LANES_NOT_SET: { + break; + } + } + clear_has_has_to_lanes(); + switch (from.has_to_lanes_case()) { + case kToLanes: { + _this->_internal_set_to_lanes(from._internal_to_lanes()); + break; + } + case HAS_TO_LANES_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.LaneConnectivity) } @@ -1085,19 +1085,15 @@ inline void TripLeg_LaneConnectivity::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.from_lanes_){} - , decltype(_impl_.to_lanes_){} - , decltype(_impl_.from_way_id_){uint64_t{0u}} + decltype(_impl_.has_from_way_id_){} + , decltype(_impl_.has_from_lanes_){} + , decltype(_impl_.has_to_lanes_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.from_lanes_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.from_lanes_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.to_lanes_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.to_lanes_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_from_way_id(); + clear_has_has_from_lanes(); + clear_has_has_to_lanes(); } TripLeg_LaneConnectivity::~TripLeg_LaneConnectivity() { @@ -1111,23 +1107,73 @@ TripLeg_LaneConnectivity::~TripLeg_LaneConnectivity() { inline void TripLeg_LaneConnectivity::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.from_lanes_.Destroy(); - _impl_.to_lanes_.Destroy(); + if (has_has_from_way_id()) { + clear_has_from_way_id(); + } + if (has_has_from_lanes()) { + clear_has_from_lanes(); + } + if (has_has_to_lanes()) { + clear_has_to_lanes(); + } } void TripLeg_LaneConnectivity::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_LaneConnectivity::clear_has_from_way_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.LaneConnectivity) + switch (has_from_way_id_case()) { + case kFromWayId: { + // No need to clear + break; + } + case HAS_FROM_WAY_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_FROM_WAY_ID_NOT_SET; +} + +void TripLeg_LaneConnectivity::clear_has_from_lanes() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.LaneConnectivity) + switch (has_from_lanes_case()) { + case kFromLanes: { + _impl_.has_from_lanes_.from_lanes_.Destroy(); + break; + } + case HAS_FROM_LANES_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_FROM_LANES_NOT_SET; +} + +void TripLeg_LaneConnectivity::clear_has_to_lanes() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.LaneConnectivity) + switch (has_to_lanes_case()) { + case kToLanes: { + _impl_.has_to_lanes_.to_lanes_.Destroy(); + break; + } + case HAS_TO_LANES_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_TO_LANES_NOT_SET; +} + + void TripLeg_LaneConnectivity::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.LaneConnectivity) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.from_lanes_.ClearToEmpty(); - _impl_.to_lanes_.ClearToEmpty(); - _impl_.from_way_id_ = uint64_t{0u}; + clear_has_from_way_id(); + clear_has_from_lanes(); + clear_has_to_lanes(); _internal_metadata_.Clear(); } @@ -1140,7 +1186,7 @@ const char* TripLeg_LaneConnectivity::_InternalParse(const char* ptr, ::_pbi::Pa // uint64 from_way_id = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.from_way_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_from_way_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1195,13 +1241,13 @@ uint8_t* TripLeg_LaneConnectivity::_InternalSerialize( (void) cached_has_bits; // uint64 from_way_id = 1; - if (this->_internal_from_way_id() != 0) { + if (_internal_has_from_way_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_from_way_id(), target); } // string from_lanes = 2; - if (!this->_internal_from_lanes().empty()) { + if (_internal_has_from_lanes()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_from_lanes().data(), static_cast(this->_internal_from_lanes().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -1211,7 +1257,7 @@ uint8_t* TripLeg_LaneConnectivity::_InternalSerialize( } // string to_lanes = 3; - if (!this->_internal_to_lanes().empty()) { + if (_internal_has_to_lanes()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_to_lanes().data(), static_cast(this->_internal_to_lanes().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -1236,25 +1282,40 @@ size_t TripLeg_LaneConnectivity::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string from_lanes = 2; - if (!this->_internal_from_lanes().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_from_lanes()); + switch (has_from_way_id_case()) { + // uint64 from_way_id = 1; + case kFromWayId: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_from_way_id()); + break; + } + case HAS_FROM_WAY_ID_NOT_SET: { + break; + } } - - // string to_lanes = 3; - if (!this->_internal_to_lanes().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_to_lanes()); + switch (has_from_lanes_case()) { + // string from_lanes = 2; + case kFromLanes: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_from_lanes()); + break; + } + case HAS_FROM_LANES_NOT_SET: { + break; + } } - - // uint64 from_way_id = 1; - if (this->_internal_from_way_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_from_way_id()); + switch (has_to_lanes_case()) { + // string to_lanes = 3; + case kToLanes: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_to_lanes()); + break; + } + case HAS_TO_LANES_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -1276,14 +1337,32 @@ void TripLeg_LaneConnectivity::MergeFrom(const TripLeg_LaneConnectivity& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_from_lanes().empty()) { - _this->_internal_set_from_lanes(from._internal_from_lanes()); + switch (from.has_from_way_id_case()) { + case kFromWayId: { + _this->_internal_set_from_way_id(from._internal_from_way_id()); + break; + } + case HAS_FROM_WAY_ID_NOT_SET: { + break; + } } - if (!from._internal_to_lanes().empty()) { - _this->_internal_set_to_lanes(from._internal_to_lanes()); + switch (from.has_from_lanes_case()) { + case kFromLanes: { + _this->_internal_set_from_lanes(from._internal_from_lanes()); + break; + } + case HAS_FROM_LANES_NOT_SET: { + break; + } } - if (from._internal_from_way_id() != 0) { - _this->_internal_set_from_way_id(from._internal_from_way_id()); + switch (from.has_to_lanes_case()) { + case kToLanes: { + _this->_internal_set_to_lanes(from._internal_to_lanes()); + break; + } + case HAS_TO_LANES_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -1301,18 +1380,13 @@ bool TripLeg_LaneConnectivity::IsInitialized() const { void TripLeg_LaneConnectivity::InternalSwap(TripLeg_LaneConnectivity* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.from_lanes_, lhs_arena, - &other->_impl_.from_lanes_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.to_lanes_, lhs_arena, - &other->_impl_.to_lanes_, rhs_arena - ); - swap(_impl_.from_way_id_, other->_impl_.from_way_id_); + swap(_impl_.has_from_way_id_, other->_impl_.has_from_way_id_); + swap(_impl_.has_from_lanes_, other->_impl_.has_from_lanes_); + swap(_impl_.has_to_lanes_, other->_impl_.has_to_lanes_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); } std::string TripLeg_LaneConnectivity::GetTypeName() const { @@ -1336,17 +1410,65 @@ TripLeg_TrafficSegment::TripLeg_TrafficSegment(const TripLeg_TrafficSegment& fro : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripLeg_TrafficSegment* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.segment_id_){} - , decltype(_impl_.begin_percent_){} - , decltype(_impl_.end_percent_){} - , decltype(_impl_.starts_segment_){} - , decltype(_impl_.ends_segment_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_segment_id_){} + , decltype(_impl_.has_begin_percent_){} + , decltype(_impl_.has_end_percent_){} + , decltype(_impl_.has_starts_segment_){} + , decltype(_impl_.has_ends_segment_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&_impl_.segment_id_, &from._impl_.segment_id_, - static_cast(reinterpret_cast(&_impl_.ends_segment_) - - reinterpret_cast(&_impl_.segment_id_)) + sizeof(_impl_.ends_segment_)); + clear_has_has_segment_id(); + switch (from.has_segment_id_case()) { + case kSegmentId: { + _this->_internal_set_segment_id(from._internal_segment_id()); + break; + } + case HAS_SEGMENT_ID_NOT_SET: { + break; + } + } + clear_has_has_begin_percent(); + switch (from.has_begin_percent_case()) { + case kBeginPercent: { + _this->_internal_set_begin_percent(from._internal_begin_percent()); + break; + } + case HAS_BEGIN_PERCENT_NOT_SET: { + break; + } + } + clear_has_has_end_percent(); + switch (from.has_end_percent_case()) { + case kEndPercent: { + _this->_internal_set_end_percent(from._internal_end_percent()); + break; + } + case HAS_END_PERCENT_NOT_SET: { + break; + } + } + clear_has_has_starts_segment(); + switch (from.has_starts_segment_case()) { + case kStartsSegment: { + _this->_internal_set_starts_segment(from._internal_starts_segment()); + break; + } + case HAS_STARTS_SEGMENT_NOT_SET: { + break; + } + } + clear_has_has_ends_segment(); + switch (from.has_ends_segment_case()) { + case kEndsSegment: { + _this->_internal_set_ends_segment(from._internal_ends_segment()); + break; + } + case HAS_ENDS_SEGMENT_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.TrafficSegment) } @@ -1355,13 +1477,19 @@ inline void TripLeg_TrafficSegment::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.segment_id_){uint64_t{0u}} - , decltype(_impl_.begin_percent_){0} - , decltype(_impl_.end_percent_){0} - , decltype(_impl_.starts_segment_){false} - , decltype(_impl_.ends_segment_){false} + decltype(_impl_.has_segment_id_){} + , decltype(_impl_.has_begin_percent_){} + , decltype(_impl_.has_end_percent_){} + , decltype(_impl_.has_starts_segment_){} + , decltype(_impl_.has_ends_segment_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_segment_id(); + clear_has_has_begin_percent(); + clear_has_has_end_percent(); + clear_has_has_starts_segment(); + clear_has_has_ends_segment(); } TripLeg_TrafficSegment::~TripLeg_TrafficSegment() { @@ -1375,21 +1503,109 @@ TripLeg_TrafficSegment::~TripLeg_TrafficSegment() { inline void TripLeg_TrafficSegment::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_has_segment_id()) { + clear_has_segment_id(); + } + if (has_has_begin_percent()) { + clear_has_begin_percent(); + } + if (has_has_end_percent()) { + clear_has_end_percent(); + } + if (has_has_starts_segment()) { + clear_has_starts_segment(); + } + if (has_has_ends_segment()) { + clear_has_ends_segment(); + } } void TripLeg_TrafficSegment::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_TrafficSegment::clear_has_segment_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.TrafficSegment) + switch (has_segment_id_case()) { + case kSegmentId: { + // No need to clear + break; + } + case HAS_SEGMENT_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_SEGMENT_ID_NOT_SET; +} + +void TripLeg_TrafficSegment::clear_has_begin_percent() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.TrafficSegment) + switch (has_begin_percent_case()) { + case kBeginPercent: { + // No need to clear + break; + } + case HAS_BEGIN_PERCENT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_BEGIN_PERCENT_NOT_SET; +} + +void TripLeg_TrafficSegment::clear_has_end_percent() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.TrafficSegment) + switch (has_end_percent_case()) { + case kEndPercent: { + // No need to clear + break; + } + case HAS_END_PERCENT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_END_PERCENT_NOT_SET; +} + +void TripLeg_TrafficSegment::clear_has_starts_segment() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.TrafficSegment) + switch (has_starts_segment_case()) { + case kStartsSegment: { + // No need to clear + break; + } + case HAS_STARTS_SEGMENT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_STARTS_SEGMENT_NOT_SET; +} + +void TripLeg_TrafficSegment::clear_has_ends_segment() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.TrafficSegment) + switch (has_ends_segment_case()) { + case kEndsSegment: { + // No need to clear + break; + } + case HAS_ENDS_SEGMENT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_ENDS_SEGMENT_NOT_SET; +} + + void TripLeg_TrafficSegment::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.TrafficSegment) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.segment_id_, 0, static_cast( - reinterpret_cast(&_impl_.ends_segment_) - - reinterpret_cast(&_impl_.segment_id_)) + sizeof(_impl_.ends_segment_)); + clear_has_segment_id(); + clear_has_begin_percent(); + clear_has_end_percent(); + clear_has_starts_segment(); + clear_has_ends_segment(); _internal_metadata_.Clear(); } @@ -1402,7 +1618,7 @@ const char* TripLeg_TrafficSegment::_InternalParse(const char* ptr, ::_pbi::Pars // uint64 segment_id = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.segment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_segment_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1410,7 +1626,7 @@ const char* TripLeg_TrafficSegment::_InternalParse(const char* ptr, ::_pbi::Pars // float begin_percent = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { - _impl_.begin_percent_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_begin_percent(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -1418,7 +1634,7 @@ const char* TripLeg_TrafficSegment::_InternalParse(const char* ptr, ::_pbi::Pars // float end_percent = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { - _impl_.end_percent_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_end_percent(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -1426,7 +1642,7 @@ const char* TripLeg_TrafficSegment::_InternalParse(const char* ptr, ::_pbi::Pars // bool starts_segment = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.starts_segment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_starts_segment(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1434,7 +1650,7 @@ const char* TripLeg_TrafficSegment::_InternalParse(const char* ptr, ::_pbi::Pars // bool ends_segment = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.ends_segment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_ends_segment(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1469,39 +1685,31 @@ uint8_t* TripLeg_TrafficSegment::_InternalSerialize( (void) cached_has_bits; // uint64 segment_id = 1; - if (this->_internal_segment_id() != 0) { + if (_internal_has_segment_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_segment_id(), target); } // float begin_percent = 2; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_begin_percent = this->_internal_begin_percent(); - uint32_t raw_begin_percent; - memcpy(&raw_begin_percent, &tmp_begin_percent, sizeof(tmp_begin_percent)); - if (raw_begin_percent != 0) { + if (_internal_has_begin_percent()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_begin_percent(), target); } // float end_percent = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_end_percent = this->_internal_end_percent(); - uint32_t raw_end_percent; - memcpy(&raw_end_percent, &tmp_end_percent, sizeof(tmp_end_percent)); - if (raw_end_percent != 0) { + if (_internal_has_end_percent()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_end_percent(), target); } // bool starts_segment = 4; - if (this->_internal_starts_segment() != 0) { + if (_internal_has_starts_segment()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_starts_segment(), target); } // bool ends_segment = 5; - if (this->_internal_ends_segment() != 0) { + if (_internal_has_ends_segment()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_ends_segment(), target); } @@ -1522,39 +1730,56 @@ size_t TripLeg_TrafficSegment::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // uint64 segment_id = 1; - if (this->_internal_segment_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_segment_id()); + switch (has_segment_id_case()) { + // uint64 segment_id = 1; + case kSegmentId: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_segment_id()); + break; + } + case HAS_SEGMENT_ID_NOT_SET: { + break; + } } - - // float begin_percent = 2; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_begin_percent = this->_internal_begin_percent(); - uint32_t raw_begin_percent; - memcpy(&raw_begin_percent, &tmp_begin_percent, sizeof(tmp_begin_percent)); - if (raw_begin_percent != 0) { - total_size += 1 + 4; + switch (has_begin_percent_case()) { + // float begin_percent = 2; + case kBeginPercent: { + total_size += 1 + 4; + break; + } + case HAS_BEGIN_PERCENT_NOT_SET: { + break; + } } - - // float end_percent = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_end_percent = this->_internal_end_percent(); - uint32_t raw_end_percent; - memcpy(&raw_end_percent, &tmp_end_percent, sizeof(tmp_end_percent)); - if (raw_end_percent != 0) { - total_size += 1 + 4; + switch (has_end_percent_case()) { + // float end_percent = 3; + case kEndPercent: { + total_size += 1 + 4; + break; + } + case HAS_END_PERCENT_NOT_SET: { + break; + } } - - // bool starts_segment = 4; - if (this->_internal_starts_segment() != 0) { - total_size += 1 + 1; + switch (has_starts_segment_case()) { + // bool starts_segment = 4; + case kStartsSegment: { + total_size += 1 + 1; + break; + } + case HAS_STARTS_SEGMENT_NOT_SET: { + break; + } } - - // bool ends_segment = 5; - if (this->_internal_ends_segment() != 0) { - total_size += 1 + 1; + switch (has_ends_segment_case()) { + // bool ends_segment = 5; + case kEndsSegment: { + total_size += 1 + 1; + break; + } + case HAS_ENDS_SEGMENT_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -1576,28 +1801,50 @@ void TripLeg_TrafficSegment::MergeFrom(const TripLeg_TrafficSegment& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_segment_id() != 0) { - _this->_internal_set_segment_id(from._internal_segment_id()); + switch (from.has_segment_id_case()) { + case kSegmentId: { + _this->_internal_set_segment_id(from._internal_segment_id()); + break; + } + case HAS_SEGMENT_ID_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_begin_percent = from._internal_begin_percent(); - uint32_t raw_begin_percent; - memcpy(&raw_begin_percent, &tmp_begin_percent, sizeof(tmp_begin_percent)); - if (raw_begin_percent != 0) { - _this->_internal_set_begin_percent(from._internal_begin_percent()); + switch (from.has_begin_percent_case()) { + case kBeginPercent: { + _this->_internal_set_begin_percent(from._internal_begin_percent()); + break; + } + case HAS_BEGIN_PERCENT_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_end_percent = from._internal_end_percent(); - uint32_t raw_end_percent; - memcpy(&raw_end_percent, &tmp_end_percent, sizeof(tmp_end_percent)); - if (raw_end_percent != 0) { - _this->_internal_set_end_percent(from._internal_end_percent()); + switch (from.has_end_percent_case()) { + case kEndPercent: { + _this->_internal_set_end_percent(from._internal_end_percent()); + break; + } + case HAS_END_PERCENT_NOT_SET: { + break; + } } - if (from._internal_starts_segment() != 0) { - _this->_internal_set_starts_segment(from._internal_starts_segment()); + switch (from.has_starts_segment_case()) { + case kStartsSegment: { + _this->_internal_set_starts_segment(from._internal_starts_segment()); + break; + } + case HAS_STARTS_SEGMENT_NOT_SET: { + break; + } } - if (from._internal_ends_segment() != 0) { - _this->_internal_set_ends_segment(from._internal_ends_segment()); + switch (from.has_ends_segment_case()) { + case kEndsSegment: { + _this->_internal_set_ends_segment(from._internal_ends_segment()); + break; + } + case HAS_ENDS_SEGMENT_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -1616,12 +1863,16 @@ bool TripLeg_TrafficSegment::IsInitialized() const { void TripLeg_TrafficSegment::InternalSwap(TripLeg_TrafficSegment* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_TrafficSegment, _impl_.ends_segment_) - + sizeof(TripLeg_TrafficSegment::_impl_.ends_segment_) - - PROTOBUF_FIELD_OFFSET(TripLeg_TrafficSegment, _impl_.segment_id_)>( - reinterpret_cast(&_impl_.segment_id_), - reinterpret_cast(&other->_impl_.segment_id_)); + swap(_impl_.has_segment_id_, other->_impl_.has_segment_id_); + swap(_impl_.has_begin_percent_, other->_impl_.has_begin_percent_); + swap(_impl_.has_end_percent_, other->_impl_.has_end_percent_); + swap(_impl_.has_starts_segment_, other->_impl_.has_starts_segment_); + swap(_impl_.has_ends_segment_, other->_impl_.has_ends_segment_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); } std::string TripLeg_TrafficSegment::GetTypeName() const { @@ -1645,11 +1896,21 @@ TripLeg_Restriction::TripLeg_Restriction(const TripLeg_Restriction& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripLeg_Restriction* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.type_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_type_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _this->_impl_.type_ = from._impl_.type_; + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Restriction) } @@ -1658,9 +1919,11 @@ inline void TripLeg_Restriction::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.type_){0u} + decltype(_impl_.has_type_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_type(); } TripLeg_Restriction::~TripLeg_Restriction() { @@ -1674,19 +1937,37 @@ TripLeg_Restriction::~TripLeg_Restriction() { inline void TripLeg_Restriction::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_has_type()) { + clear_has_type(); + } } void TripLeg_Restriction::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void TripLeg_Restriction::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Restriction) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; +void TripLeg_Restriction::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Restriction) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} + - _impl_.type_ = 0u; +void TripLeg_Restriction::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Restriction) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_has_type(); _internal_metadata_.Clear(); } @@ -1699,7 +1980,7 @@ const char* TripLeg_Restriction::_InternalParse(const char* ptr, ::_pbi::ParseCo // uint32 type = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_type(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -1734,7 +2015,7 @@ uint8_t* TripLeg_Restriction::_InternalSerialize( (void) cached_has_bits; // uint32 type = 1; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_type(), target); } @@ -1755,11 +2036,16 @@ size_t TripLeg_Restriction::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // uint32 type = 1; - if (this->_internal_type() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type()); + switch (has_type_case()) { + // uint32 type = 1; + case kType: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -1781,8 +2067,14 @@ void TripLeg_Restriction::MergeFrom(const TripLeg_Restriction& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -1801,7 +2093,8 @@ bool TripLeg_Restriction::IsInitialized() const { void TripLeg_Restriction::InternalSwap(TripLeg_Restriction* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_.type_, other->_impl_.type_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } std::string TripLeg_Restriction::GetTypeName() const { @@ -1869,52 +2162,54 @@ TripLeg_Edge::TripLeg_Edge(const TripLeg_Edge& from) , decltype(_impl_.sign_){nullptr} , decltype(_impl_.transit_route_info_){nullptr} , decltype(_impl_.restriction_){nullptr} - , decltype(_impl_.length_km_){} - , decltype(_impl_.speed_){} - , decltype(_impl_.road_class_){} - , decltype(_impl_.begin_heading_){} - , decltype(_impl_.end_heading_){} - , decltype(_impl_.begin_shape_index_){} - , decltype(_impl_.end_shape_index_){} - , decltype(_impl_.traversability_){} - , decltype(_impl_.use_){} - , decltype(_impl_.toll_){} - , decltype(_impl_.unpaved_){} - , decltype(_impl_.tunnel_){} - , decltype(_impl_.bridge_){} - , decltype(_impl_.surface_){} - , decltype(_impl_.travel_mode_){} - , decltype(_impl_.roundabout_){} - , decltype(_impl_.internal_intersection_){} - , decltype(_impl_.drive_on_left_){} - , decltype(_impl_.bicycle_network_){} - , decltype(_impl_.vehicle_type_){} - , decltype(_impl_.pedestrian_type_){} - , decltype(_impl_.bicycle_type_){} - , decltype(_impl_.id_){} - , decltype(_impl_.transit_type_){} - , decltype(_impl_.weighted_grade_){} - , decltype(_impl_.way_id_){} - , decltype(_impl_.max_upward_grade_){} - , decltype(_impl_.max_downward_grade_){} - , decltype(_impl_.lane_count_){} - , decltype(_impl_.cycle_lane_){} - , decltype(_impl_.sidewalk_){} - , decltype(_impl_.density_){} - , decltype(_impl_.speed_limit_){} - , decltype(_impl_.truck_speed_){} - , decltype(_impl_.mean_elevation_){} - , decltype(_impl_.truck_route_){} - , decltype(_impl_.has_time_restrictions_){} - , decltype(_impl_.destination_only_){} - , decltype(_impl_.is_urban_){} - , decltype(_impl_.default_speed_){} - , decltype(_impl_.source_along_edge_){} - , decltype(_impl_.target_along_edge_){} - , decltype(_impl_.sac_scale_){} - , decltype(_impl_.shoulder_){} - , decltype(_impl_.indoor_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_length_km_){} + , decltype(_impl_.has_speed_){} + , decltype(_impl_.has_road_class_){} + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_end_heading_){} + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} + , decltype(_impl_.has_traversability_){} + , decltype(_impl_.has_use_){} + , decltype(_impl_.has_toll_){} + , decltype(_impl_.has_unpaved_){} + , decltype(_impl_.has_tunnel_){} + , decltype(_impl_.has_bridge_){} + , decltype(_impl_.has_roundabout_){} + , decltype(_impl_.has_internal_intersection_){} + , decltype(_impl_.has_drive_on_left_){} + , decltype(_impl_.has_surface_){} + , decltype(_impl_.has_travel_mode_){} + , decltype(_impl_.has_vehicle_type_){} + , decltype(_impl_.has_pedestrian_type_){} + , decltype(_impl_.has_bicycle_type_){} + , decltype(_impl_.has_transit_type_){} + , decltype(_impl_.has_id_){} + , decltype(_impl_.has_way_id_){} + , decltype(_impl_.has_weighted_grade_){} + , decltype(_impl_.has_max_upward_grade_){} + , decltype(_impl_.has_max_downward_grade_){} + , decltype(_impl_.has_lane_count_){} + , decltype(_impl_.has_cycle_lane_){} + , decltype(_impl_.has_bicycle_network_){} + , decltype(_impl_.has_sidewalk_){} + , decltype(_impl_.has_density_){} + , decltype(_impl_.has_speed_limit_){} + , decltype(_impl_.has_truck_speed_){} + , decltype(_impl_.has_truck_route_){} + , decltype(_impl_.has_mean_elevation_){} + , decltype(_impl_.has_has_time_restrictions_){} + , decltype(_impl_.has_default_speed_){} + , decltype(_impl_.has_destination_only_){} + , decltype(_impl_.has_is_urban_){} + , decltype(_impl_.has_source_along_edge_){} + , decltype(_impl_.has_target_along_edge_){} + , decltype(_impl_.has_sac_scale_){} + , decltype(_impl_.has_shoulder_){} + , decltype(_impl_.has_total_length_km_){} + , decltype(_impl_.has_shortcut_id_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); if (from._internal_has_sign()) { @@ -1926,285 +2221,1616 @@ TripLeg_Edge::TripLeg_Edge(const TripLeg_Edge& from) if (from._internal_has_restriction()) { _this->_impl_.restriction_ = new ::valhalla::TripLeg_Restriction(*from._impl_.restriction_); } - ::memcpy(&_impl_.length_km_, &from._impl_.length_km_, - static_cast(reinterpret_cast(&_impl_.indoor_) - - reinterpret_cast(&_impl_.length_km_)) + sizeof(_impl_.indoor_)); - // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Edge) -} - -inline void TripLeg_Edge::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.name_){arena} - , decltype(_impl_.lane_connectivity_){arena} - , decltype(_impl_.traffic_segment_){arena} - , decltype(_impl_.turn_lanes_){arena} - , decltype(_impl_.tagged_value_){arena} - , decltype(_impl_.sign_){nullptr} - , decltype(_impl_.transit_route_info_){nullptr} - , decltype(_impl_.restriction_){nullptr} - , decltype(_impl_.length_km_){0} - , decltype(_impl_.speed_){0} - , decltype(_impl_.road_class_){0} - , decltype(_impl_.begin_heading_){0u} - , decltype(_impl_.end_heading_){0u} - , decltype(_impl_.begin_shape_index_){0u} - , decltype(_impl_.end_shape_index_){0u} - , decltype(_impl_.traversability_){0} - , decltype(_impl_.use_){0} - , decltype(_impl_.toll_){false} - , decltype(_impl_.unpaved_){false} - , decltype(_impl_.tunnel_){false} - , decltype(_impl_.bridge_){false} - , decltype(_impl_.surface_){0} - , decltype(_impl_.travel_mode_){0} - , decltype(_impl_.roundabout_){false} - , decltype(_impl_.internal_intersection_){false} - , decltype(_impl_.drive_on_left_){false} - , decltype(_impl_.bicycle_network_){false} - , decltype(_impl_.vehicle_type_){0} - , decltype(_impl_.pedestrian_type_){0} - , decltype(_impl_.bicycle_type_){0} - , decltype(_impl_.id_){uint64_t{0u}} - , decltype(_impl_.transit_type_){0} - , decltype(_impl_.weighted_grade_){0} - , decltype(_impl_.way_id_){uint64_t{0u}} - , decltype(_impl_.max_upward_grade_){0} - , decltype(_impl_.max_downward_grade_){0} - , decltype(_impl_.lane_count_){0u} - , decltype(_impl_.cycle_lane_){0} - , decltype(_impl_.sidewalk_){0} - , decltype(_impl_.density_){0u} - , decltype(_impl_.speed_limit_){0u} - , decltype(_impl_.truck_speed_){0} - , decltype(_impl_.mean_elevation_){0} - , decltype(_impl_.truck_route_){false} - , decltype(_impl_.has_time_restrictions_){false} - , decltype(_impl_.destination_only_){false} - , decltype(_impl_.is_urban_){false} - , decltype(_impl_.default_speed_){0} - , decltype(_impl_.source_along_edge_){0} - , decltype(_impl_.target_along_edge_){0} - , decltype(_impl_.sac_scale_){0} - , decltype(_impl_.shoulder_){false} - , decltype(_impl_.indoor_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -TripLeg_Edge::~TripLeg_Edge() { - // @@protoc_insertion_point(destructor:valhalla.TripLeg.Edge) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { - (void)arena; - return; + clear_has_has_length_km(); + switch (from.has_length_km_case()) { + case kLengthKm: { + _this->_internal_set_length_km(from._internal_length_km()); + break; + } + case HAS_LENGTH_KM_NOT_SET: { + break; + } } - SharedDtor(); -} - -inline void TripLeg_Edge::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.name_.~RepeatedPtrField(); - _impl_.lane_connectivity_.~RepeatedPtrField(); - _impl_.traffic_segment_.~RepeatedPtrField(); - _impl_.turn_lanes_.~RepeatedPtrField(); - _impl_.tagged_value_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.sign_; - if (this != internal_default_instance()) delete _impl_.transit_route_info_; - if (this != internal_default_instance()) delete _impl_.restriction_; -} - -void TripLeg_Edge::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void TripLeg_Edge::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Edge) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.name_.Clear(); - _impl_.lane_connectivity_.Clear(); - _impl_.traffic_segment_.Clear(); - _impl_.turn_lanes_.Clear(); - _impl_.tagged_value_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.sign_ != nullptr) { - delete _impl_.sign_; + clear_has_has_speed(); + switch (from.has_speed_case()) { + case kSpeed: { + _this->_internal_set_speed(from._internal_speed()); + break; + } + case HAS_SPEED_NOT_SET: { + break; + } } - _impl_.sign_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.transit_route_info_ != nullptr) { - delete _impl_.transit_route_info_; + clear_has_has_road_class(); + switch (from.has_road_class_case()) { + case kRoadClass: { + _this->_internal_set_road_class(from._internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } } - _impl_.transit_route_info_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.restriction_ != nullptr) { - delete _impl_.restriction_; + clear_has_has_begin_heading(); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - _impl_.restriction_ = nullptr; - ::memset(&_impl_.length_km_, 0, static_cast( - reinterpret_cast(&_impl_.indoor_) - - reinterpret_cast(&_impl_.length_km_)) + sizeof(_impl_.indoor_)); - _internal_metadata_.Clear(); -} - -const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .valhalla.StreetName name = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_name(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - // float length_km = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { - _impl_.length_km_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else - goto handle_unusual; - continue; - // float speed = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { - _impl_.speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else - goto handle_unusual; - continue; - // .valhalla.RoadClass road_class = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_road_class(static_cast<::valhalla::RoadClass>(val)); - } else - goto handle_unusual; - continue; - // uint32 begin_heading = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.begin_heading_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 end_heading = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.end_heading_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 begin_shape_index = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.begin_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 end_shape_index = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.end_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .valhalla.TripLeg.Traversability traversability = 9; - case 9: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_traversability(static_cast<::valhalla::TripLeg_Traversability>(val)); - } else - goto handle_unusual; - continue; - // .valhalla.TripLeg.Use use = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_use(static_cast<::valhalla::TripLeg_Use>(val)); - } else - goto handle_unusual; - continue; - // bool toll = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.toll_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool unpaved = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { - _impl_.unpaved_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool tunnel = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { - _impl_.tunnel_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool bridge = 14; - case 14: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { - _impl_.bridge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool roundabout = 15; - case 15: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { - _impl_.roundabout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool internal_intersection = 16; - case 16: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { - _impl_.internal_intersection_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool drive_on_left = 17; - case 17: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { - _impl_.drive_on_left_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .valhalla.TripLeg.Surface surface = 18; - case 18: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_surface(static_cast<::valhalla::TripLeg_Surface>(val)); - } else + clear_has_has_end_heading(); + switch (from.has_end_heading_case()) { + case kEndHeading: { + _this->_internal_set_end_heading(from._internal_end_heading()); + break; + } + case HAS_END_HEADING_NOT_SET: { + break; + } + } + clear_has_has_begin_shape_index(); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_end_shape_index(); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_traversability(); + switch (from.has_traversability_case()) { + case kTraversability: { + _this->_internal_set_traversability(from._internal_traversability()); + break; + } + case HAS_TRAVERSABILITY_NOT_SET: { + break; + } + } + clear_has_has_use(); + switch (from.has_use_case()) { + case kUse: { + _this->_internal_set_use(from._internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } + } + clear_has_has_toll(); + switch (from.has_toll_case()) { + case kToll: { + _this->_internal_set_toll(from._internal_toll()); + break; + } + case HAS_TOLL_NOT_SET: { + break; + } + } + clear_has_has_unpaved(); + switch (from.has_unpaved_case()) { + case kUnpaved: { + _this->_internal_set_unpaved(from._internal_unpaved()); + break; + } + case HAS_UNPAVED_NOT_SET: { + break; + } + } + clear_has_has_tunnel(); + switch (from.has_tunnel_case()) { + case kTunnel: { + _this->_internal_set_tunnel(from._internal_tunnel()); + break; + } + case HAS_TUNNEL_NOT_SET: { + break; + } + } + clear_has_has_bridge(); + switch (from.has_bridge_case()) { + case kBridge: { + _this->_internal_set_bridge(from._internal_bridge()); + break; + } + case HAS_BRIDGE_NOT_SET: { + break; + } + } + clear_has_has_roundabout(); + switch (from.has_roundabout_case()) { + case kRoundabout: { + _this->_internal_set_roundabout(from._internal_roundabout()); + break; + } + case HAS_ROUNDABOUT_NOT_SET: { + break; + } + } + clear_has_has_internal_intersection(); + switch (from.has_internal_intersection_case()) { + case kInternalIntersection: { + _this->_internal_set_internal_intersection(from._internal_internal_intersection()); + break; + } + case HAS_INTERNAL_INTERSECTION_NOT_SET: { + break; + } + } + clear_has_has_drive_on_left(); + switch (from.has_drive_on_left_case()) { + case kDriveOnLeft: { + _this->_internal_set_drive_on_left(from._internal_drive_on_left()); + break; + } + case HAS_DRIVE_ON_LEFT_NOT_SET: { + break; + } + } + clear_has_has_surface(); + switch (from.has_surface_case()) { + case kSurface: { + _this->_internal_set_surface(from._internal_surface()); + break; + } + case HAS_SURFACE_NOT_SET: { + break; + } + } + clear_has_has_travel_mode(); + switch (from.has_travel_mode_case()) { + case kTravelMode: { + _this->_internal_set_travel_mode(from._internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } + } + clear_has_has_vehicle_type(); + switch (from.has_vehicle_type_case()) { + case kVehicleType: { + _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } + } + clear_has_has_pedestrian_type(); + switch (from.has_pedestrian_type_case()) { + case kPedestrianType: { + _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } + } + clear_has_has_bicycle_type(); + switch (from.has_bicycle_type_case()) { + case kBicycleType: { + _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } + } + clear_has_has_transit_type(); + switch (from.has_transit_type_case()) { + case kTransitType: { + _this->_internal_set_transit_type(from._internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } + } + clear_has_has_id(); + switch (from.has_id_case()) { + case kId: { + _this->_internal_set_id(from._internal_id()); + break; + } + case HAS_ID_NOT_SET: { + break; + } + } + clear_has_has_way_id(); + switch (from.has_way_id_case()) { + case kWayId: { + _this->_internal_set_way_id(from._internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } + clear_has_has_weighted_grade(); + switch (from.has_weighted_grade_case()) { + case kWeightedGrade: { + _this->_internal_set_weighted_grade(from._internal_weighted_grade()); + break; + } + case HAS_WEIGHTED_GRADE_NOT_SET: { + break; + } + } + clear_has_has_max_upward_grade(); + switch (from.has_max_upward_grade_case()) { + case kMaxUpwardGrade: { + _this->_internal_set_max_upward_grade(from._internal_max_upward_grade()); + break; + } + case HAS_MAX_UPWARD_GRADE_NOT_SET: { + break; + } + } + clear_has_has_max_downward_grade(); + switch (from.has_max_downward_grade_case()) { + case kMaxDownwardGrade: { + _this->_internal_set_max_downward_grade(from._internal_max_downward_grade()); + break; + } + case HAS_MAX_DOWNWARD_GRADE_NOT_SET: { + break; + } + } + clear_has_has_lane_count(); + switch (from.has_lane_count_case()) { + case kLaneCount: { + _this->_internal_set_lane_count(from._internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } + } + clear_has_has_cycle_lane(); + switch (from.has_cycle_lane_case()) { + case kCycleLane: { + _this->_internal_set_cycle_lane(from._internal_cycle_lane()); + break; + } + case HAS_CYCLE_LANE_NOT_SET: { + break; + } + } + clear_has_has_bicycle_network(); + switch (from.has_bicycle_network_case()) { + case kBicycleNetwork: { + _this->_internal_set_bicycle_network(from._internal_bicycle_network()); + break; + } + case HAS_BICYCLE_NETWORK_NOT_SET: { + break; + } + } + clear_has_has_sidewalk(); + switch (from.has_sidewalk_case()) { + case kSidewalk: { + _this->_internal_set_sidewalk(from._internal_sidewalk()); + break; + } + case HAS_SIDEWALK_NOT_SET: { + break; + } + } + clear_has_has_density(); + switch (from.has_density_case()) { + case kDensity: { + _this->_internal_set_density(from._internal_density()); + break; + } + case HAS_DENSITY_NOT_SET: { + break; + } + } + clear_has_has_speed_limit(); + switch (from.has_speed_limit_case()) { + case kSpeedLimit: { + _this->_internal_set_speed_limit(from._internal_speed_limit()); + break; + } + case HAS_SPEED_LIMIT_NOT_SET: { + break; + } + } + clear_has_has_truck_speed(); + switch (from.has_truck_speed_case()) { + case kTruckSpeed: { + _this->_internal_set_truck_speed(from._internal_truck_speed()); + break; + } + case HAS_TRUCK_SPEED_NOT_SET: { + break; + } + } + clear_has_has_truck_route(); + switch (from.has_truck_route_case()) { + case kTruckRoute: { + _this->_internal_set_truck_route(from._internal_truck_route()); + break; + } + case HAS_TRUCK_ROUTE_NOT_SET: { + break; + } + } + clear_has_has_mean_elevation(); + switch (from.has_mean_elevation_case()) { + case kMeanElevation: { + _this->_internal_set_mean_elevation(from._internal_mean_elevation()); + break; + } + case HAS_MEAN_ELEVATION_NOT_SET: { + break; + } + } + clear_has_has_has_time_restrictions(); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + clear_has_has_default_speed(); + switch (from.has_default_speed_case()) { + case kDefaultSpeed: { + _this->_internal_set_default_speed(from._internal_default_speed()); + break; + } + case HAS_DEFAULT_SPEED_NOT_SET: { + break; + } + } + clear_has_has_destination_only(); + switch (from.has_destination_only_case()) { + case kDestinationOnly: { + _this->_internal_set_destination_only(from._internal_destination_only()); + break; + } + case HAS_DESTINATION_ONLY_NOT_SET: { + break; + } + } + clear_has_has_is_urban(); + switch (from.has_is_urban_case()) { + case kIsUrban: { + _this->_internal_set_is_urban(from._internal_is_urban()); + break; + } + case HAS_IS_URBAN_NOT_SET: { + break; + } + } + clear_has_has_source_along_edge(); + switch (from.has_source_along_edge_case()) { + case kSourceAlongEdge: { + _this->_internal_set_source_along_edge(from._internal_source_along_edge()); + break; + } + case HAS_SOURCE_ALONG_EDGE_NOT_SET: { + break; + } + } + clear_has_has_target_along_edge(); + switch (from.has_target_along_edge_case()) { + case kTargetAlongEdge: { + _this->_internal_set_target_along_edge(from._internal_target_along_edge()); + break; + } + case HAS_TARGET_ALONG_EDGE_NOT_SET: { + break; + } + } + clear_has_has_sac_scale(); + switch (from.has_sac_scale_case()) { + case kSacScale: { + _this->_internal_set_sac_scale(from._internal_sac_scale()); + break; + } + case HAS_SAC_SCALE_NOT_SET: { + break; + } + } + clear_has_has_shoulder(); + switch (from.has_shoulder_case()) { + case kShoulder: { + _this->_internal_set_shoulder(from._internal_shoulder()); + break; + } + case HAS_SHOULDER_NOT_SET: { + break; + } + } + clear_has_has_total_length_km(); + switch (from.has_total_length_km_case()) { + case kTotalLengthKm: { + _this->_internal_set_total_length_km(from._internal_total_length_km()); + break; + } + case HAS_TOTAL_LENGTH_KM_NOT_SET: { + break; + } + } + clear_has_has_shortcut_id(); + switch (from.has_shortcut_id_case()) { + case kShortcutId: { + _this->_internal_set_shortcut_id(from._internal_shortcut_id()); + break; + } + case HAS_SHORTCUT_ID_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Edge) +} + +inline void TripLeg_Edge::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){arena} + , decltype(_impl_.lane_connectivity_){arena} + , decltype(_impl_.traffic_segment_){arena} + , decltype(_impl_.turn_lanes_){arena} + , decltype(_impl_.tagged_value_){arena} + , decltype(_impl_.sign_){nullptr} + , decltype(_impl_.transit_route_info_){nullptr} + , decltype(_impl_.restriction_){nullptr} + , decltype(_impl_.has_length_km_){} + , decltype(_impl_.has_speed_){} + , decltype(_impl_.has_road_class_){} + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_end_heading_){} + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} + , decltype(_impl_.has_traversability_){} + , decltype(_impl_.has_use_){} + , decltype(_impl_.has_toll_){} + , decltype(_impl_.has_unpaved_){} + , decltype(_impl_.has_tunnel_){} + , decltype(_impl_.has_bridge_){} + , decltype(_impl_.has_roundabout_){} + , decltype(_impl_.has_internal_intersection_){} + , decltype(_impl_.has_drive_on_left_){} + , decltype(_impl_.has_surface_){} + , decltype(_impl_.has_travel_mode_){} + , decltype(_impl_.has_vehicle_type_){} + , decltype(_impl_.has_pedestrian_type_){} + , decltype(_impl_.has_bicycle_type_){} + , decltype(_impl_.has_transit_type_){} + , decltype(_impl_.has_id_){} + , decltype(_impl_.has_way_id_){} + , decltype(_impl_.has_weighted_grade_){} + , decltype(_impl_.has_max_upward_grade_){} + , decltype(_impl_.has_max_downward_grade_){} + , decltype(_impl_.has_lane_count_){} + , decltype(_impl_.has_cycle_lane_){} + , decltype(_impl_.has_bicycle_network_){} + , decltype(_impl_.has_sidewalk_){} + , decltype(_impl_.has_density_){} + , decltype(_impl_.has_speed_limit_){} + , decltype(_impl_.has_truck_speed_){} + , decltype(_impl_.has_truck_route_){} + , decltype(_impl_.has_mean_elevation_){} + , decltype(_impl_.has_has_time_restrictions_){} + , decltype(_impl_.has_default_speed_){} + , decltype(_impl_.has_destination_only_){} + , decltype(_impl_.has_is_urban_){} + , decltype(_impl_.has_source_along_edge_){} + , decltype(_impl_.has_target_along_edge_){} + , decltype(_impl_.has_sac_scale_){} + , decltype(_impl_.has_shoulder_){} + , decltype(_impl_.has_total_length_km_){} + , decltype(_impl_.has_shortcut_id_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_has_length_km(); + clear_has_has_speed(); + clear_has_has_road_class(); + clear_has_has_begin_heading(); + clear_has_has_end_heading(); + clear_has_has_begin_shape_index(); + clear_has_has_end_shape_index(); + clear_has_has_traversability(); + clear_has_has_use(); + clear_has_has_toll(); + clear_has_has_unpaved(); + clear_has_has_tunnel(); + clear_has_has_bridge(); + clear_has_has_roundabout(); + clear_has_has_internal_intersection(); + clear_has_has_drive_on_left(); + clear_has_has_surface(); + clear_has_has_travel_mode(); + clear_has_has_vehicle_type(); + clear_has_has_pedestrian_type(); + clear_has_has_bicycle_type(); + clear_has_has_transit_type(); + clear_has_has_id(); + clear_has_has_way_id(); + clear_has_has_weighted_grade(); + clear_has_has_max_upward_grade(); + clear_has_has_max_downward_grade(); + clear_has_has_lane_count(); + clear_has_has_cycle_lane(); + clear_has_has_bicycle_network(); + clear_has_has_sidewalk(); + clear_has_has_density(); + clear_has_has_speed_limit(); + clear_has_has_truck_speed(); + clear_has_has_truck_route(); + clear_has_has_mean_elevation(); + clear_has_has_has_time_restrictions(); + clear_has_has_default_speed(); + clear_has_has_destination_only(); + clear_has_has_is_urban(); + clear_has_has_source_along_edge(); + clear_has_has_target_along_edge(); + clear_has_has_sac_scale(); + clear_has_has_shoulder(); + clear_has_has_total_length_km(); + clear_has_has_shortcut_id(); +} + +TripLeg_Edge::~TripLeg_Edge() { + // @@protoc_insertion_point(destructor:valhalla.TripLeg.Edge) + if (auto *arena = _internal_metadata_.DeleteReturnArena()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void TripLeg_Edge::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.~RepeatedPtrField(); + _impl_.lane_connectivity_.~RepeatedPtrField(); + _impl_.traffic_segment_.~RepeatedPtrField(); + _impl_.turn_lanes_.~RepeatedPtrField(); + _impl_.tagged_value_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.sign_; + if (this != internal_default_instance()) delete _impl_.transit_route_info_; + if (this != internal_default_instance()) delete _impl_.restriction_; + if (has_has_length_km()) { + clear_has_length_km(); + } + if (has_has_speed()) { + clear_has_speed(); + } + if (has_has_road_class()) { + clear_has_road_class(); + } + if (has_has_begin_heading()) { + clear_has_begin_heading(); + } + if (has_has_end_heading()) { + clear_has_end_heading(); + } + if (has_has_begin_shape_index()) { + clear_has_begin_shape_index(); + } + if (has_has_end_shape_index()) { + clear_has_end_shape_index(); + } + if (has_has_traversability()) { + clear_has_traversability(); + } + if (has_has_use()) { + clear_has_use(); + } + if (has_has_toll()) { + clear_has_toll(); + } + if (has_has_unpaved()) { + clear_has_unpaved(); + } + if (has_has_tunnel()) { + clear_has_tunnel(); + } + if (has_has_bridge()) { + clear_has_bridge(); + } + if (has_has_roundabout()) { + clear_has_roundabout(); + } + if (has_has_internal_intersection()) { + clear_has_internal_intersection(); + } + if (has_has_drive_on_left()) { + clear_has_drive_on_left(); + } + if (has_has_surface()) { + clear_has_surface(); + } + if (has_has_travel_mode()) { + clear_has_travel_mode(); + } + if (has_has_vehicle_type()) { + clear_has_vehicle_type(); + } + if (has_has_pedestrian_type()) { + clear_has_pedestrian_type(); + } + if (has_has_bicycle_type()) { + clear_has_bicycle_type(); + } + if (has_has_transit_type()) { + clear_has_transit_type(); + } + if (has_has_id()) { + clear_has_id(); + } + if (has_has_way_id()) { + clear_has_way_id(); + } + if (has_has_weighted_grade()) { + clear_has_weighted_grade(); + } + if (has_has_max_upward_grade()) { + clear_has_max_upward_grade(); + } + if (has_has_max_downward_grade()) { + clear_has_max_downward_grade(); + } + if (has_has_lane_count()) { + clear_has_lane_count(); + } + if (has_has_cycle_lane()) { + clear_has_cycle_lane(); + } + if (has_has_bicycle_network()) { + clear_has_bicycle_network(); + } + if (has_has_sidewalk()) { + clear_has_sidewalk(); + } + if (has_has_density()) { + clear_has_density(); + } + if (has_has_speed_limit()) { + clear_has_speed_limit(); + } + if (has_has_truck_speed()) { + clear_has_truck_speed(); + } + if (has_has_truck_route()) { + clear_has_truck_route(); + } + if (has_has_mean_elevation()) { + clear_has_mean_elevation(); + } + if (has_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + } + if (has_has_default_speed()) { + clear_has_default_speed(); + } + if (has_has_destination_only()) { + clear_has_destination_only(); + } + if (has_has_is_urban()) { + clear_has_is_urban(); + } + if (has_has_source_along_edge()) { + clear_has_source_along_edge(); + } + if (has_has_target_along_edge()) { + clear_has_target_along_edge(); + } + if (has_has_sac_scale()) { + clear_has_sac_scale(); + } + if (has_has_shoulder()) { + clear_has_shoulder(); + } + if (has_has_total_length_km()) { + clear_has_total_length_km(); + } + if (has_has_shortcut_id()) { + clear_has_shortcut_id(); + } +} + +void TripLeg_Edge::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void TripLeg_Edge::clear_has_length_km() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_length_km_case()) { + case kLengthKm: { + // No need to clear + break; + } + case HAS_LENGTH_KM_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_LENGTH_KM_NOT_SET; +} + +void TripLeg_Edge::clear_has_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_speed_case()) { + case kSpeed: { + // No need to clear + break; + } + case HAS_SPEED_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_SPEED_NOT_SET; +} + +void TripLeg_Edge::clear_has_road_class() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_road_class_case()) { + case kRoadClass: { + // No need to clear + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_ROAD_CLASS_NOT_SET; +} + +void TripLeg_Edge::clear_has_begin_heading() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_begin_heading_case()) { + case kBeginHeading: { + // No need to clear + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_BEGIN_HEADING_NOT_SET; +} + +void TripLeg_Edge::clear_has_end_heading() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_end_heading_case()) { + case kEndHeading: { + // No need to clear + break; + } + case HAS_END_HEADING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_END_HEADING_NOT_SET; +} + +void TripLeg_Edge::clear_has_begin_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_begin_shape_index_case()) { + case kBeginShapeIndex: { + // No need to clear + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} + +void TripLeg_Edge::clear_has_end_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_end_shape_index_case()) { + case kEndShapeIndex: { + // No need to clear + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_END_SHAPE_INDEX_NOT_SET; +} + +void TripLeg_Edge::clear_has_traversability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_traversability_case()) { + case kTraversability: { + // No need to clear + break; + } + case HAS_TRAVERSABILITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_TRAVERSABILITY_NOT_SET; +} + +void TripLeg_Edge::clear_has_use() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_use_case()) { + case kUse: { + // No need to clear + break; + } + case HAS_USE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_USE_NOT_SET; +} + +void TripLeg_Edge::clear_has_toll() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_toll_case()) { + case kToll: { + // No need to clear + break; + } + case HAS_TOLL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[9] = HAS_TOLL_NOT_SET; +} + +void TripLeg_Edge::clear_has_unpaved() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_unpaved_case()) { + case kUnpaved: { + // No need to clear + break; + } + case HAS_UNPAVED_NOT_SET: { + break; + } + } + _impl_._oneof_case_[10] = HAS_UNPAVED_NOT_SET; +} + +void TripLeg_Edge::clear_has_tunnel() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_tunnel_case()) { + case kTunnel: { + // No need to clear + break; + } + case HAS_TUNNEL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[11] = HAS_TUNNEL_NOT_SET; +} + +void TripLeg_Edge::clear_has_bridge() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_bridge_case()) { + case kBridge: { + // No need to clear + break; + } + case HAS_BRIDGE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[12] = HAS_BRIDGE_NOT_SET; +} + +void TripLeg_Edge::clear_has_roundabout() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_roundabout_case()) { + case kRoundabout: { + // No need to clear + break; + } + case HAS_ROUNDABOUT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[13] = HAS_ROUNDABOUT_NOT_SET; +} + +void TripLeg_Edge::clear_has_internal_intersection() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_internal_intersection_case()) { + case kInternalIntersection: { + // No need to clear + break; + } + case HAS_INTERNAL_INTERSECTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[14] = HAS_INTERNAL_INTERSECTION_NOT_SET; +} + +void TripLeg_Edge::clear_has_drive_on_left() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_drive_on_left_case()) { + case kDriveOnLeft: { + // No need to clear + break; + } + case HAS_DRIVE_ON_LEFT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[15] = HAS_DRIVE_ON_LEFT_NOT_SET; +} + +void TripLeg_Edge::clear_has_surface() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_surface_case()) { + case kSurface: { + // No need to clear + break; + } + case HAS_SURFACE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[16] = HAS_SURFACE_NOT_SET; +} + +void TripLeg_Edge::clear_has_travel_mode() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_travel_mode_case()) { + case kTravelMode: { + // No need to clear + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[17] = HAS_TRAVEL_MODE_NOT_SET; +} + +void TripLeg_Edge::clear_has_vehicle_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_vehicle_type_case()) { + case kVehicleType: { + // No need to clear + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[18] = HAS_VEHICLE_TYPE_NOT_SET; +} + +void TripLeg_Edge::clear_has_pedestrian_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_pedestrian_type_case()) { + case kPedestrianType: { + // No need to clear + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[19] = HAS_PEDESTRIAN_TYPE_NOT_SET; +} + +void TripLeg_Edge::clear_has_bicycle_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_bicycle_type_case()) { + case kBicycleType: { + // No need to clear + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[20] = HAS_BICYCLE_TYPE_NOT_SET; +} + +void TripLeg_Edge::clear_has_transit_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_transit_type_case()) { + case kTransitType: { + // No need to clear + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[21] = HAS_TRANSIT_TYPE_NOT_SET; +} + +void TripLeg_Edge::clear_has_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_id_case()) { + case kId: { + // No need to clear + break; + } + case HAS_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[22] = HAS_ID_NOT_SET; +} + +void TripLeg_Edge::clear_has_way_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_way_id_case()) { + case kWayId: { + // No need to clear + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[23] = HAS_WAY_ID_NOT_SET; +} + +void TripLeg_Edge::clear_has_weighted_grade() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_weighted_grade_case()) { + case kWeightedGrade: { + // No need to clear + break; + } + case HAS_WEIGHTED_GRADE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[24] = HAS_WEIGHTED_GRADE_NOT_SET; +} + +void TripLeg_Edge::clear_has_max_upward_grade() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_max_upward_grade_case()) { + case kMaxUpwardGrade: { + // No need to clear + break; + } + case HAS_MAX_UPWARD_GRADE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[25] = HAS_MAX_UPWARD_GRADE_NOT_SET; +} + +void TripLeg_Edge::clear_has_max_downward_grade() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_max_downward_grade_case()) { + case kMaxDownwardGrade: { + // No need to clear + break; + } + case HAS_MAX_DOWNWARD_GRADE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[26] = HAS_MAX_DOWNWARD_GRADE_NOT_SET; +} + +void TripLeg_Edge::clear_has_lane_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_lane_count_case()) { + case kLaneCount: { + // No need to clear + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[27] = HAS_LANE_COUNT_NOT_SET; +} + +void TripLeg_Edge::clear_has_cycle_lane() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_cycle_lane_case()) { + case kCycleLane: { + // No need to clear + break; + } + case HAS_CYCLE_LANE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[28] = HAS_CYCLE_LANE_NOT_SET; +} + +void TripLeg_Edge::clear_has_bicycle_network() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_bicycle_network_case()) { + case kBicycleNetwork: { + // No need to clear + break; + } + case HAS_BICYCLE_NETWORK_NOT_SET: { + break; + } + } + _impl_._oneof_case_[29] = HAS_BICYCLE_NETWORK_NOT_SET; +} + +void TripLeg_Edge::clear_has_sidewalk() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_sidewalk_case()) { + case kSidewalk: { + // No need to clear + break; + } + case HAS_SIDEWALK_NOT_SET: { + break; + } + } + _impl_._oneof_case_[30] = HAS_SIDEWALK_NOT_SET; +} + +void TripLeg_Edge::clear_has_density() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_density_case()) { + case kDensity: { + // No need to clear + break; + } + case HAS_DENSITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[31] = HAS_DENSITY_NOT_SET; +} + +void TripLeg_Edge::clear_has_speed_limit() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_speed_limit_case()) { + case kSpeedLimit: { + // No need to clear + break; + } + case HAS_SPEED_LIMIT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[32] = HAS_SPEED_LIMIT_NOT_SET; +} + +void TripLeg_Edge::clear_has_truck_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_truck_speed_case()) { + case kTruckSpeed: { + // No need to clear + break; + } + case HAS_TRUCK_SPEED_NOT_SET: { + break; + } + } + _impl_._oneof_case_[33] = HAS_TRUCK_SPEED_NOT_SET; +} + +void TripLeg_Edge::clear_has_truck_route() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_truck_route_case()) { + case kTruckRoute: { + // No need to clear + break; + } + case HAS_TRUCK_ROUTE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[34] = HAS_TRUCK_ROUTE_NOT_SET; +} + +void TripLeg_Edge::clear_has_mean_elevation() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_mean_elevation_case()) { + case kMeanElevation: { + // No need to clear + break; + } + case HAS_MEAN_ELEVATION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[35] = HAS_MEAN_ELEVATION_NOT_SET; +} + +void TripLeg_Edge::clear_has_has_time_restrictions() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + // No need to clear + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[36] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} + +void TripLeg_Edge::clear_has_default_speed() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_default_speed_case()) { + case kDefaultSpeed: { + // No need to clear + break; + } + case HAS_DEFAULT_SPEED_NOT_SET: { + break; + } + } + _impl_._oneof_case_[37] = HAS_DEFAULT_SPEED_NOT_SET; +} + +void TripLeg_Edge::clear_has_destination_only() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_destination_only_case()) { + case kDestinationOnly: { + // No need to clear + break; + } + case HAS_DESTINATION_ONLY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[38] = HAS_DESTINATION_ONLY_NOT_SET; +} + +void TripLeg_Edge::clear_has_is_urban() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_is_urban_case()) { + case kIsUrban: { + // No need to clear + break; + } + case HAS_IS_URBAN_NOT_SET: { + break; + } + } + _impl_._oneof_case_[39] = HAS_IS_URBAN_NOT_SET; +} + +void TripLeg_Edge::clear_has_source_along_edge() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_source_along_edge_case()) { + case kSourceAlongEdge: { + // No need to clear + break; + } + case HAS_SOURCE_ALONG_EDGE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[40] = HAS_SOURCE_ALONG_EDGE_NOT_SET; +} + +void TripLeg_Edge::clear_has_target_along_edge() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_target_along_edge_case()) { + case kTargetAlongEdge: { + // No need to clear + break; + } + case HAS_TARGET_ALONG_EDGE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[41] = HAS_TARGET_ALONG_EDGE_NOT_SET; +} + +void TripLeg_Edge::clear_has_sac_scale() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_sac_scale_case()) { + case kSacScale: { + // No need to clear + break; + } + case HAS_SAC_SCALE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[42] = HAS_SAC_SCALE_NOT_SET; +} + +void TripLeg_Edge::clear_has_shoulder() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_shoulder_case()) { + case kShoulder: { + // No need to clear + break; + } + case HAS_SHOULDER_NOT_SET: { + break; + } + } + _impl_._oneof_case_[43] = HAS_SHOULDER_NOT_SET; +} + +void TripLeg_Edge::clear_has_total_length_km() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_total_length_km_case()) { + case kTotalLengthKm: { + // No need to clear + break; + } + case HAS_TOTAL_LENGTH_KM_NOT_SET: { + break; + } + } + _impl_._oneof_case_[44] = HAS_TOTAL_LENGTH_KM_NOT_SET; +} + +void TripLeg_Edge::clear_has_shortcut_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Edge) + switch (has_shortcut_id_case()) { + case kShortcutId: { + // No need to clear + break; + } + case HAS_SHORTCUT_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[45] = HAS_SHORTCUT_ID_NOT_SET; +} + + +void TripLeg_Edge::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Edge) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.Clear(); + _impl_.lane_connectivity_.Clear(); + _impl_.traffic_segment_.Clear(); + _impl_.turn_lanes_.Clear(); + _impl_.tagged_value_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.sign_ != nullptr) { + delete _impl_.sign_; + } + _impl_.sign_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.transit_route_info_ != nullptr) { + delete _impl_.transit_route_info_; + } + _impl_.transit_route_info_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.restriction_ != nullptr) { + delete _impl_.restriction_; + } + _impl_.restriction_ = nullptr; + clear_has_length_km(); + clear_has_speed(); + clear_has_road_class(); + clear_has_begin_heading(); + clear_has_end_heading(); + clear_has_begin_shape_index(); + clear_has_end_shape_index(); + clear_has_traversability(); + clear_has_use(); + clear_has_toll(); + clear_has_unpaved(); + clear_has_tunnel(); + clear_has_bridge(); + clear_has_roundabout(); + clear_has_internal_intersection(); + clear_has_drive_on_left(); + clear_has_surface(); + clear_has_travel_mode(); + clear_has_vehicle_type(); + clear_has_pedestrian_type(); + clear_has_bicycle_type(); + clear_has_transit_type(); + clear_has_id(); + clear_has_way_id(); + clear_has_weighted_grade(); + clear_has_max_upward_grade(); + clear_has_max_downward_grade(); + clear_has_lane_count(); + clear_has_cycle_lane(); + clear_has_bicycle_network(); + clear_has_sidewalk(); + clear_has_density(); + clear_has_speed_limit(); + clear_has_truck_speed(); + clear_has_truck_route(); + clear_has_mean_elevation(); + clear_has_has_time_restrictions(); + clear_has_default_speed(); + clear_has_destination_only(); + clear_has_is_urban(); + clear_has_source_along_edge(); + clear_has_target_along_edge(); + clear_has_sac_scale(); + clear_has_shoulder(); + clear_has_total_length_km(); + clear_has_shortcut_id(); + _internal_metadata_.Clear(); +} + +const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .valhalla.StreetName name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_name(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // float length_km = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + _internal_set_length_km(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float speed = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { + _internal_set_speed(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // .valhalla.RoadClass road_class = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_road_class(static_cast<::valhalla::RoadClass>(val)); + } else + goto handle_unusual; + continue; + // uint32 begin_heading = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _internal_set_begin_heading(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 end_heading = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _internal_set_end_heading(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 begin_shape_index = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _internal_set_begin_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 end_shape_index = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _internal_set_end_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .valhalla.TripLeg.Traversability traversability = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_traversability(static_cast<::valhalla::TripLeg_Traversability>(val)); + } else + goto handle_unusual; + continue; + // .valhalla.TripLeg.Use use = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_use(static_cast<::valhalla::TripLeg_Use>(val)); + } else + goto handle_unusual; + continue; + // bool toll = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _internal_set_toll(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool unpaved = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _internal_set_unpaved(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool tunnel = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { + _internal_set_tunnel(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool bridge = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { + _internal_set_bridge(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool roundabout = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { + _internal_set_roundabout(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool internal_intersection = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { + _internal_set_internal_intersection(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool drive_on_left = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { + _internal_set_drive_on_left(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .valhalla.TripLeg.Surface surface = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_surface(static_cast<::valhalla::TripLeg_Surface>(val)); + } else goto handle_unusual; continue; // .valhalla.TripSign sign = 19; @@ -2271,7 +3897,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint64 id = 26; case 26: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 208)) { - _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2279,7 +3905,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint64 way_id = 27; case 27: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 216)) { - _impl_.way_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_way_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2287,7 +3913,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // float weighted_grade = 28; case 28: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 229)) { - _impl_.weighted_grade_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_weighted_grade(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -2295,7 +3921,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // int32 max_upward_grade = 29; case 29: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 232)) { - _impl_.max_upward_grade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_max_upward_grade(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2303,7 +3929,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // int32 max_downward_grade = 30; case 30: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 240)) { - _impl_.max_downward_grade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_max_downward_grade(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2311,7 +3937,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 lane_count = 31; case 31: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 248)) { - _impl_.lane_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_lane_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2325,10 +3951,10 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // bool bicycle_network = 33; + // uint32 bicycle_network = 33; case 33: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.bicycle_network_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_bicycle_network(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2345,7 +3971,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 density = 35; case 35: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.density_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_density(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2353,7 +3979,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 speed_limit = 36; case 36: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.speed_limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_speed_limit(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2361,7 +3987,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // float truck_speed = 37; case 37: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 45)) { - _impl_.truck_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_truck_speed(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -2369,7 +3995,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool truck_route = 38; case 38: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.truck_route_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_truck_route(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2390,7 +4016,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // int32 mean_elevation = 40; case 40: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.mean_elevation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_mean_elevation(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2424,7 +4050,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool has_time_restrictions = 43; case 43: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.has_time_restrictions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_has_time_restrictions(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2432,7 +4058,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // float default_speed = 44; case 44: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 101)) { - _impl_.default_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_default_speed(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -2448,7 +4074,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool destination_only = 46; case 46: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { - _impl_.destination_only_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_destination_only(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2456,7 +4082,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool is_urban = 47; case 47: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { - _impl_.is_urban_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_is_urban(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2477,7 +4103,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // float source_along_edge = 49; case 49: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 141)) { - _impl_.source_along_edge_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_source_along_edge(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -2485,7 +4111,7 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // float target_along_edge = 50; case 50: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 149)) { - _impl_.target_along_edge_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_target_along_edge(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -2502,15 +4128,23 @@ const char* TripLeg_Edge::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool shoulder = 52; case 52: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 160)) { - _impl_.shoulder_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_shoulder(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // bool indoor = 53; + // float total_length_km = 53; case 53: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 168)) { - _impl_.indoor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 173)) { + _internal_set_total_length_km(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // int64 shortcut_id = 54; + case 54: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { + _internal_set_shortcut_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -2553,114 +4187,106 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // float length_km = 2; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length_km = this->_internal_length_km(); - uint32_t raw_length_km; - memcpy(&raw_length_km, &tmp_length_km, sizeof(tmp_length_km)); - if (raw_length_km != 0) { + if (_internal_has_length_km()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_length_km(), target); } // float speed = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_speed = this->_internal_speed(); - uint32_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { + if (_internal_has_speed()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_speed(), target); } // .valhalla.RoadClass road_class = 4; - if (this->_internal_road_class() != 0) { + if (_internal_has_road_class()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 4, this->_internal_road_class(), target); } // uint32 begin_heading = 5; - if (this->_internal_begin_heading() != 0) { + if (_internal_has_begin_heading()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_begin_heading(), target); } // uint32 end_heading = 6; - if (this->_internal_end_heading() != 0) { + if (_internal_has_end_heading()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_end_heading(), target); } // uint32 begin_shape_index = 7; - if (this->_internal_begin_shape_index() != 0) { + if (_internal_has_begin_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_begin_shape_index(), target); } // uint32 end_shape_index = 8; - if (this->_internal_end_shape_index() != 0) { + if (_internal_has_end_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_end_shape_index(), target); } // .valhalla.TripLeg.Traversability traversability = 9; - if (this->_internal_traversability() != 0) { + if (_internal_has_traversability()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 9, this->_internal_traversability(), target); } // .valhalla.TripLeg.Use use = 10; - if (this->_internal_use() != 0) { + if (_internal_has_use()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 10, this->_internal_use(), target); } // bool toll = 11; - if (this->_internal_toll() != 0) { + if (_internal_has_toll()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_toll(), target); } // bool unpaved = 12; - if (this->_internal_unpaved() != 0) { + if (_internal_has_unpaved()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_unpaved(), target); } // bool tunnel = 13; - if (this->_internal_tunnel() != 0) { + if (_internal_has_tunnel()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_tunnel(), target); } // bool bridge = 14; - if (this->_internal_bridge() != 0) { + if (_internal_has_bridge()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_bridge(), target); } // bool roundabout = 15; - if (this->_internal_roundabout() != 0) { + if (_internal_has_roundabout()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(15, this->_internal_roundabout(), target); } // bool internal_intersection = 16; - if (this->_internal_internal_intersection() != 0) { + if (_internal_has_internal_intersection()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_internal_intersection(), target); } // bool drive_on_left = 17; - if (this->_internal_drive_on_left() != 0) { + if (_internal_has_drive_on_left()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_drive_on_left(), target); } // .valhalla.TripLeg.Surface surface = 18; - if (this->_internal_surface() != 0) { + if (_internal_has_surface()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 18, this->_internal_surface(), target); @@ -2674,35 +4300,35 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // .valhalla.TravelMode travel_mode = 20; - if (this->_internal_travel_mode() != 0) { + if (_internal_has_travel_mode()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 20, this->_internal_travel_mode(), target); } // .valhalla.VehicleType vehicle_type = 21; - if (this->_internal_vehicle_type() != 0) { + if (_internal_has_vehicle_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 21, this->_internal_vehicle_type(), target); } // .valhalla.PedestrianType pedestrian_type = 22; - if (this->_internal_pedestrian_type() != 0) { + if (_internal_has_pedestrian_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 22, this->_internal_pedestrian_type(), target); } // .valhalla.BicycleType bicycle_type = 23; - if (this->_internal_bicycle_type() != 0) { + if (_internal_has_bicycle_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 23, this->_internal_bicycle_type(), target); } // .valhalla.TransitType transit_type = 24; - if (this->_internal_transit_type() != 0) { + if (_internal_has_transit_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 24, this->_internal_transit_type(), target); @@ -2716,89 +4342,81 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // uint64 id = 26; - if (this->_internal_id() != 0) { + if (_internal_has_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(26, this->_internal_id(), target); } // uint64 way_id = 27; - if (this->_internal_way_id() != 0) { + if (_internal_has_way_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(27, this->_internal_way_id(), target); } // float weighted_grade = 28; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_weighted_grade = this->_internal_weighted_grade(); - uint32_t raw_weighted_grade; - memcpy(&raw_weighted_grade, &tmp_weighted_grade, sizeof(tmp_weighted_grade)); - if (raw_weighted_grade != 0) { + if (_internal_has_weighted_grade()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(28, this->_internal_weighted_grade(), target); } // int32 max_upward_grade = 29; - if (this->_internal_max_upward_grade() != 0) { + if (_internal_has_max_upward_grade()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray(29, this->_internal_max_upward_grade(), target); } // int32 max_downward_grade = 30; - if (this->_internal_max_downward_grade() != 0) { + if (_internal_has_max_downward_grade()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray(30, this->_internal_max_downward_grade(), target); } // uint32 lane_count = 31; - if (this->_internal_lane_count() != 0) { + if (_internal_has_lane_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(31, this->_internal_lane_count(), target); } // .valhalla.TripLeg.CycleLane cycle_lane = 32; - if (this->_internal_cycle_lane() != 0) { + if (_internal_has_cycle_lane()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 32, this->_internal_cycle_lane(), target); } - // bool bicycle_network = 33; - if (this->_internal_bicycle_network() != 0) { + // uint32 bicycle_network = 33; + if (_internal_has_bicycle_network()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(33, this->_internal_bicycle_network(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(33, this->_internal_bicycle_network(), target); } // .valhalla.TripLeg.Sidewalk sidewalk = 34; - if (this->_internal_sidewalk() != 0) { + if (_internal_has_sidewalk()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 34, this->_internal_sidewalk(), target); } // uint32 density = 35; - if (this->_internal_density() != 0) { + if (_internal_has_density()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(35, this->_internal_density(), target); } // uint32 speed_limit = 36; - if (this->_internal_speed_limit() != 0) { + if (_internal_has_speed_limit()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(36, this->_internal_speed_limit(), target); } // float truck_speed = 37; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_truck_speed = this->_internal_truck_speed(); - uint32_t raw_truck_speed; - memcpy(&raw_truck_speed, &tmp_truck_speed, sizeof(tmp_truck_speed)); - if (raw_truck_speed != 0) { + if (_internal_has_truck_speed()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(37, this->_internal_truck_speed(), target); } // bool truck_route = 38; - if (this->_internal_truck_route() != 0) { + if (_internal_has_truck_route()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(38, this->_internal_truck_route(), target); } @@ -2812,7 +4430,7 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // int32 mean_elevation = 40; - if (this->_internal_mean_elevation() != 0) { + if (_internal_has_mean_elevation()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteInt32ToArray(40, this->_internal_mean_elevation(), target); } @@ -2834,17 +4452,13 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // bool has_time_restrictions = 43; - if (this->_internal_has_time_restrictions() != 0) { + if (_internal_has_has_time_restrictions()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(43, this->_internal_has_time_restrictions(), target); } // float default_speed = 44; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_default_speed = this->_internal_default_speed(); - uint32_t raw_default_speed; - memcpy(&raw_default_speed, &tmp_default_speed, sizeof(tmp_default_speed)); - if (raw_default_speed != 0) { + if (_internal_has_default_speed()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(44, this->_internal_default_speed(), target); } @@ -2857,13 +4471,13 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // bool destination_only = 46; - if (this->_internal_destination_only() != 0) { + if (_internal_has_destination_only()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(46, this->_internal_destination_only(), target); } // bool is_urban = 47; - if (this->_internal_is_urban() != 0) { + if (_internal_has_is_urban()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(47, this->_internal_is_urban(), target); } @@ -2877,42 +4491,40 @@ uint8_t* TripLeg_Edge::_InternalSerialize( } // float source_along_edge = 49; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_source_along_edge = this->_internal_source_along_edge(); - uint32_t raw_source_along_edge; - memcpy(&raw_source_along_edge, &tmp_source_along_edge, sizeof(tmp_source_along_edge)); - if (raw_source_along_edge != 0) { + if (_internal_has_source_along_edge()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(49, this->_internal_source_along_edge(), target); } // float target_along_edge = 50; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_target_along_edge = this->_internal_target_along_edge(); - uint32_t raw_target_along_edge; - memcpy(&raw_target_along_edge, &tmp_target_along_edge, sizeof(tmp_target_along_edge)); - if (raw_target_along_edge != 0) { + if (_internal_has_target_along_edge()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(50, this->_internal_target_along_edge(), target); } // .valhalla.TripLeg.SacScale sac_scale = 51; - if (this->_internal_sac_scale() != 0) { + if (_internal_has_sac_scale()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 51, this->_internal_sac_scale(), target); } // bool shoulder = 52; - if (this->_internal_shoulder() != 0) { + if (_internal_has_shoulder()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(52, this->_internal_shoulder(), target); } - // bool indoor = 53; - if (this->_internal_indoor() != 0) { + // float total_length_km = 53; + if (_internal_has_total_length_km()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(53, this->_internal_indoor(), target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(53, this->_internal_total_length_km(), target); + } + + // int64 shortcut_id = 54; + if (_internal_has_shortcut_id()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(54, this->_internal_shortcut_id(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2987,287 +4599,498 @@ size_t TripLeg_Edge::ByteSizeLong() const { *_impl_.restriction_); } - // float length_km = 2; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length_km = this->_internal_length_km(); - uint32_t raw_length_km; - memcpy(&raw_length_km, &tmp_length_km, sizeof(tmp_length_km)); - if (raw_length_km != 0) { - total_size += 1 + 4; + switch (has_length_km_case()) { + // float length_km = 2; + case kLengthKm: { + total_size += 1 + 4; + break; + } + case HAS_LENGTH_KM_NOT_SET: { + break; + } } - - // float speed = 3; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_speed = this->_internal_speed(); - uint32_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { - total_size += 1 + 4; + switch (has_speed_case()) { + // float speed = 3; + case kSpeed: { + total_size += 1 + 4; + break; + } + case HAS_SPEED_NOT_SET: { + break; + } } - - // .valhalla.RoadClass road_class = 4; - if (this->_internal_road_class() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_road_class()); + switch (has_road_class_case()) { + // .valhalla.RoadClass road_class = 4; + case kRoadClass: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } } - - // uint32 begin_heading = 5; - if (this->_internal_begin_heading() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + switch (has_begin_heading_case()) { + // uint32 begin_heading = 5; + case kBeginHeading: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - - // uint32 end_heading = 6; - if (this->_internal_end_heading() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_heading()); + switch (has_end_heading_case()) { + // uint32 end_heading = 6; + case kEndHeading: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_heading()); + break; + } + case HAS_END_HEADING_NOT_SET: { + break; + } } - - // uint32 begin_shape_index = 7; - if (this->_internal_begin_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + switch (has_begin_shape_index_case()) { + // uint32 begin_shape_index = 7; + case kBeginShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - - // uint32 end_shape_index = 8; - if (this->_internal_end_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + switch (has_end_shape_index_case()) { + // uint32 end_shape_index = 8; + case kEndShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Traversability traversability = 9; - if (this->_internal_traversability() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_traversability()); + switch (has_traversability_case()) { + // .valhalla.TripLeg.Traversability traversability = 9; + case kTraversability: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_traversability()); + break; + } + case HAS_TRAVERSABILITY_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Use use = 10; - if (this->_internal_use() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_use()); + switch (has_use_case()) { + // .valhalla.TripLeg.Use use = 10; + case kUse: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } } - - // bool toll = 11; - if (this->_internal_toll() != 0) { - total_size += 1 + 1; + switch (has_toll_case()) { + // bool toll = 11; + case kToll: { + total_size += 1 + 1; + break; + } + case HAS_TOLL_NOT_SET: { + break; + } } - - // bool unpaved = 12; - if (this->_internal_unpaved() != 0) { - total_size += 1 + 1; + switch (has_unpaved_case()) { + // bool unpaved = 12; + case kUnpaved: { + total_size += 1 + 1; + break; + } + case HAS_UNPAVED_NOT_SET: { + break; + } } - - // bool tunnel = 13; - if (this->_internal_tunnel() != 0) { - total_size += 1 + 1; + switch (has_tunnel_case()) { + // bool tunnel = 13; + case kTunnel: { + total_size += 1 + 1; + break; + } + case HAS_TUNNEL_NOT_SET: { + break; + } } - - // bool bridge = 14; - if (this->_internal_bridge() != 0) { - total_size += 1 + 1; + switch (has_bridge_case()) { + // bool bridge = 14; + case kBridge: { + total_size += 1 + 1; + break; + } + case HAS_BRIDGE_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Surface surface = 18; - if (this->_internal_surface() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_surface()); + switch (has_roundabout_case()) { + // bool roundabout = 15; + case kRoundabout: { + total_size += 1 + 1; + break; + } + case HAS_ROUNDABOUT_NOT_SET: { + break; + } } - - // .valhalla.TravelMode travel_mode = 20; - if (this->_internal_travel_mode() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_travel_mode()); + switch (has_internal_intersection_case()) { + // bool internal_intersection = 16; + case kInternalIntersection: { + total_size += 2 + 1; + break; + } + case HAS_INTERNAL_INTERSECTION_NOT_SET: { + break; + } } - - // bool roundabout = 15; - if (this->_internal_roundabout() != 0) { - total_size += 1 + 1; + switch (has_drive_on_left_case()) { + // bool drive_on_left = 17; + case kDriveOnLeft: { + total_size += 2 + 1; + break; + } + case HAS_DRIVE_ON_LEFT_NOT_SET: { + break; + } } - - // bool internal_intersection = 16; - if (this->_internal_internal_intersection() != 0) { - total_size += 2 + 1; + switch (has_surface_case()) { + // .valhalla.TripLeg.Surface surface = 18; + case kSurface: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_surface()); + break; + } + case HAS_SURFACE_NOT_SET: { + break; + } } - - // bool drive_on_left = 17; - if (this->_internal_drive_on_left() != 0) { - total_size += 2 + 1; + switch (has_travel_mode_case()) { + // .valhalla.TravelMode travel_mode = 20; + case kTravelMode: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } } - - // bool bicycle_network = 33; - if (this->_internal_bicycle_network() != 0) { - total_size += 2 + 1; + switch (has_vehicle_type_case()) { + // .valhalla.VehicleType vehicle_type = 21; + case kVehicleType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } } - - // .valhalla.VehicleType vehicle_type = 21; - if (this->_internal_vehicle_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_vehicle_type()); + switch (has_pedestrian_type_case()) { + // .valhalla.PedestrianType pedestrian_type = 22; + case kPedestrianType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } } - - // .valhalla.PedestrianType pedestrian_type = 22; - if (this->_internal_pedestrian_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_pedestrian_type()); + switch (has_bicycle_type_case()) { + // .valhalla.BicycleType bicycle_type = 23; + case kBicycleType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } } - - // .valhalla.BicycleType bicycle_type = 23; - if (this->_internal_bicycle_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_bicycle_type()); + switch (has_transit_type_case()) { + // .valhalla.TransitType transit_type = 24; + case kTransitType: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } } - - // uint64 id = 26; - if (this->_internal_id() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt64Size( - this->_internal_id()); + switch (has_id_case()) { + // uint64 id = 26; + case kId: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt64Size( + this->_internal_id()); + break; + } + case HAS_ID_NOT_SET: { + break; + } } - - // .valhalla.TransitType transit_type = 24; - if (this->_internal_transit_type() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_transit_type()); + switch (has_way_id_case()) { + // uint64 way_id = 27; + case kWayId: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt64Size( + this->_internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } } - - // float weighted_grade = 28; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_weighted_grade = this->_internal_weighted_grade(); - uint32_t raw_weighted_grade; - memcpy(&raw_weighted_grade, &tmp_weighted_grade, sizeof(tmp_weighted_grade)); - if (raw_weighted_grade != 0) { - total_size += 2 + 4; + switch (has_weighted_grade_case()) { + // float weighted_grade = 28; + case kWeightedGrade: { + total_size += 2 + 4; + break; + } + case HAS_WEIGHTED_GRADE_NOT_SET: { + break; + } } - - // uint64 way_id = 27; - if (this->_internal_way_id() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt64Size( - this->_internal_way_id()); + switch (has_max_upward_grade_case()) { + // int32 max_upward_grade = 29; + case kMaxUpwardGrade: { + total_size += 2 + + ::_pbi::WireFormatLite::Int32Size( + this->_internal_max_upward_grade()); + break; + } + case HAS_MAX_UPWARD_GRADE_NOT_SET: { + break; + } } - - // int32 max_upward_grade = 29; - if (this->_internal_max_upward_grade() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::Int32Size( - this->_internal_max_upward_grade()); + switch (has_max_downward_grade_case()) { + // int32 max_downward_grade = 30; + case kMaxDownwardGrade: { + total_size += 2 + + ::_pbi::WireFormatLite::Int32Size( + this->_internal_max_downward_grade()); + break; + } + case HAS_MAX_DOWNWARD_GRADE_NOT_SET: { + break; + } } - - // int32 max_downward_grade = 30; - if (this->_internal_max_downward_grade() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::Int32Size( - this->_internal_max_downward_grade()); + switch (has_lane_count_case()) { + // uint32 lane_count = 31; + case kLaneCount: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } } - - // uint32 lane_count = 31; - if (this->_internal_lane_count() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_lane_count()); + switch (has_cycle_lane_case()) { + // .valhalla.TripLeg.CycleLane cycle_lane = 32; + case kCycleLane: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_cycle_lane()); + break; + } + case HAS_CYCLE_LANE_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.CycleLane cycle_lane = 32; - if (this->_internal_cycle_lane() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_cycle_lane()); + switch (has_bicycle_network_case()) { + // uint32 bicycle_network = 33; + case kBicycleNetwork: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_bicycle_network()); + break; + } + case HAS_BICYCLE_NETWORK_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Sidewalk sidewalk = 34; - if (this->_internal_sidewalk() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_sidewalk()); + switch (has_sidewalk_case()) { + // .valhalla.TripLeg.Sidewalk sidewalk = 34; + case kSidewalk: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_sidewalk()); + break; + } + case HAS_SIDEWALK_NOT_SET: { + break; + } } - - // uint32 density = 35; - if (this->_internal_density() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_density()); + switch (has_density_case()) { + // uint32 density = 35; + case kDensity: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_density()); + break; + } + case HAS_DENSITY_NOT_SET: { + break; + } } - - // uint32 speed_limit = 36; - if (this->_internal_speed_limit() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::UInt32Size( - this->_internal_speed_limit()); + switch (has_speed_limit_case()) { + // uint32 speed_limit = 36; + case kSpeedLimit: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_speed_limit()); + break; + } + case HAS_SPEED_LIMIT_NOT_SET: { + break; + } } - - // float truck_speed = 37; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_truck_speed = this->_internal_truck_speed(); - uint32_t raw_truck_speed; - memcpy(&raw_truck_speed, &tmp_truck_speed, sizeof(tmp_truck_speed)); - if (raw_truck_speed != 0) { - total_size += 2 + 4; + switch (has_truck_speed_case()) { + // float truck_speed = 37; + case kTruckSpeed: { + total_size += 2 + 4; + break; + } + case HAS_TRUCK_SPEED_NOT_SET: { + break; + } } - - // int32 mean_elevation = 40; - if (this->_internal_mean_elevation() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::Int32Size( - this->_internal_mean_elevation()); + switch (has_truck_route_case()) { + // bool truck_route = 38; + case kTruckRoute: { + total_size += 2 + 1; + break; + } + case HAS_TRUCK_ROUTE_NOT_SET: { + break; + } } - - // bool truck_route = 38; - if (this->_internal_truck_route() != 0) { - total_size += 2 + 1; + switch (has_mean_elevation_case()) { + // int32 mean_elevation = 40; + case kMeanElevation: { + total_size += 2 + + ::_pbi::WireFormatLite::Int32Size( + this->_internal_mean_elevation()); + break; + } + case HAS_MEAN_ELEVATION_NOT_SET: { + break; + } } - - // bool has_time_restrictions = 43; - if (this->_internal_has_time_restrictions() != 0) { - total_size += 2 + 1; + switch (has_has_time_restrictions_case()) { + // bool has_time_restrictions = 43; + case kHasTimeRestrictions: { + total_size += 2 + 1; + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } } - - // bool destination_only = 46; - if (this->_internal_destination_only() != 0) { - total_size += 2 + 1; + switch (has_default_speed_case()) { + // float default_speed = 44; + case kDefaultSpeed: { + total_size += 2 + 4; + break; + } + case HAS_DEFAULT_SPEED_NOT_SET: { + break; + } } - - // bool is_urban = 47; - if (this->_internal_is_urban() != 0) { - total_size += 2 + 1; + switch (has_destination_only_case()) { + // bool destination_only = 46; + case kDestinationOnly: { + total_size += 2 + 1; + break; + } + case HAS_DESTINATION_ONLY_NOT_SET: { + break; + } } - - // float default_speed = 44; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_default_speed = this->_internal_default_speed(); - uint32_t raw_default_speed; - memcpy(&raw_default_speed, &tmp_default_speed, sizeof(tmp_default_speed)); - if (raw_default_speed != 0) { - total_size += 2 + 4; + switch (has_is_urban_case()) { + // bool is_urban = 47; + case kIsUrban: { + total_size += 2 + 1; + break; + } + case HAS_IS_URBAN_NOT_SET: { + break; + } } - - // float source_along_edge = 49; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_source_along_edge = this->_internal_source_along_edge(); - uint32_t raw_source_along_edge; - memcpy(&raw_source_along_edge, &tmp_source_along_edge, sizeof(tmp_source_along_edge)); - if (raw_source_along_edge != 0) { - total_size += 2 + 4; + switch (has_source_along_edge_case()) { + // float source_along_edge = 49; + case kSourceAlongEdge: { + total_size += 2 + 4; + break; + } + case HAS_SOURCE_ALONG_EDGE_NOT_SET: { + break; + } } - - // float target_along_edge = 50; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_target_along_edge = this->_internal_target_along_edge(); - uint32_t raw_target_along_edge; - memcpy(&raw_target_along_edge, &tmp_target_along_edge, sizeof(tmp_target_along_edge)); - if (raw_target_along_edge != 0) { - total_size += 2 + 4; + switch (has_target_along_edge_case()) { + // float target_along_edge = 50; + case kTargetAlongEdge: { + total_size += 2 + 4; + break; + } + case HAS_TARGET_ALONG_EDGE_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.SacScale sac_scale = 51; - if (this->_internal_sac_scale() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_sac_scale()); + switch (has_sac_scale_case()) { + // .valhalla.TripLeg.SacScale sac_scale = 51; + case kSacScale: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_sac_scale()); + break; + } + case HAS_SAC_SCALE_NOT_SET: { + break; + } } - - // bool shoulder = 52; - if (this->_internal_shoulder() != 0) { - total_size += 2 + 1; + switch (has_shoulder_case()) { + // bool shoulder = 52; + case kShoulder: { + total_size += 2 + 1; + break; + } + case HAS_SHOULDER_NOT_SET: { + break; + } } - - // bool indoor = 53; - if (this->_internal_indoor() != 0) { - total_size += 2 + 1; + switch (has_total_length_km_case()) { + // float total_length_km = 53; + case kTotalLengthKm: { + total_size += 2 + 4; + break; + } + case HAS_TOTAL_LENGTH_KM_NOT_SET: { + break; + } + } + switch (has_shortcut_id_case()) { + // int64 shortcut_id = 54; + case kShortcutId: { + total_size += 2 + + ::_pbi::WireFormatLite::Int64Size( + this->_internal_shortcut_id()); + break; + } + case HAS_SHORTCUT_ID_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -3306,168 +5129,419 @@ void TripLeg_Edge::MergeFrom(const TripLeg_Edge& from) { _this->_internal_mutable_restriction()->::valhalla::TripLeg_Restriction::MergeFrom( from._internal_restriction()); } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_length_km = from._internal_length_km(); - uint32_t raw_length_km; - memcpy(&raw_length_km, &tmp_length_km, sizeof(tmp_length_km)); - if (raw_length_km != 0) { - _this->_internal_set_length_km(from._internal_length_km()); + switch (from.has_length_km_case()) { + case kLengthKm: { + _this->_internal_set_length_km(from._internal_length_km()); + break; + } + case HAS_LENGTH_KM_NOT_SET: { + break; + } + } + switch (from.has_speed_case()) { + case kSpeed: { + _this->_internal_set_speed(from._internal_speed()); + break; + } + case HAS_SPEED_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_speed = from._internal_speed(); - uint32_t raw_speed; - memcpy(&raw_speed, &tmp_speed, sizeof(tmp_speed)); - if (raw_speed != 0) { - _this->_internal_set_speed(from._internal_speed()); + switch (from.has_road_class_case()) { + case kRoadClass: { + _this->_internal_set_road_class(from._internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } } - if (from._internal_road_class() != 0) { - _this->_internal_set_road_class(from._internal_road_class()); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - if (from._internal_begin_heading() != 0) { - _this->_internal_set_begin_heading(from._internal_begin_heading()); + switch (from.has_end_heading_case()) { + case kEndHeading: { + _this->_internal_set_end_heading(from._internal_end_heading()); + break; + } + case HAS_END_HEADING_NOT_SET: { + break; + } } - if (from._internal_end_heading() != 0) { - _this->_internal_set_end_heading(from._internal_end_heading()); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - if (from._internal_begin_shape_index() != 0) { - _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } - if (from._internal_end_shape_index() != 0) { - _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + switch (from.has_traversability_case()) { + case kTraversability: { + _this->_internal_set_traversability(from._internal_traversability()); + break; + } + case HAS_TRAVERSABILITY_NOT_SET: { + break; + } } - if (from._internal_traversability() != 0) { - _this->_internal_set_traversability(from._internal_traversability()); + switch (from.has_use_case()) { + case kUse: { + _this->_internal_set_use(from._internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } } - if (from._internal_use() != 0) { - _this->_internal_set_use(from._internal_use()); + switch (from.has_toll_case()) { + case kToll: { + _this->_internal_set_toll(from._internal_toll()); + break; + } + case HAS_TOLL_NOT_SET: { + break; + } } - if (from._internal_toll() != 0) { - _this->_internal_set_toll(from._internal_toll()); + switch (from.has_unpaved_case()) { + case kUnpaved: { + _this->_internal_set_unpaved(from._internal_unpaved()); + break; + } + case HAS_UNPAVED_NOT_SET: { + break; + } } - if (from._internal_unpaved() != 0) { - _this->_internal_set_unpaved(from._internal_unpaved()); + switch (from.has_tunnel_case()) { + case kTunnel: { + _this->_internal_set_tunnel(from._internal_tunnel()); + break; + } + case HAS_TUNNEL_NOT_SET: { + break; + } } - if (from._internal_tunnel() != 0) { - _this->_internal_set_tunnel(from._internal_tunnel()); + switch (from.has_bridge_case()) { + case kBridge: { + _this->_internal_set_bridge(from._internal_bridge()); + break; + } + case HAS_BRIDGE_NOT_SET: { + break; + } } - if (from._internal_bridge() != 0) { - _this->_internal_set_bridge(from._internal_bridge()); + switch (from.has_roundabout_case()) { + case kRoundabout: { + _this->_internal_set_roundabout(from._internal_roundabout()); + break; + } + case HAS_ROUNDABOUT_NOT_SET: { + break; + } } - if (from._internal_surface() != 0) { - _this->_internal_set_surface(from._internal_surface()); + switch (from.has_internal_intersection_case()) { + case kInternalIntersection: { + _this->_internal_set_internal_intersection(from._internal_internal_intersection()); + break; + } + case HAS_INTERNAL_INTERSECTION_NOT_SET: { + break; + } } - if (from._internal_travel_mode() != 0) { - _this->_internal_set_travel_mode(from._internal_travel_mode()); + switch (from.has_drive_on_left_case()) { + case kDriveOnLeft: { + _this->_internal_set_drive_on_left(from._internal_drive_on_left()); + break; + } + case HAS_DRIVE_ON_LEFT_NOT_SET: { + break; + } } - if (from._internal_roundabout() != 0) { - _this->_internal_set_roundabout(from._internal_roundabout()); + switch (from.has_surface_case()) { + case kSurface: { + _this->_internal_set_surface(from._internal_surface()); + break; + } + case HAS_SURFACE_NOT_SET: { + break; + } } - if (from._internal_internal_intersection() != 0) { - _this->_internal_set_internal_intersection(from._internal_internal_intersection()); + switch (from.has_travel_mode_case()) { + case kTravelMode: { + _this->_internal_set_travel_mode(from._internal_travel_mode()); + break; + } + case HAS_TRAVEL_MODE_NOT_SET: { + break; + } } - if (from._internal_drive_on_left() != 0) { - _this->_internal_set_drive_on_left(from._internal_drive_on_left()); + switch (from.has_vehicle_type_case()) { + case kVehicleType: { + _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + break; + } + case HAS_VEHICLE_TYPE_NOT_SET: { + break; + } } - if (from._internal_bicycle_network() != 0) { - _this->_internal_set_bicycle_network(from._internal_bicycle_network()); + switch (from.has_pedestrian_type_case()) { + case kPedestrianType: { + _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + break; + } + case HAS_PEDESTRIAN_TYPE_NOT_SET: { + break; + } } - if (from._internal_vehicle_type() != 0) { - _this->_internal_set_vehicle_type(from._internal_vehicle_type()); + switch (from.has_bicycle_type_case()) { + case kBicycleType: { + _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + break; + } + case HAS_BICYCLE_TYPE_NOT_SET: { + break; + } } - if (from._internal_pedestrian_type() != 0) { - _this->_internal_set_pedestrian_type(from._internal_pedestrian_type()); + switch (from.has_transit_type_case()) { + case kTransitType: { + _this->_internal_set_transit_type(from._internal_transit_type()); + break; + } + case HAS_TRANSIT_TYPE_NOT_SET: { + break; + } } - if (from._internal_bicycle_type() != 0) { - _this->_internal_set_bicycle_type(from._internal_bicycle_type()); + switch (from.has_id_case()) { + case kId: { + _this->_internal_set_id(from._internal_id()); + break; + } + case HAS_ID_NOT_SET: { + break; + } } - if (from._internal_id() != 0) { - _this->_internal_set_id(from._internal_id()); + switch (from.has_way_id_case()) { + case kWayId: { + _this->_internal_set_way_id(from._internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } } - if (from._internal_transit_type() != 0) { - _this->_internal_set_transit_type(from._internal_transit_type()); + switch (from.has_weighted_grade_case()) { + case kWeightedGrade: { + _this->_internal_set_weighted_grade(from._internal_weighted_grade()); + break; + } + case HAS_WEIGHTED_GRADE_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_weighted_grade = from._internal_weighted_grade(); - uint32_t raw_weighted_grade; - memcpy(&raw_weighted_grade, &tmp_weighted_grade, sizeof(tmp_weighted_grade)); - if (raw_weighted_grade != 0) { - _this->_internal_set_weighted_grade(from._internal_weighted_grade()); + switch (from.has_max_upward_grade_case()) { + case kMaxUpwardGrade: { + _this->_internal_set_max_upward_grade(from._internal_max_upward_grade()); + break; + } + case HAS_MAX_UPWARD_GRADE_NOT_SET: { + break; + } } - if (from._internal_way_id() != 0) { - _this->_internal_set_way_id(from._internal_way_id()); + switch (from.has_max_downward_grade_case()) { + case kMaxDownwardGrade: { + _this->_internal_set_max_downward_grade(from._internal_max_downward_grade()); + break; + } + case HAS_MAX_DOWNWARD_GRADE_NOT_SET: { + break; + } } - if (from._internal_max_upward_grade() != 0) { - _this->_internal_set_max_upward_grade(from._internal_max_upward_grade()); + switch (from.has_lane_count_case()) { + case kLaneCount: { + _this->_internal_set_lane_count(from._internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } } - if (from._internal_max_downward_grade() != 0) { - _this->_internal_set_max_downward_grade(from._internal_max_downward_grade()); + switch (from.has_cycle_lane_case()) { + case kCycleLane: { + _this->_internal_set_cycle_lane(from._internal_cycle_lane()); + break; + } + case HAS_CYCLE_LANE_NOT_SET: { + break; + } } - if (from._internal_lane_count() != 0) { - _this->_internal_set_lane_count(from._internal_lane_count()); + switch (from.has_bicycle_network_case()) { + case kBicycleNetwork: { + _this->_internal_set_bicycle_network(from._internal_bicycle_network()); + break; + } + case HAS_BICYCLE_NETWORK_NOT_SET: { + break; + } } - if (from._internal_cycle_lane() != 0) { - _this->_internal_set_cycle_lane(from._internal_cycle_lane()); + switch (from.has_sidewalk_case()) { + case kSidewalk: { + _this->_internal_set_sidewalk(from._internal_sidewalk()); + break; + } + case HAS_SIDEWALK_NOT_SET: { + break; + } } - if (from._internal_sidewalk() != 0) { - _this->_internal_set_sidewalk(from._internal_sidewalk()); + switch (from.has_density_case()) { + case kDensity: { + _this->_internal_set_density(from._internal_density()); + break; + } + case HAS_DENSITY_NOT_SET: { + break; + } } - if (from._internal_density() != 0) { - _this->_internal_set_density(from._internal_density()); + switch (from.has_speed_limit_case()) { + case kSpeedLimit: { + _this->_internal_set_speed_limit(from._internal_speed_limit()); + break; + } + case HAS_SPEED_LIMIT_NOT_SET: { + break; + } } - if (from._internal_speed_limit() != 0) { - _this->_internal_set_speed_limit(from._internal_speed_limit()); + switch (from.has_truck_speed_case()) { + case kTruckSpeed: { + _this->_internal_set_truck_speed(from._internal_truck_speed()); + break; + } + case HAS_TRUCK_SPEED_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_truck_speed = from._internal_truck_speed(); - uint32_t raw_truck_speed; - memcpy(&raw_truck_speed, &tmp_truck_speed, sizeof(tmp_truck_speed)); - if (raw_truck_speed != 0) { - _this->_internal_set_truck_speed(from._internal_truck_speed()); + switch (from.has_truck_route_case()) { + case kTruckRoute: { + _this->_internal_set_truck_route(from._internal_truck_route()); + break; + } + case HAS_TRUCK_ROUTE_NOT_SET: { + break; + } } - if (from._internal_mean_elevation() != 0) { - _this->_internal_set_mean_elevation(from._internal_mean_elevation()); + switch (from.has_mean_elevation_case()) { + case kMeanElevation: { + _this->_internal_set_mean_elevation(from._internal_mean_elevation()); + break; + } + case HAS_MEAN_ELEVATION_NOT_SET: { + break; + } } - if (from._internal_truck_route() != 0) { - _this->_internal_set_truck_route(from._internal_truck_route()); + switch (from.has_has_time_restrictions_case()) { + case kHasTimeRestrictions: { + _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + break; + } + case HAS_HAS_TIME_RESTRICTIONS_NOT_SET: { + break; + } } - if (from._internal_has_time_restrictions() != 0) { - _this->_internal_set_has_time_restrictions(from._internal_has_time_restrictions()); + switch (from.has_default_speed_case()) { + case kDefaultSpeed: { + _this->_internal_set_default_speed(from._internal_default_speed()); + break; + } + case HAS_DEFAULT_SPEED_NOT_SET: { + break; + } } - if (from._internal_destination_only() != 0) { - _this->_internal_set_destination_only(from._internal_destination_only()); + switch (from.has_destination_only_case()) { + case kDestinationOnly: { + _this->_internal_set_destination_only(from._internal_destination_only()); + break; + } + case HAS_DESTINATION_ONLY_NOT_SET: { + break; + } } - if (from._internal_is_urban() != 0) { - _this->_internal_set_is_urban(from._internal_is_urban()); + switch (from.has_is_urban_case()) { + case kIsUrban: { + _this->_internal_set_is_urban(from._internal_is_urban()); + break; + } + case HAS_IS_URBAN_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_default_speed = from._internal_default_speed(); - uint32_t raw_default_speed; - memcpy(&raw_default_speed, &tmp_default_speed, sizeof(tmp_default_speed)); - if (raw_default_speed != 0) { - _this->_internal_set_default_speed(from._internal_default_speed()); + switch (from.has_source_along_edge_case()) { + case kSourceAlongEdge: { + _this->_internal_set_source_along_edge(from._internal_source_along_edge()); + break; + } + case HAS_SOURCE_ALONG_EDGE_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_source_along_edge = from._internal_source_along_edge(); - uint32_t raw_source_along_edge; - memcpy(&raw_source_along_edge, &tmp_source_along_edge, sizeof(tmp_source_along_edge)); - if (raw_source_along_edge != 0) { - _this->_internal_set_source_along_edge(from._internal_source_along_edge()); + switch (from.has_target_along_edge_case()) { + case kTargetAlongEdge: { + _this->_internal_set_target_along_edge(from._internal_target_along_edge()); + break; + } + case HAS_TARGET_ALONG_EDGE_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_target_along_edge = from._internal_target_along_edge(); - uint32_t raw_target_along_edge; - memcpy(&raw_target_along_edge, &tmp_target_along_edge, sizeof(tmp_target_along_edge)); - if (raw_target_along_edge != 0) { - _this->_internal_set_target_along_edge(from._internal_target_along_edge()); + switch (from.has_sac_scale_case()) { + case kSacScale: { + _this->_internal_set_sac_scale(from._internal_sac_scale()); + break; + } + case HAS_SAC_SCALE_NOT_SET: { + break; + } } - if (from._internal_sac_scale() != 0) { - _this->_internal_set_sac_scale(from._internal_sac_scale()); + switch (from.has_shoulder_case()) { + case kShoulder: { + _this->_internal_set_shoulder(from._internal_shoulder()); + break; + } + case HAS_SHOULDER_NOT_SET: { + break; + } } - if (from._internal_shoulder() != 0) { - _this->_internal_set_shoulder(from._internal_shoulder()); + switch (from.has_total_length_km_case()) { + case kTotalLengthKm: { + _this->_internal_set_total_length_km(from._internal_total_length_km()); + break; + } + case HAS_TOTAL_LENGTH_KM_NOT_SET: { + break; + } } - if (from._internal_indoor() != 0) { - _this->_internal_set_indoor(from._internal_indoor()); + switch (from.has_shortcut_id_case()) { + case kShortcutId: { + _this->_internal_set_shortcut_id(from._internal_shortcut_id()); + break; + } + case HAS_SHORTCUT_ID_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -3492,11 +5566,103 @@ void TripLeg_Edge::InternalSwap(TripLeg_Edge* other) { _impl_.turn_lanes_.InternalSwap(&other->_impl_.turn_lanes_); _impl_.tagged_value_.InternalSwap(&other->_impl_.tagged_value_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_Edge, _impl_.indoor_) - + sizeof(TripLeg_Edge::_impl_.indoor_) + PROTOBUF_FIELD_OFFSET(TripLeg_Edge, _impl_.restriction_) + + sizeof(TripLeg_Edge::_impl_.restriction_) - PROTOBUF_FIELD_OFFSET(TripLeg_Edge, _impl_.sign_)>( reinterpret_cast(&_impl_.sign_), reinterpret_cast(&other->_impl_.sign_)); + swap(_impl_.has_length_km_, other->_impl_.has_length_km_); + swap(_impl_.has_speed_, other->_impl_.has_speed_); + swap(_impl_.has_road_class_, other->_impl_.has_road_class_); + swap(_impl_.has_begin_heading_, other->_impl_.has_begin_heading_); + swap(_impl_.has_end_heading_, other->_impl_.has_end_heading_); + swap(_impl_.has_begin_shape_index_, other->_impl_.has_begin_shape_index_); + swap(_impl_.has_end_shape_index_, other->_impl_.has_end_shape_index_); + swap(_impl_.has_traversability_, other->_impl_.has_traversability_); + swap(_impl_.has_use_, other->_impl_.has_use_); + swap(_impl_.has_toll_, other->_impl_.has_toll_); + swap(_impl_.has_unpaved_, other->_impl_.has_unpaved_); + swap(_impl_.has_tunnel_, other->_impl_.has_tunnel_); + swap(_impl_.has_bridge_, other->_impl_.has_bridge_); + swap(_impl_.has_roundabout_, other->_impl_.has_roundabout_); + swap(_impl_.has_internal_intersection_, other->_impl_.has_internal_intersection_); + swap(_impl_.has_drive_on_left_, other->_impl_.has_drive_on_left_); + swap(_impl_.has_surface_, other->_impl_.has_surface_); + swap(_impl_.has_travel_mode_, other->_impl_.has_travel_mode_); + swap(_impl_.has_vehicle_type_, other->_impl_.has_vehicle_type_); + swap(_impl_.has_pedestrian_type_, other->_impl_.has_pedestrian_type_); + swap(_impl_.has_bicycle_type_, other->_impl_.has_bicycle_type_); + swap(_impl_.has_transit_type_, other->_impl_.has_transit_type_); + swap(_impl_.has_id_, other->_impl_.has_id_); + swap(_impl_.has_way_id_, other->_impl_.has_way_id_); + swap(_impl_.has_weighted_grade_, other->_impl_.has_weighted_grade_); + swap(_impl_.has_max_upward_grade_, other->_impl_.has_max_upward_grade_); + swap(_impl_.has_max_downward_grade_, other->_impl_.has_max_downward_grade_); + swap(_impl_.has_lane_count_, other->_impl_.has_lane_count_); + swap(_impl_.has_cycle_lane_, other->_impl_.has_cycle_lane_); + swap(_impl_.has_bicycle_network_, other->_impl_.has_bicycle_network_); + swap(_impl_.has_sidewalk_, other->_impl_.has_sidewalk_); + swap(_impl_.has_density_, other->_impl_.has_density_); + swap(_impl_.has_speed_limit_, other->_impl_.has_speed_limit_); + swap(_impl_.has_truck_speed_, other->_impl_.has_truck_speed_); + swap(_impl_.has_truck_route_, other->_impl_.has_truck_route_); + swap(_impl_.has_mean_elevation_, other->_impl_.has_mean_elevation_); + swap(_impl_.has_has_time_restrictions_, other->_impl_.has_has_time_restrictions_); + swap(_impl_.has_default_speed_, other->_impl_.has_default_speed_); + swap(_impl_.has_destination_only_, other->_impl_.has_destination_only_); + swap(_impl_.has_is_urban_, other->_impl_.has_is_urban_); + swap(_impl_.has_source_along_edge_, other->_impl_.has_source_along_edge_); + swap(_impl_.has_target_along_edge_, other->_impl_.has_target_along_edge_); + swap(_impl_.has_sac_scale_, other->_impl_.has_sac_scale_); + swap(_impl_.has_shoulder_, other->_impl_.has_shoulder_); + swap(_impl_.has_total_length_km_, other->_impl_.has_total_length_km_); + swap(_impl_.has_shortcut_id_, other->_impl_.has_shortcut_id_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); + swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); + swap(_impl_._oneof_case_[9], other->_impl_._oneof_case_[9]); + swap(_impl_._oneof_case_[10], other->_impl_._oneof_case_[10]); + swap(_impl_._oneof_case_[11], other->_impl_._oneof_case_[11]); + swap(_impl_._oneof_case_[12], other->_impl_._oneof_case_[12]); + swap(_impl_._oneof_case_[13], other->_impl_._oneof_case_[13]); + swap(_impl_._oneof_case_[14], other->_impl_._oneof_case_[14]); + swap(_impl_._oneof_case_[15], other->_impl_._oneof_case_[15]); + swap(_impl_._oneof_case_[16], other->_impl_._oneof_case_[16]); + swap(_impl_._oneof_case_[17], other->_impl_._oneof_case_[17]); + swap(_impl_._oneof_case_[18], other->_impl_._oneof_case_[18]); + swap(_impl_._oneof_case_[19], other->_impl_._oneof_case_[19]); + swap(_impl_._oneof_case_[20], other->_impl_._oneof_case_[20]); + swap(_impl_._oneof_case_[21], other->_impl_._oneof_case_[21]); + swap(_impl_._oneof_case_[22], other->_impl_._oneof_case_[22]); + swap(_impl_._oneof_case_[23], other->_impl_._oneof_case_[23]); + swap(_impl_._oneof_case_[24], other->_impl_._oneof_case_[24]); + swap(_impl_._oneof_case_[25], other->_impl_._oneof_case_[25]); + swap(_impl_._oneof_case_[26], other->_impl_._oneof_case_[26]); + swap(_impl_._oneof_case_[27], other->_impl_._oneof_case_[27]); + swap(_impl_._oneof_case_[28], other->_impl_._oneof_case_[28]); + swap(_impl_._oneof_case_[29], other->_impl_._oneof_case_[29]); + swap(_impl_._oneof_case_[30], other->_impl_._oneof_case_[30]); + swap(_impl_._oneof_case_[31], other->_impl_._oneof_case_[31]); + swap(_impl_._oneof_case_[32], other->_impl_._oneof_case_[32]); + swap(_impl_._oneof_case_[33], other->_impl_._oneof_case_[33]); + swap(_impl_._oneof_case_[34], other->_impl_._oneof_case_[34]); + swap(_impl_._oneof_case_[35], other->_impl_._oneof_case_[35]); + swap(_impl_._oneof_case_[36], other->_impl_._oneof_case_[36]); + swap(_impl_._oneof_case_[37], other->_impl_._oneof_case_[37]); + swap(_impl_._oneof_case_[38], other->_impl_._oneof_case_[38]); + swap(_impl_._oneof_case_[39], other->_impl_._oneof_case_[39]); + swap(_impl_._oneof_case_[40], other->_impl_._oneof_case_[40]); + swap(_impl_._oneof_case_[41], other->_impl_._oneof_case_[41]); + swap(_impl_._oneof_case_[42], other->_impl_._oneof_case_[42]); + swap(_impl_._oneof_case_[43], other->_impl_._oneof_case_[43]); + swap(_impl_._oneof_case_[44], other->_impl_._oneof_case_[44]); + swap(_impl_._oneof_case_[45], other->_impl_._oneof_case_[45]); } std::string TripLeg_Edge::GetTypeName() const { @@ -3532,24 +5698,112 @@ TripLeg_IntersectingEdge::TripLeg_IntersectingEdge(const TripLeg_IntersectingEdg TripLeg_IntersectingEdge* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.sign_){nullptr} - , decltype(_impl_.begin_heading_){} - , decltype(_impl_.prev_name_consistency_){} - , decltype(_impl_.curr_name_consistency_){} - , decltype(_impl_.driveability_){} - , decltype(_impl_.cyclability_){} - , decltype(_impl_.walkability_){} - , decltype(_impl_.use_){} - , decltype(_impl_.road_class_){} - , decltype(_impl_.lane_count_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_prev_name_consistency_){} + , decltype(_impl_.has_curr_name_consistency_){} + , decltype(_impl_.has_driveability_){} + , decltype(_impl_.has_cyclability_){} + , decltype(_impl_.has_walkability_){} + , decltype(_impl_.has_use_){} + , decltype(_impl_.has_road_class_){} + , decltype(_impl_.has_lane_count_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); if (from._internal_has_sign()) { _this->_impl_.sign_ = new ::valhalla::TripSign(*from._impl_.sign_); } - ::memcpy(&_impl_.begin_heading_, &from._impl_.begin_heading_, - static_cast(reinterpret_cast(&_impl_.lane_count_) - - reinterpret_cast(&_impl_.begin_heading_)) + sizeof(_impl_.lane_count_)); + clear_has_has_begin_heading(); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } + } + clear_has_has_prev_name_consistency(); + switch (from.has_prev_name_consistency_case()) { + case kPrevNameConsistency: { + _this->_internal_set_prev_name_consistency(from._internal_prev_name_consistency()); + break; + } + case HAS_PREV_NAME_CONSISTENCY_NOT_SET: { + break; + } + } + clear_has_has_curr_name_consistency(); + switch (from.has_curr_name_consistency_case()) { + case kCurrNameConsistency: { + _this->_internal_set_curr_name_consistency(from._internal_curr_name_consistency()); + break; + } + case HAS_CURR_NAME_CONSISTENCY_NOT_SET: { + break; + } + } + clear_has_has_driveability(); + switch (from.has_driveability_case()) { + case kDriveability: { + _this->_internal_set_driveability(from._internal_driveability()); + break; + } + case HAS_DRIVEABILITY_NOT_SET: { + break; + } + } + clear_has_has_cyclability(); + switch (from.has_cyclability_case()) { + case kCyclability: { + _this->_internal_set_cyclability(from._internal_cyclability()); + break; + } + case HAS_CYCLABILITY_NOT_SET: { + break; + } + } + clear_has_has_walkability(); + switch (from.has_walkability_case()) { + case kWalkability: { + _this->_internal_set_walkability(from._internal_walkability()); + break; + } + case HAS_WALKABILITY_NOT_SET: { + break; + } + } + clear_has_has_use(); + switch (from.has_use_case()) { + case kUse: { + _this->_internal_set_use(from._internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } + } + clear_has_has_road_class(); + switch (from.has_road_class_case()) { + case kRoadClass: { + _this->_internal_set_road_class(from._internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } + } + clear_has_has_lane_count(); + switch (from.has_lane_count_case()) { + case kLaneCount: { + _this->_internal_set_lane_count(from._internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.IntersectingEdge) } @@ -3559,17 +5813,27 @@ inline void TripLeg_IntersectingEdge::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.sign_){nullptr} - , decltype(_impl_.begin_heading_){0u} - , decltype(_impl_.prev_name_consistency_){false} - , decltype(_impl_.curr_name_consistency_){false} - , decltype(_impl_.driveability_){0} - , decltype(_impl_.cyclability_){0} - , decltype(_impl_.walkability_){0} - , decltype(_impl_.use_){0} - , decltype(_impl_.road_class_){0} - , decltype(_impl_.lane_count_){0u} + , decltype(_impl_.has_begin_heading_){} + , decltype(_impl_.has_prev_name_consistency_){} + , decltype(_impl_.has_curr_name_consistency_){} + , decltype(_impl_.has_driveability_){} + , decltype(_impl_.has_cyclability_){} + , decltype(_impl_.has_walkability_){} + , decltype(_impl_.has_use_){} + , decltype(_impl_.has_road_class_){} + , decltype(_impl_.has_lane_count_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_begin_heading(); + clear_has_has_prev_name_consistency(); + clear_has_has_curr_name_consistency(); + clear_has_has_driveability(); + clear_has_has_cyclability(); + clear_has_has_walkability(); + clear_has_has_use(); + clear_has_has_road_class(); + clear_has_has_lane_count(); } TripLeg_IntersectingEdge::~TripLeg_IntersectingEdge() { @@ -3584,12 +5848,166 @@ TripLeg_IntersectingEdge::~TripLeg_IntersectingEdge() { inline void TripLeg_IntersectingEdge::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (this != internal_default_instance()) delete _impl_.sign_; + if (has_has_begin_heading()) { + clear_has_begin_heading(); + } + if (has_has_prev_name_consistency()) { + clear_has_prev_name_consistency(); + } + if (has_has_curr_name_consistency()) { + clear_has_curr_name_consistency(); + } + if (has_has_driveability()) { + clear_has_driveability(); + } + if (has_has_cyclability()) { + clear_has_cyclability(); + } + if (has_has_walkability()) { + clear_has_walkability(); + } + if (has_has_use()) { + clear_has_use(); + } + if (has_has_road_class()) { + clear_has_road_class(); + } + if (has_has_lane_count()) { + clear_has_lane_count(); + } } void TripLeg_IntersectingEdge::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_IntersectingEdge::clear_has_begin_heading() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_begin_heading_case()) { + case kBeginHeading: { + // No need to clear + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_BEGIN_HEADING_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_prev_name_consistency() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_prev_name_consistency_case()) { + case kPrevNameConsistency: { + // No need to clear + break; + } + case HAS_PREV_NAME_CONSISTENCY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_PREV_NAME_CONSISTENCY_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_curr_name_consistency() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_curr_name_consistency_case()) { + case kCurrNameConsistency: { + // No need to clear + break; + } + case HAS_CURR_NAME_CONSISTENCY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_CURR_NAME_CONSISTENCY_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_driveability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_driveability_case()) { + case kDriveability: { + // No need to clear + break; + } + case HAS_DRIVEABILITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_DRIVEABILITY_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_cyclability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_cyclability_case()) { + case kCyclability: { + // No need to clear + break; + } + case HAS_CYCLABILITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_CYCLABILITY_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_walkability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_walkability_case()) { + case kWalkability: { + // No need to clear + break; + } + case HAS_WALKABILITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_WALKABILITY_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_use() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_use_case()) { + case kUse: { + // No need to clear + break; + } + case HAS_USE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_USE_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_road_class() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_road_class_case()) { + case kRoadClass: { + // No need to clear + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_ROAD_CLASS_NOT_SET; +} + +void TripLeg_IntersectingEdge::clear_has_lane_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.IntersectingEdge) + switch (has_lane_count_case()) { + case kLaneCount: { + // No need to clear + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_LANE_COUNT_NOT_SET; +} + + void TripLeg_IntersectingEdge::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.IntersectingEdge) uint32_t cached_has_bits = 0; @@ -3600,9 +6018,15 @@ void TripLeg_IntersectingEdge::Clear() { delete _impl_.sign_; } _impl_.sign_ = nullptr; - ::memset(&_impl_.begin_heading_, 0, static_cast( - reinterpret_cast(&_impl_.lane_count_) - - reinterpret_cast(&_impl_.begin_heading_)) + sizeof(_impl_.lane_count_)); + clear_has_begin_heading(); + clear_has_prev_name_consistency(); + clear_has_curr_name_consistency(); + clear_has_driveability(); + clear_has_cyclability(); + clear_has_walkability(); + clear_has_use(); + clear_has_road_class(); + clear_has_lane_count(); _internal_metadata_.Clear(); } @@ -3615,7 +6039,7 @@ const char* TripLeg_IntersectingEdge::_InternalParse(const char* ptr, ::_pbi::Pa // uint32 begin_heading = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.begin_heading_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_begin_heading(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3623,7 +6047,7 @@ const char* TripLeg_IntersectingEdge::_InternalParse(const char* ptr, ::_pbi::Pa // bool prev_name_consistency = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.prev_name_consistency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_prev_name_consistency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3631,7 +6055,7 @@ const char* TripLeg_IntersectingEdge::_InternalParse(const char* ptr, ::_pbi::Pa // bool curr_name_consistency = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.curr_name_consistency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_curr_name_consistency(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3684,7 +6108,7 @@ const char* TripLeg_IntersectingEdge::_InternalParse(const char* ptr, ::_pbi::Pa // uint32 lane_count = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.lane_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_lane_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -3727,60 +6151,60 @@ uint8_t* TripLeg_IntersectingEdge::_InternalSerialize( (void) cached_has_bits; // uint32 begin_heading = 1; - if (this->_internal_begin_heading() != 0) { + if (_internal_has_begin_heading()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_begin_heading(), target); } // bool prev_name_consistency = 2; - if (this->_internal_prev_name_consistency() != 0) { + if (_internal_has_prev_name_consistency()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_prev_name_consistency(), target); } // bool curr_name_consistency = 3; - if (this->_internal_curr_name_consistency() != 0) { + if (_internal_has_curr_name_consistency()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_curr_name_consistency(), target); } // .valhalla.TripLeg.Traversability driveability = 4; - if (this->_internal_driveability() != 0) { + if (_internal_has_driveability()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 4, this->_internal_driveability(), target); } // .valhalla.TripLeg.Traversability cyclability = 5; - if (this->_internal_cyclability() != 0) { + if (_internal_has_cyclability()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 5, this->_internal_cyclability(), target); } // .valhalla.TripLeg.Traversability walkability = 6; - if (this->_internal_walkability() != 0) { + if (_internal_has_walkability()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 6, this->_internal_walkability(), target); } // .valhalla.TripLeg.Use use = 7; - if (this->_internal_use() != 0) { + if (_internal_has_use()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 7, this->_internal_use(), target); } // .valhalla.RoadClass road_class = 8; - if (this->_internal_road_class() != 0) { + if (_internal_has_road_class()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 8, this->_internal_road_class(), target); } // uint32 lane_count = 9; - if (this->_internal_lane_count() != 0) { + if (_internal_has_lane_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_lane_count(), target); } @@ -3815,56 +6239,101 @@ size_t TripLeg_IntersectingEdge::ByteSizeLong() const { *_impl_.sign_); } - // uint32 begin_heading = 1; - if (this->_internal_begin_heading() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + switch (has_begin_heading_case()) { + // uint32 begin_heading = 1; + case kBeginHeading: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - - // bool prev_name_consistency = 2; - if (this->_internal_prev_name_consistency() != 0) { - total_size += 1 + 1; + switch (has_prev_name_consistency_case()) { + // bool prev_name_consistency = 2; + case kPrevNameConsistency: { + total_size += 1 + 1; + break; + } + case HAS_PREV_NAME_CONSISTENCY_NOT_SET: { + break; + } } - - // bool curr_name_consistency = 3; - if (this->_internal_curr_name_consistency() != 0) { - total_size += 1 + 1; + switch (has_curr_name_consistency_case()) { + // bool curr_name_consistency = 3; + case kCurrNameConsistency: { + total_size += 1 + 1; + break; + } + case HAS_CURR_NAME_CONSISTENCY_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Traversability driveability = 4; - if (this->_internal_driveability() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_driveability()); + switch (has_driveability_case()) { + // .valhalla.TripLeg.Traversability driveability = 4; + case kDriveability: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_driveability()); + break; + } + case HAS_DRIVEABILITY_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Traversability cyclability = 5; - if (this->_internal_cyclability() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_cyclability()); + switch (has_cyclability_case()) { + // .valhalla.TripLeg.Traversability cyclability = 5; + case kCyclability: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_cyclability()); + break; + } + case HAS_CYCLABILITY_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Traversability walkability = 6; - if (this->_internal_walkability() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_walkability()); + switch (has_walkability_case()) { + // .valhalla.TripLeg.Traversability walkability = 6; + case kWalkability: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_walkability()); + break; + } + case HAS_WALKABILITY_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Use use = 7; - if (this->_internal_use() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_use()); + switch (has_use_case()) { + // .valhalla.TripLeg.Use use = 7; + case kUse: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } } - - // .valhalla.RoadClass road_class = 8; - if (this->_internal_road_class() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_road_class()); + switch (has_road_class_case()) { + // .valhalla.RoadClass road_class = 8; + case kRoadClass: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } } - - // uint32 lane_count = 9; - if (this->_internal_lane_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_lane_count()); + switch (has_lane_count_case()) { + // uint32 lane_count = 9; + case kLaneCount: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -3890,32 +6359,86 @@ void TripLeg_IntersectingEdge::MergeFrom(const TripLeg_IntersectingEdge& from) { _this->_internal_mutable_sign()->::valhalla::TripSign::MergeFrom( from._internal_sign()); } - if (from._internal_begin_heading() != 0) { - _this->_internal_set_begin_heading(from._internal_begin_heading()); + switch (from.has_begin_heading_case()) { + case kBeginHeading: { + _this->_internal_set_begin_heading(from._internal_begin_heading()); + break; + } + case HAS_BEGIN_HEADING_NOT_SET: { + break; + } } - if (from._internal_prev_name_consistency() != 0) { - _this->_internal_set_prev_name_consistency(from._internal_prev_name_consistency()); + switch (from.has_prev_name_consistency_case()) { + case kPrevNameConsistency: { + _this->_internal_set_prev_name_consistency(from._internal_prev_name_consistency()); + break; + } + case HAS_PREV_NAME_CONSISTENCY_NOT_SET: { + break; + } } - if (from._internal_curr_name_consistency() != 0) { - _this->_internal_set_curr_name_consistency(from._internal_curr_name_consistency()); + switch (from.has_curr_name_consistency_case()) { + case kCurrNameConsistency: { + _this->_internal_set_curr_name_consistency(from._internal_curr_name_consistency()); + break; + } + case HAS_CURR_NAME_CONSISTENCY_NOT_SET: { + break; + } } - if (from._internal_driveability() != 0) { - _this->_internal_set_driveability(from._internal_driveability()); + switch (from.has_driveability_case()) { + case kDriveability: { + _this->_internal_set_driveability(from._internal_driveability()); + break; + } + case HAS_DRIVEABILITY_NOT_SET: { + break; + } } - if (from._internal_cyclability() != 0) { - _this->_internal_set_cyclability(from._internal_cyclability()); + switch (from.has_cyclability_case()) { + case kCyclability: { + _this->_internal_set_cyclability(from._internal_cyclability()); + break; + } + case HAS_CYCLABILITY_NOT_SET: { + break; + } } - if (from._internal_walkability() != 0) { - _this->_internal_set_walkability(from._internal_walkability()); + switch (from.has_walkability_case()) { + case kWalkability: { + _this->_internal_set_walkability(from._internal_walkability()); + break; + } + case HAS_WALKABILITY_NOT_SET: { + break; + } } - if (from._internal_use() != 0) { - _this->_internal_set_use(from._internal_use()); + switch (from.has_use_case()) { + case kUse: { + _this->_internal_set_use(from._internal_use()); + break; + } + case HAS_USE_NOT_SET: { + break; + } } - if (from._internal_road_class() != 0) { - _this->_internal_set_road_class(from._internal_road_class()); + switch (from.has_road_class_case()) { + case kRoadClass: { + _this->_internal_set_road_class(from._internal_road_class()); + break; + } + case HAS_ROAD_CLASS_NOT_SET: { + break; + } } - if (from._internal_lane_count() != 0) { - _this->_internal_set_lane_count(from._internal_lane_count()); + switch (from.has_lane_count_case()) { + case kLaneCount: { + _this->_internal_set_lane_count(from._internal_lane_count()); + break; + } + case HAS_LANE_COUNT_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -3934,12 +6457,25 @@ bool TripLeg_IntersectingEdge::IsInitialized() const { void TripLeg_IntersectingEdge::InternalSwap(TripLeg_IntersectingEdge* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_IntersectingEdge, _impl_.lane_count_) - + sizeof(TripLeg_IntersectingEdge::_impl_.lane_count_) - - PROTOBUF_FIELD_OFFSET(TripLeg_IntersectingEdge, _impl_.sign_)>( - reinterpret_cast(&_impl_.sign_), - reinterpret_cast(&other->_impl_.sign_)); + swap(_impl_.sign_, other->_impl_.sign_); + swap(_impl_.has_begin_heading_, other->_impl_.has_begin_heading_); + swap(_impl_.has_prev_name_consistency_, other->_impl_.has_prev_name_consistency_); + swap(_impl_.has_curr_name_consistency_, other->_impl_.has_curr_name_consistency_); + swap(_impl_.has_driveability_, other->_impl_.has_driveability_); + swap(_impl_.has_cyclability_, other->_impl_.has_cyclability_); + swap(_impl_.has_walkability_, other->_impl_.has_walkability_); + swap(_impl_.has_use_, other->_impl_.has_use_); + swap(_impl_.has_road_class_, other->_impl_.has_road_class_); + swap(_impl_.has_lane_count_, other->_impl_.has_lane_count_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); + swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); } std::string TripLeg_IntersectingEdge::GetTypeName() const { @@ -3963,14 +6499,32 @@ TripLeg_Cost::TripLeg_Cost(const TripLeg_Cost& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripLeg_Cost* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.seconds_){} - , decltype(_impl_.cost_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_seconds_){} + , decltype(_impl_.has_cost_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&_impl_.seconds_, &from._impl_.seconds_, - static_cast(reinterpret_cast(&_impl_.cost_) - - reinterpret_cast(&_impl_.seconds_)) + sizeof(_impl_.cost_)); + clear_has_has_seconds(); + switch (from.has_seconds_case()) { + case kSeconds: { + _this->_internal_set_seconds(from._internal_seconds()); + break; + } + case HAS_SECONDS_NOT_SET: { + break; + } + } + clear_has_has_cost(); + switch (from.has_cost_case()) { + case kCost: { + _this->_internal_set_cost(from._internal_cost()); + break; + } + case HAS_COST_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Cost) } @@ -3979,10 +6533,13 @@ inline void TripLeg_Cost::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.seconds_){0} - , decltype(_impl_.cost_){0} + decltype(_impl_.has_seconds_){} + , decltype(_impl_.has_cost_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_seconds(); + clear_has_has_cost(); } TripLeg_Cost::~TripLeg_Cost() { @@ -3996,21 +6553,55 @@ TripLeg_Cost::~TripLeg_Cost() { inline void TripLeg_Cost::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_has_seconds()) { + clear_has_seconds(); + } + if (has_has_cost()) { + clear_has_cost(); + } } void TripLeg_Cost::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_Cost::clear_has_seconds() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Cost) + switch (has_seconds_case()) { + case kSeconds: { + // No need to clear + break; + } + case HAS_SECONDS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_SECONDS_NOT_SET; +} + +void TripLeg_Cost::clear_has_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Cost) + switch (has_cost_case()) { + case kCost: { + // No need to clear + break; + } + case HAS_COST_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_COST_NOT_SET; +} + + void TripLeg_Cost::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Cost) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.seconds_, 0, static_cast( - reinterpret_cast(&_impl_.cost_) - - reinterpret_cast(&_impl_.seconds_)) + sizeof(_impl_.cost_)); + clear_has_seconds(); + clear_has_cost(); _internal_metadata_.Clear(); } @@ -4023,7 +6614,7 @@ const char* TripLeg_Cost::_InternalParse(const char* ptr, ::_pbi::ParseContext* // double seconds = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 9)) { - _impl_.seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; @@ -4031,7 +6622,7 @@ const char* TripLeg_Cost::_InternalParse(const char* ptr, ::_pbi::ParseContext* // double cost = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _impl_.cost_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_cost(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); } else goto handle_unusual; @@ -4066,21 +6657,13 @@ uint8_t* TripLeg_Cost::_InternalSerialize( (void) cached_has_bits; // double seconds = 1; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_seconds = this->_internal_seconds(); - uint64_t raw_seconds; - memcpy(&raw_seconds, &tmp_seconds, sizeof(tmp_seconds)); - if (raw_seconds != 0) { + if (_internal_has_seconds()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_seconds(), target); } // double cost = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_cost = this->_internal_cost(); - uint64_t raw_cost; - memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost)); - if (raw_cost != 0) { + if (_internal_has_cost()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_cost(), target); } @@ -4101,24 +6684,26 @@ size_t TripLeg_Cost::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // double seconds = 1; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_seconds = this->_internal_seconds(); - uint64_t raw_seconds; - memcpy(&raw_seconds, &tmp_seconds, sizeof(tmp_seconds)); - if (raw_seconds != 0) { - total_size += 1 + 8; + switch (has_seconds_case()) { + // double seconds = 1; + case kSeconds: { + total_size += 1 + 8; + break; + } + case HAS_SECONDS_NOT_SET: { + break; + } } - - // double cost = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_cost = this->_internal_cost(); - uint64_t raw_cost; - memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost)); - if (raw_cost != 0) { - total_size += 1 + 8; + switch (has_cost_case()) { + // double cost = 2; + case kCost: { + total_size += 1 + 8; + break; + } + case HAS_COST_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -4140,19 +6725,23 @@ void TripLeg_Cost::MergeFrom(const TripLeg_Cost& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_seconds = from._internal_seconds(); - uint64_t raw_seconds; - memcpy(&raw_seconds, &tmp_seconds, sizeof(tmp_seconds)); - if (raw_seconds != 0) { - _this->_internal_set_seconds(from._internal_seconds()); + switch (from.has_seconds_case()) { + case kSeconds: { + _this->_internal_set_seconds(from._internal_seconds()); + break; + } + case HAS_SECONDS_NOT_SET: { + break; + } } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_cost = from._internal_cost(); - uint64_t raw_cost; - memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost)); - if (raw_cost != 0) { - _this->_internal_set_cost(from._internal_cost()); + switch (from.has_cost_case()) { + case kCost: { + _this->_internal_set_cost(from._internal_cost()); + break; + } + case HAS_COST_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -4171,12 +6760,10 @@ bool TripLeg_Cost::IsInitialized() const { void TripLeg_Cost::InternalSwap(TripLeg_Cost* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_Cost, _impl_.cost_) - + sizeof(TripLeg_Cost::_impl_.cost_) - - PROTOBUF_FIELD_OFFSET(TripLeg_Cost, _impl_.seconds_)>( - reinterpret_cast(&_impl_.seconds_), - reinterpret_cast(&other->_impl_.seconds_)); + swap(_impl_.has_seconds_, other->_impl_.has_seconds_); + swap(_impl_.has_cost_, other->_impl_.has_cost_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string TripLeg_Cost::GetTypeName() const { @@ -4497,27 +7084,20 @@ TripLeg_Node::TripLeg_Node(const TripLeg_Node& from) new (&_impl_) Impl_{ decltype(_impl_.intersecting_edge_){from._impl_.intersecting_edge_} , decltype(_impl_.recosts_){from._impl_.recosts_} - , decltype(_impl_.time_zone_){} , decltype(_impl_.edge_){nullptr} , decltype(_impl_.transit_platform_info_){nullptr} , decltype(_impl_.transit_station_info_){nullptr} , decltype(_impl_.transit_egress_info_){nullptr} , decltype(_impl_.cost_){nullptr} , decltype(_impl_.bss_info_){nullptr} - , decltype(_impl_.admin_index_){} - , decltype(_impl_.type_){} - , decltype(_impl_.fork_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_admin_index_){} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_fork_){} + , decltype(_impl_.has_time_zone_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.time_zone_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.time_zone_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_time_zone().empty()) { - _this->_impl_.time_zone_.Set(from._internal_time_zone(), - _this->GetArenaForAllocation()); - } if (from._internal_has_edge()) { _this->_impl_.edge_ = new ::valhalla::TripLeg_Edge(*from._impl_.edge_); } @@ -4536,9 +7116,46 @@ TripLeg_Node::TripLeg_Node(const TripLeg_Node& from) if (from._internal_has_bss_info()) { _this->_impl_.bss_info_ = new ::valhalla::BikeShareStationInfo(*from._impl_.bss_info_); } - ::memcpy(&_impl_.admin_index_, &from._impl_.admin_index_, - static_cast(reinterpret_cast(&_impl_.fork_) - - reinterpret_cast(&_impl_.admin_index_)) + sizeof(_impl_.fork_)); + clear_has_has_admin_index(); + switch (from.has_admin_index_case()) { + case kAdminIndex: { + _this->_internal_set_admin_index(from._internal_admin_index()); + break; + } + case HAS_ADMIN_INDEX_NOT_SET: { + break; + } + } + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + clear_has_has_fork(); + switch (from.has_fork_case()) { + case kFork: { + _this->_internal_set_fork(from._internal_fork()); + break; + } + case HAS_FORK_NOT_SET: { + break; + } + } + clear_has_has_time_zone(); + switch (from.has_time_zone_case()) { + case kTimeZone: { + _this->_internal_set_time_zone(from._internal_time_zone()); + break; + } + case HAS_TIME_ZONE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Node) } @@ -4549,22 +7166,23 @@ inline void TripLeg_Node::SharedCtor( new (&_impl_) Impl_{ decltype(_impl_.intersecting_edge_){arena} , decltype(_impl_.recosts_){arena} - , decltype(_impl_.time_zone_){} , decltype(_impl_.edge_){nullptr} , decltype(_impl_.transit_platform_info_){nullptr} , decltype(_impl_.transit_station_info_){nullptr} , decltype(_impl_.transit_egress_info_){nullptr} , decltype(_impl_.cost_){nullptr} , decltype(_impl_.bss_info_){nullptr} - , decltype(_impl_.admin_index_){0u} - , decltype(_impl_.type_){0} - , decltype(_impl_.fork_){false} + , decltype(_impl_.has_admin_index_){} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_fork_){} + , decltype(_impl_.has_time_zone_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.time_zone_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.time_zone_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_admin_index(); + clear_has_has_type(); + clear_has_has_fork(); + clear_has_has_time_zone(); } TripLeg_Node::~TripLeg_Node() { @@ -4580,19 +7198,87 @@ inline void TripLeg_Node::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.intersecting_edge_.~RepeatedPtrField(); _impl_.recosts_.~RepeatedPtrField(); - _impl_.time_zone_.Destroy(); if (this != internal_default_instance()) delete _impl_.edge_; if (this != internal_default_instance()) delete _impl_.transit_platform_info_; if (this != internal_default_instance()) delete _impl_.transit_station_info_; if (this != internal_default_instance()) delete _impl_.transit_egress_info_; if (this != internal_default_instance()) delete _impl_.cost_; if (this != internal_default_instance()) delete _impl_.bss_info_; + if (has_has_admin_index()) { + clear_has_admin_index(); + } + if (has_has_type()) { + clear_has_type(); + } + if (has_has_fork()) { + clear_has_fork(); + } + if (has_has_time_zone()) { + clear_has_time_zone(); + } } void TripLeg_Node::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_Node::clear_has_admin_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Node) + switch (has_admin_index_case()) { + case kAdminIndex: { + // No need to clear + break; + } + case HAS_ADMIN_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ADMIN_INDEX_NOT_SET; +} + +void TripLeg_Node::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Node) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} + +void TripLeg_Node::clear_has_fork() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Node) + switch (has_fork_case()) { + case kFork: { + // No need to clear + break; + } + case HAS_FORK_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_FORK_NOT_SET; +} + +void TripLeg_Node::clear_has_time_zone() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Node) + switch (has_time_zone_case()) { + case kTimeZone: { + _impl_.has_time_zone_.time_zone_.Destroy(); + break; + } + case HAS_TIME_ZONE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_TIME_ZONE_NOT_SET; +} + + void TripLeg_Node::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Node) uint32_t cached_has_bits = 0; @@ -4601,7 +7287,6 @@ void TripLeg_Node::Clear() { _impl_.intersecting_edge_.Clear(); _impl_.recosts_.Clear(); - _impl_.time_zone_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.edge_ != nullptr) { delete _impl_.edge_; } @@ -4626,9 +7311,10 @@ void TripLeg_Node::Clear() { delete _impl_.bss_info_; } _impl_.bss_info_ = nullptr; - ::memset(&_impl_.admin_index_, 0, static_cast( - reinterpret_cast(&_impl_.fork_) - - reinterpret_cast(&_impl_.admin_index_)) + sizeof(_impl_.fork_)); + clear_has_admin_index(); + clear_has_type(); + clear_has_fork(); + clear_has_time_zone(); _internal_metadata_.Clear(); } @@ -4662,7 +7348,7 @@ const char* TripLeg_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* // uint32 admin_index = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.admin_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_admin_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -4679,7 +7365,7 @@ const char* TripLeg_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* // bool fork = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.fork_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_fork(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -4792,20 +7478,20 @@ uint8_t* TripLeg_Node::_InternalSerialize( } // uint32 admin_index = 3; - if (this->_internal_admin_index() != 0) { + if (_internal_has_admin_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_admin_index(), target); } // .valhalla.TripLeg.Node.Type type = 4; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 4, this->_internal_type(), target); } // bool fork = 5; - if (this->_internal_fork() != 0) { + if (_internal_has_fork()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_fork(), target); } @@ -4832,7 +7518,7 @@ uint8_t* TripLeg_Node::_InternalSerialize( } // string time_zone = 11; - if (!this->_internal_time_zone().empty()) { + if (_internal_has_time_zone()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_time_zone().data(), static_cast(this->_internal_time_zone().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -4893,13 +7579,6 @@ size_t TripLeg_Node::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string time_zone = 11; - if (!this->_internal_time_zone().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_time_zone()); - } - // .valhalla.TripLeg.Edge edge = 1; if (this->_internal_has_edge()) { total_size += 1 + @@ -4942,22 +7621,49 @@ size_t TripLeg_Node::ByteSizeLong() const { *_impl_.bss_info_); } - // uint32 admin_index = 3; - if (this->_internal_admin_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_admin_index()); + switch (has_admin_index_case()) { + // uint32 admin_index = 3; + case kAdminIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_admin_index()); + break; + } + case HAS_ADMIN_INDEX_NOT_SET: { + break; + } } - - // .valhalla.TripLeg.Node.Type type = 4; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_type_case()) { + // .valhalla.TripLeg.Node.Type type = 4; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - - // bool fork = 5; - if (this->_internal_fork() != 0) { - total_size += 1 + 1; + switch (has_fork_case()) { + // bool fork = 5; + case kFork: { + total_size += 1 + 1; + break; + } + case HAS_FORK_NOT_SET: { + break; + } + } + switch (has_time_zone_case()) { + // string time_zone = 11; + case kTimeZone: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_time_zone()); + break; + } + case HAS_TIME_ZONE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -4981,9 +7687,6 @@ void TripLeg_Node::MergeFrom(const TripLeg_Node& from) { _this->_impl_.intersecting_edge_.MergeFrom(from._impl_.intersecting_edge_); _this->_impl_.recosts_.MergeFrom(from._impl_.recosts_); - if (!from._internal_time_zone().empty()) { - _this->_internal_set_time_zone(from._internal_time_zone()); - } if (from._internal_has_edge()) { _this->_internal_mutable_edge()->::valhalla::TripLeg_Edge::MergeFrom( from._internal_edge()); @@ -5008,14 +7711,41 @@ void TripLeg_Node::MergeFrom(const TripLeg_Node& from) { _this->_internal_mutable_bss_info()->::valhalla::BikeShareStationInfo::MergeFrom( from._internal_bss_info()); } - if (from._internal_admin_index() != 0) { - _this->_internal_set_admin_index(from._internal_admin_index()); + switch (from.has_admin_index_case()) { + case kAdminIndex: { + _this->_internal_set_admin_index(from._internal_admin_index()); + break; + } + case HAS_ADMIN_INDEX_NOT_SET: { + break; + } + } + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_fork_case()) { + case kFork: { + _this->_internal_set_fork(from._internal_fork()); + break; + } + case HAS_FORK_NOT_SET: { + break; + } } - if (from._internal_fork() != 0) { - _this->_internal_set_fork(from._internal_fork()); + switch (from.has_time_zone_case()) { + case kTimeZone: { + _this->_internal_set_time_zone(from._internal_time_zone()); + break; + } + case HAS_TIME_ZONE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -5033,21 +7763,23 @@ bool TripLeg_Node::IsInitialized() const { void TripLeg_Node::InternalSwap(TripLeg_Node* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.intersecting_edge_.InternalSwap(&other->_impl_.intersecting_edge_); _impl_.recosts_.InternalSwap(&other->_impl_.recosts_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.time_zone_, lhs_arena, - &other->_impl_.time_zone_, rhs_arena - ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_Node, _impl_.fork_) - + sizeof(TripLeg_Node::_impl_.fork_) + PROTOBUF_FIELD_OFFSET(TripLeg_Node, _impl_.bss_info_) + + sizeof(TripLeg_Node::_impl_.bss_info_) - PROTOBUF_FIELD_OFFSET(TripLeg_Node, _impl_.edge_)>( reinterpret_cast(&_impl_.edge_), reinterpret_cast(&other->_impl_.edge_)); + swap(_impl_.has_admin_index_, other->_impl_.has_admin_index_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_.has_fork_, other->_impl_.has_fork_); + swap(_impl_.has_time_zone_, other->_impl_.has_time_zone_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); } std::string TripLeg_Node::GetTypeName() const { @@ -5071,44 +7803,53 @@ TripLeg_Admin::TripLeg_Admin(const TripLeg_Admin& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TripLeg_Admin* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.country_code_){} - , decltype(_impl_.country_text_){} - , decltype(_impl_.state_code_){} - , decltype(_impl_.state_text_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_country_code_){} + , decltype(_impl_.has_country_text_){} + , decltype(_impl_.has_state_code_){} + , decltype(_impl_.has_state_text_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.country_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_country_code().empty()) { - _this->_impl_.country_code_.Set(from._internal_country_code(), - _this->GetArenaForAllocation()); - } - _impl_.country_text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_country_text().empty()) { - _this->_impl_.country_text_.Set(from._internal_country_text(), - _this->GetArenaForAllocation()); - } - _impl_.state_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_state_code().empty()) { - _this->_impl_.state_code_.Set(from._internal_state_code(), - _this->GetArenaForAllocation()); - } - _impl_.state_text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_state_text().empty()) { - _this->_impl_.state_text_.Set(from._internal_state_text(), - _this->GetArenaForAllocation()); + clear_has_has_country_code(); + switch (from.has_country_code_case()) { + case kCountryCode: { + _this->_internal_set_country_code(from._internal_country_code()); + break; + } + case HAS_COUNTRY_CODE_NOT_SET: { + break; + } + } + clear_has_has_country_text(); + switch (from.has_country_text_case()) { + case kCountryText: { + _this->_internal_set_country_text(from._internal_country_text()); + break; + } + case HAS_COUNTRY_TEXT_NOT_SET: { + break; + } + } + clear_has_has_state_code(); + switch (from.has_state_code_case()) { + case kStateCode: { + _this->_internal_set_state_code(from._internal_state_code()); + break; + } + case HAS_STATE_CODE_NOT_SET: { + break; + } + } + clear_has_has_state_text(); + switch (from.has_state_text_case()) { + case kStateText: { + _this->_internal_set_state_text(from._internal_state_text()); + break; + } + case HAS_STATE_TEXT_NOT_SET: { + break; + } } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Admin) } @@ -5118,28 +7859,17 @@ inline void TripLeg_Admin::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.country_code_){} - , decltype(_impl_.country_text_){} - , decltype(_impl_.state_code_){} - , decltype(_impl_.state_text_){} + decltype(_impl_.has_country_code_){} + , decltype(_impl_.has_country_text_){} + , decltype(_impl_.has_state_code_){} + , decltype(_impl_.has_state_text_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.country_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.country_text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_code_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_code_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_text_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.state_text_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_country_code(); + clear_has_has_country_text(); + clear_has_has_state_code(); + clear_has_has_state_text(); } TripLeg_Admin::~TripLeg_Admin() { @@ -5153,26 +7883,91 @@ TripLeg_Admin::~TripLeg_Admin() { inline void TripLeg_Admin::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.country_code_.Destroy(); - _impl_.country_text_.Destroy(); - _impl_.state_code_.Destroy(); - _impl_.state_text_.Destroy(); + if (has_has_country_code()) { + clear_has_country_code(); + } + if (has_has_country_text()) { + clear_has_country_text(); + } + if (has_has_state_code()) { + clear_has_state_code(); + } + if (has_has_state_text()) { + clear_has_state_text(); + } } void TripLeg_Admin::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_Admin::clear_has_country_code() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Admin) + switch (has_country_code_case()) { + case kCountryCode: { + _impl_.has_country_code_.country_code_.Destroy(); + break; + } + case HAS_COUNTRY_CODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_COUNTRY_CODE_NOT_SET; +} + +void TripLeg_Admin::clear_has_country_text() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Admin) + switch (has_country_text_case()) { + case kCountryText: { + _impl_.has_country_text_.country_text_.Destroy(); + break; + } + case HAS_COUNTRY_TEXT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_COUNTRY_TEXT_NOT_SET; +} + +void TripLeg_Admin::clear_has_state_code() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Admin) + switch (has_state_code_case()) { + case kStateCode: { + _impl_.has_state_code_.state_code_.Destroy(); + break; + } + case HAS_STATE_CODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_STATE_CODE_NOT_SET; +} + +void TripLeg_Admin::clear_has_state_text() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Admin) + switch (has_state_text_case()) { + case kStateText: { + _impl_.has_state_text_.state_text_.Destroy(); + break; + } + case HAS_STATE_TEXT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_STATE_TEXT_NOT_SET; +} + + void TripLeg_Admin::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Admin) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.country_code_.ClearToEmpty(); - _impl_.country_text_.ClearToEmpty(); - _impl_.state_code_.ClearToEmpty(); - _impl_.state_text_.ClearToEmpty(); + clear_has_country_code(); + clear_has_country_text(); + clear_has_state_code(); + clear_has_state_text(); _internal_metadata_.Clear(); } @@ -5252,7 +8047,7 @@ uint8_t* TripLeg_Admin::_InternalSerialize( (void) cached_has_bits; // string country_code = 1; - if (!this->_internal_country_code().empty()) { + if (_internal_has_country_code()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_country_code().data(), static_cast(this->_internal_country_code().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5262,7 +8057,7 @@ uint8_t* TripLeg_Admin::_InternalSerialize( } // string country_text = 2; - if (!this->_internal_country_text().empty()) { + if (_internal_has_country_text()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_country_text().data(), static_cast(this->_internal_country_text().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5272,7 +8067,7 @@ uint8_t* TripLeg_Admin::_InternalSerialize( } // string state_code = 3; - if (!this->_internal_state_code().empty()) { + if (_internal_has_state_code()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_state_code().data(), static_cast(this->_internal_state_code().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5282,7 +8077,7 @@ uint8_t* TripLeg_Admin::_InternalSerialize( } // string state_text = 4; - if (!this->_internal_state_text().empty()) { + if (_internal_has_state_text()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_state_text().data(), static_cast(this->_internal_state_text().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5307,34 +8102,54 @@ size_t TripLeg_Admin::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string country_code = 1; - if (!this->_internal_country_code().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_country_code()); + switch (has_country_code_case()) { + // string country_code = 1; + case kCountryCode: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country_code()); + break; + } + case HAS_COUNTRY_CODE_NOT_SET: { + break; + } } - - // string country_text = 2; - if (!this->_internal_country_text().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_country_text()); + switch (has_country_text_case()) { + // string country_text = 2; + case kCountryText: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country_text()); + break; + } + case HAS_COUNTRY_TEXT_NOT_SET: { + break; + } } - - // string state_code = 3; - if (!this->_internal_state_code().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_state_code()); + switch (has_state_code_case()) { + // string state_code = 3; + case kStateCode: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_state_code()); + break; + } + case HAS_STATE_CODE_NOT_SET: { + break; + } } - - // string state_text = 4; - if (!this->_internal_state_text().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_state_text()); + switch (has_state_text_case()) { + // string state_text = 4; + case kStateText: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_state_text()); + break; + } + case HAS_STATE_TEXT_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -5356,17 +8171,41 @@ void TripLeg_Admin::MergeFrom(const TripLeg_Admin& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_country_code().empty()) { - _this->_internal_set_country_code(from._internal_country_code()); + switch (from.has_country_code_case()) { + case kCountryCode: { + _this->_internal_set_country_code(from._internal_country_code()); + break; + } + case HAS_COUNTRY_CODE_NOT_SET: { + break; + } } - if (!from._internal_country_text().empty()) { - _this->_internal_set_country_text(from._internal_country_text()); + switch (from.has_country_text_case()) { + case kCountryText: { + _this->_internal_set_country_text(from._internal_country_text()); + break; + } + case HAS_COUNTRY_TEXT_NOT_SET: { + break; + } } - if (!from._internal_state_code().empty()) { - _this->_internal_set_state_code(from._internal_state_code()); + switch (from.has_state_code_case()) { + case kStateCode: { + _this->_internal_set_state_code(from._internal_state_code()); + break; + } + case HAS_STATE_CODE_NOT_SET: { + break; + } } - if (!from._internal_state_text().empty()) { - _this->_internal_set_state_text(from._internal_state_text()); + switch (from.has_state_text_case()) { + case kStateText: { + _this->_internal_set_state_text(from._internal_state_text()); + break; + } + case HAS_STATE_TEXT_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -5384,25 +8223,15 @@ bool TripLeg_Admin::IsInitialized() const { void TripLeg_Admin::InternalSwap(TripLeg_Admin* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.country_code_, lhs_arena, - &other->_impl_.country_code_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.country_text_, lhs_arena, - &other->_impl_.country_text_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.state_code_, lhs_arena, - &other->_impl_.state_code_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.state_text_, lhs_arena, - &other->_impl_.state_text_, rhs_arena - ); + swap(_impl_.has_country_code_, other->_impl_.has_country_code_); + swap(_impl_.has_country_text_, other->_impl_.has_country_text_); + swap(_impl_.has_state_code_, other->_impl_.has_state_code_); + swap(_impl_.has_state_text_, other->_impl_.has_state_text_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); } std::string TripLeg_Admin::GetTypeName() const { @@ -5759,17 +8588,35 @@ TripLeg_Incident::TripLeg_Incident(const TripLeg_Incident& from) TripLeg_Incident* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.metadata_){nullptr} - , decltype(_impl_.begin_shape_index_){} - , decltype(_impl_.end_shape_index_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); if (from._internal_has_metadata()) { _this->_impl_.metadata_ = new ::valhalla::IncidentsTile_Metadata(*from._impl_.metadata_); } - ::memcpy(&_impl_.begin_shape_index_, &from._impl_.begin_shape_index_, - static_cast(reinterpret_cast(&_impl_.end_shape_index_) - - reinterpret_cast(&_impl_.begin_shape_index_)) + sizeof(_impl_.end_shape_index_)); + clear_has_has_begin_shape_index(); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_end_shape_index(); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg.Incident) } @@ -5779,10 +8626,13 @@ inline void TripLeg_Incident::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.metadata_){nullptr} - , decltype(_impl_.begin_shape_index_){0u} - , decltype(_impl_.end_shape_index_){0u} + , decltype(_impl_.has_begin_shape_index_){} + , decltype(_impl_.has_end_shape_index_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_begin_shape_index(); + clear_has_has_end_shape_index(); } TripLeg_Incident::~TripLeg_Incident() { @@ -5797,12 +8647,47 @@ TripLeg_Incident::~TripLeg_Incident() { inline void TripLeg_Incident::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); if (this != internal_default_instance()) delete _impl_.metadata_; + if (has_has_begin_shape_index()) { + clear_has_begin_shape_index(); + } + if (has_has_end_shape_index()) { + clear_has_end_shape_index(); + } } void TripLeg_Incident::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg_Incident::clear_has_begin_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Incident) + switch (has_begin_shape_index_case()) { + case kBeginShapeIndex: { + // No need to clear + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} + +void TripLeg_Incident::clear_has_end_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg.Incident) + switch (has_end_shape_index_case()) { + case kEndShapeIndex: { + // No need to clear + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_END_SHAPE_INDEX_NOT_SET; +} + + void TripLeg_Incident::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg.Incident) uint32_t cached_has_bits = 0; @@ -5813,9 +8698,8 @@ void TripLeg_Incident::Clear() { delete _impl_.metadata_; } _impl_.metadata_ = nullptr; - ::memset(&_impl_.begin_shape_index_, 0, static_cast( - reinterpret_cast(&_impl_.end_shape_index_) - - reinterpret_cast(&_impl_.begin_shape_index_)) + sizeof(_impl_.end_shape_index_)); + clear_has_begin_shape_index(); + clear_has_end_shape_index(); _internal_metadata_.Clear(); } @@ -5836,7 +8720,7 @@ const char* TripLeg_Incident::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 begin_shape_index = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.begin_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_begin_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -5844,7 +8728,7 @@ const char* TripLeg_Incident::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 end_shape_index = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.end_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_end_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -5886,13 +8770,13 @@ uint8_t* TripLeg_Incident::_InternalSerialize( } // uint32 begin_shape_index = 3; - if (this->_internal_begin_shape_index() != 0) { + if (_internal_has_begin_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_begin_shape_index(), target); } // uint32 end_shape_index = 4; - if (this->_internal_end_shape_index() != 0) { + if (_internal_has_end_shape_index()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_end_shape_index(), target); } @@ -5920,16 +8804,26 @@ size_t TripLeg_Incident::ByteSizeLong() const { *_impl_.metadata_); } - // uint32 begin_shape_index = 3; - if (this->_internal_begin_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + switch (has_begin_shape_index_case()) { + // uint32 begin_shape_index = 3; + case kBeginShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - - // uint32 end_shape_index = 4; - if (this->_internal_end_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + switch (has_end_shape_index_case()) { + // uint32 end_shape_index = 4; + case kEndShapeIndex: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -5955,11 +8849,23 @@ void TripLeg_Incident::MergeFrom(const TripLeg_Incident& from) { _this->_internal_mutable_metadata()->::valhalla::IncidentsTile_Metadata::MergeFrom( from._internal_metadata()); } - if (from._internal_begin_shape_index() != 0) { - _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + switch (from.has_begin_shape_index_case()) { + case kBeginShapeIndex: { + _this->_internal_set_begin_shape_index(from._internal_begin_shape_index()); + break; + } + case HAS_BEGIN_SHAPE_INDEX_NOT_SET: { + break; + } } - if (from._internal_end_shape_index() != 0) { - _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + switch (from.has_end_shape_index_case()) { + case kEndShapeIndex: { + _this->_internal_set_end_shape_index(from._internal_end_shape_index()); + break; + } + case HAS_END_SHAPE_INDEX_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -5978,12 +8884,11 @@ bool TripLeg_Incident::IsInitialized() const { void TripLeg_Incident::InternalSwap(TripLeg_Incident* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg_Incident, _impl_.end_shape_index_) - + sizeof(TripLeg_Incident::_impl_.end_shape_index_) - - PROTOBUF_FIELD_OFFSET(TripLeg_Incident, _impl_.metadata_)>( - reinterpret_cast(&_impl_.metadata_), - reinterpret_cast(&other->_impl_.metadata_)); + swap(_impl_.metadata_, other->_impl_.metadata_); + swap(_impl_.has_begin_shape_index_, other->_impl_.has_begin_shape_index_); + swap(_impl_.has_end_shape_index_, other->_impl_.has_end_shape_index_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string TripLeg_Incident::GetTypeName() const { @@ -6320,33 +9225,73 @@ TripLeg::TripLeg(const TripLeg& from) , decltype(_impl_.incidents_){from._impl_.incidents_} , decltype(_impl_.algorithms_){from._impl_.algorithms_} , decltype(_impl_.closures_){from._impl_.closures_} - , decltype(_impl_.shape_){} , decltype(_impl_.bbox_){nullptr} , decltype(_impl_.shape_attributes_){nullptr} - , decltype(_impl_.osm_changeset_){} - , decltype(_impl_.trip_id_){} - , decltype(_impl_.leg_id_){} - , decltype(_impl_.leg_count_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.has_osm_changeset_){} + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_leg_id_){} + , decltype(_impl_.has_leg_count_){} + , decltype(_impl_.has_shape_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.shape_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.shape_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_shape().empty()) { - _this->_impl_.shape_.Set(from._internal_shape(), - _this->GetArenaForAllocation()); - } if (from._internal_has_bbox()) { _this->_impl_.bbox_ = new ::valhalla::BoundingBox(*from._impl_.bbox_); } if (from._internal_has_shape_attributes()) { _this->_impl_.shape_attributes_ = new ::valhalla::TripLeg_ShapeAttributes(*from._impl_.shape_attributes_); } - ::memcpy(&_impl_.osm_changeset_, &from._impl_.osm_changeset_, - static_cast(reinterpret_cast(&_impl_.leg_count_) - - reinterpret_cast(&_impl_.osm_changeset_)) + sizeof(_impl_.leg_count_)); + clear_has_has_osm_changeset(); + switch (from.has_osm_changeset_case()) { + case kOsmChangeset: { + _this->_internal_set_osm_changeset(from._internal_osm_changeset()); + break; + } + case HAS_OSM_CHANGESET_NOT_SET: { + break; + } + } + clear_has_has_trip_id(); + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + clear_has_has_leg_id(); + switch (from.has_leg_id_case()) { + case kLegId: { + _this->_internal_set_leg_id(from._internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } + } + clear_has_has_leg_count(); + switch (from.has_leg_count_case()) { + case kLegCount: { + _this->_internal_set_leg_count(from._internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + clear_has_has_shape(); + switch (from.has_shape_case()) { + case kShape: { + _this->_internal_set_shape(from._internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TripLeg) } @@ -6361,19 +9306,21 @@ inline void TripLeg::SharedCtor( , decltype(_impl_.incidents_){arena} , decltype(_impl_.algorithms_){arena} , decltype(_impl_.closures_){arena} - , decltype(_impl_.shape_){} , decltype(_impl_.bbox_){nullptr} , decltype(_impl_.shape_attributes_){nullptr} - , decltype(_impl_.osm_changeset_){uint64_t{0u}} - , decltype(_impl_.trip_id_){uint64_t{0u}} - , decltype(_impl_.leg_id_){0u} - , decltype(_impl_.leg_count_){0u} + , decltype(_impl_.has_osm_changeset_){} + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_leg_id_){} + , decltype(_impl_.has_leg_count_){} + , decltype(_impl_.has_shape_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.shape_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.shape_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_osm_changeset(); + clear_has_has_trip_id(); + clear_has_has_leg_id(); + clear_has_has_leg_count(); + clear_has_has_shape(); } TripLeg::~TripLeg() { @@ -6393,15 +9340,100 @@ inline void TripLeg::SharedDtor() { _impl_.incidents_.~RepeatedPtrField(); _impl_.algorithms_.~RepeatedPtrField(); _impl_.closures_.~RepeatedPtrField(); - _impl_.shape_.Destroy(); if (this != internal_default_instance()) delete _impl_.bbox_; if (this != internal_default_instance()) delete _impl_.shape_attributes_; + if (has_has_osm_changeset()) { + clear_has_osm_changeset(); + } + if (has_has_trip_id()) { + clear_has_trip_id(); + } + if (has_has_leg_id()) { + clear_has_leg_id(); + } + if (has_has_leg_count()) { + clear_has_leg_count(); + } + if (has_has_shape()) { + clear_has_shape(); + } } void TripLeg::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TripLeg::clear_has_osm_changeset() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg) + switch (has_osm_changeset_case()) { + case kOsmChangeset: { + // No need to clear + break; + } + case HAS_OSM_CHANGESET_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_OSM_CHANGESET_NOT_SET; +} + +void TripLeg::clear_has_trip_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg) + switch (has_trip_id_case()) { + case kTripId: { + // No need to clear + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TRIP_ID_NOT_SET; +} + +void TripLeg::clear_has_leg_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg) + switch (has_leg_id_case()) { + case kLegId: { + // No need to clear + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_LEG_ID_NOT_SET; +} + +void TripLeg::clear_has_leg_count() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg) + switch (has_leg_count_case()) { + case kLegCount: { + // No need to clear + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_LEG_COUNT_NOT_SET; +} + +void TripLeg::clear_has_shape() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TripLeg) + switch (has_shape_case()) { + case kShape: { + _impl_.has_shape_.shape_.Destroy(); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_SHAPE_NOT_SET; +} + + void TripLeg::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TripLeg) uint32_t cached_has_bits = 0; @@ -6414,7 +9446,6 @@ void TripLeg::Clear() { _impl_.incidents_.Clear(); _impl_.algorithms_.Clear(); _impl_.closures_.Clear(); - _impl_.shape_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.bbox_ != nullptr) { delete _impl_.bbox_; } @@ -6423,9 +9454,11 @@ void TripLeg::Clear() { delete _impl_.shape_attributes_; } _impl_.shape_attributes_ = nullptr; - ::memset(&_impl_.osm_changeset_, 0, static_cast( - reinterpret_cast(&_impl_.leg_count_) - - reinterpret_cast(&_impl_.osm_changeset_)) + sizeof(_impl_.leg_count_)); + clear_has_osm_changeset(); + clear_has_trip_id(); + clear_has_leg_id(); + clear_has_leg_count(); + clear_has_shape(); _internal_metadata_.Clear(); } @@ -6438,7 +9471,7 @@ const char* TripLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint64 osm_changeset = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.osm_changeset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_osm_changeset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6446,7 +9479,7 @@ const char* TripLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint64 trip_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.trip_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_trip_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6454,7 +9487,7 @@ const char* TripLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint32 leg_id = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.leg_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_leg_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6462,7 +9495,7 @@ const char* TripLeg::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint32 leg_count = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.leg_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_leg_count(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6603,25 +9636,25 @@ uint8_t* TripLeg::_InternalSerialize( (void) cached_has_bits; // uint64 osm_changeset = 1; - if (this->_internal_osm_changeset() != 0) { + if (_internal_has_osm_changeset()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_osm_changeset(), target); } // uint64 trip_id = 2; - if (this->_internal_trip_id() != 0) { + if (_internal_has_trip_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_trip_id(), target); } // uint32 leg_id = 3; - if (this->_internal_leg_id() != 0) { + if (_internal_has_leg_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_leg_id(), target); } // uint32 leg_count = 4; - if (this->_internal_leg_count() != 0) { + if (_internal_has_leg_count()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_leg_count(), target); } @@ -6651,7 +9684,7 @@ uint8_t* TripLeg::_InternalSerialize( } // string shape = 8; - if (!this->_internal_shape().empty()) { + if (_internal_has_shape()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_shape().data(), static_cast(this->_internal_shape().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6759,13 +9792,6 @@ size_t TripLeg::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string shape = 8; - if (!this->_internal_shape().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_shape()); - } - // .valhalla.BoundingBox bbox = 9; if (this->_internal_has_bbox()) { total_size += 1 + @@ -6780,26 +9806,58 @@ size_t TripLeg::ByteSizeLong() const { *_impl_.shape_attributes_); } - // uint64 osm_changeset = 1; - if (this->_internal_osm_changeset() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_osm_changeset()); + switch (has_osm_changeset_case()) { + // uint64 osm_changeset = 1; + case kOsmChangeset: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_osm_changeset()); + break; + } + case HAS_OSM_CHANGESET_NOT_SET: { + break; + } } - - // uint64 trip_id = 2; - if (this->_internal_trip_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trip_id()); + switch (has_trip_id_case()) { + // uint64 trip_id = 2; + case kTripId: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } } - - // uint32 leg_id = 3; - if (this->_internal_leg_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_id()); + switch (has_leg_id_case()) { + // uint32 leg_id = 3; + case kLegId: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } } - - // uint32 leg_count = 4; - if (this->_internal_leg_count() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_count()); + switch (has_leg_count_case()) { + // uint32 leg_count = 4; + case kLegCount: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } + } + switch (has_shape_case()) { + // string shape = 8; + case kShape: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -6827,9 +9885,6 @@ void TripLeg::MergeFrom(const TripLeg& from) { _this->_impl_.incidents_.MergeFrom(from._impl_.incidents_); _this->_impl_.algorithms_.MergeFrom(from._impl_.algorithms_); _this->_impl_.closures_.MergeFrom(from._impl_.closures_); - if (!from._internal_shape().empty()) { - _this->_internal_set_shape(from._internal_shape()); - } if (from._internal_has_bbox()) { _this->_internal_mutable_bbox()->::valhalla::BoundingBox::MergeFrom( from._internal_bbox()); @@ -6838,17 +9893,50 @@ void TripLeg::MergeFrom(const TripLeg& from) { _this->_internal_mutable_shape_attributes()->::valhalla::TripLeg_ShapeAttributes::MergeFrom( from._internal_shape_attributes()); } - if (from._internal_osm_changeset() != 0) { - _this->_internal_set_osm_changeset(from._internal_osm_changeset()); + switch (from.has_osm_changeset_case()) { + case kOsmChangeset: { + _this->_internal_set_osm_changeset(from._internal_osm_changeset()); + break; + } + case HAS_OSM_CHANGESET_NOT_SET: { + break; + } + } + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } } - if (from._internal_trip_id() != 0) { - _this->_internal_set_trip_id(from._internal_trip_id()); + switch (from.has_leg_id_case()) { + case kLegId: { + _this->_internal_set_leg_id(from._internal_leg_id()); + break; + } + case HAS_LEG_ID_NOT_SET: { + break; + } } - if (from._internal_leg_id() != 0) { - _this->_internal_set_leg_id(from._internal_leg_id()); + switch (from.has_leg_count_case()) { + case kLegCount: { + _this->_internal_set_leg_count(from._internal_leg_count()); + break; + } + case HAS_LEG_COUNT_NOT_SET: { + break; + } } - if (from._internal_leg_count() != 0) { - _this->_internal_set_leg_count(from._internal_leg_count()); + switch (from.has_shape_case()) { + case kShape: { + _this->_internal_set_shape(from._internal_shape()); + break; + } + case HAS_SHAPE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -6866,8 +9954,6 @@ bool TripLeg::IsInitialized() const { void TripLeg::InternalSwap(TripLeg* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.location_.InternalSwap(&other->_impl_.location_); _impl_.node_.InternalSwap(&other->_impl_.node_); @@ -6875,16 +9961,22 @@ void TripLeg::InternalSwap(TripLeg* other) { _impl_.incidents_.InternalSwap(&other->_impl_.incidents_); _impl_.algorithms_.InternalSwap(&other->_impl_.algorithms_); _impl_.closures_.InternalSwap(&other->_impl_.closures_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.shape_, lhs_arena, - &other->_impl_.shape_, rhs_arena - ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TripLeg, _impl_.leg_count_) - + sizeof(TripLeg::_impl_.leg_count_) + PROTOBUF_FIELD_OFFSET(TripLeg, _impl_.shape_attributes_) + + sizeof(TripLeg::_impl_.shape_attributes_) - PROTOBUF_FIELD_OFFSET(TripLeg, _impl_.bbox_)>( reinterpret_cast(&_impl_.bbox_), reinterpret_cast(&other->_impl_.bbox_)); + swap(_impl_.has_osm_changeset_, other->_impl_.has_osm_changeset_); + swap(_impl_.has_trip_id_, other->_impl_.has_trip_id_); + swap(_impl_.has_leg_id_, other->_impl_.has_leg_id_); + swap(_impl_.has_leg_count_, other->_impl_.has_leg_count_); + swap(_impl_.has_shape_, other->_impl_.has_shape_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); } std::string TripLeg::GetTypeName() const { diff --git a/include/linux/valhalla/proto/trip.pb.h b/include/linux/valhalla/proto/trip.pb.h index dff5cff..5aa26da 100644 --- a/include/linux/valhalla/proto/trip.pb.h +++ b/include/linux/valhalla/proto/trip.pb.h @@ -29,7 +29,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -#include "common.pb.h" +#include "tripcommon.pb.h" #include "sign.pb.h" #include "incidents.pb.h" // @@protoc_insertion_point(includes) @@ -125,14 +125,12 @@ enum TripLeg_Node_Type : int { TripLeg_Node_Type_kBorderControl = 10, TripLeg_Node_Type_kTollGantry = 11, TripLeg_Node_Type_kSumpBuster = 12, - TripLeg_Node_Type_kBuildingEntrance = 13, - TripLeg_Node_Type_kElevator = 14, TripLeg_Node_Type_TripLeg_Node_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), TripLeg_Node_Type_TripLeg_Node_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool TripLeg_Node_Type_IsValid(int value); constexpr TripLeg_Node_Type TripLeg_Node_Type_Type_MIN = TripLeg_Node_Type_kStreetIntersection; -constexpr TripLeg_Node_Type TripLeg_Node_Type_Type_MAX = TripLeg_Node_Type_kElevator; +constexpr TripLeg_Node_Type TripLeg_Node_Type_Type_MAX = TripLeg_Node_Type_kSumpBuster; constexpr int TripLeg_Node_Type_Type_ARRAYSIZE = TripLeg_Node_Type_Type_MAX + 1; const std::string& TripLeg_Node_Type_Name(TripLeg_Node_Type value); @@ -190,14 +188,11 @@ enum TripLeg_Use : int { TripLeg_Use_kPedestrianUse = 28, TripLeg_Use_kBridlewayUse = 29, TripLeg_Use_kPedestrianCrossingUse = 32, - TripLeg_Use_kElevatorUse = 33, - TripLeg_Use_kEscalatorUse = 34, TripLeg_Use_kRestAreaUse = 30, TripLeg_Use_kServiceAreaUse = 31, TripLeg_Use_kOtherUse = 40, TripLeg_Use_kFerryUse = 41, TripLeg_Use_kRailFerryUse = 42, - TripLeg_Use_kConstructionUse = 43, TripLeg_Use_kRailUse = 50, TripLeg_Use_kBusUse = 51, TripLeg_Use_kEgressConnectionUse = 52, @@ -356,6 +351,21 @@ class TripLeg_LaneConnectivity final : static const TripLeg_LaneConnectivity& default_instance() { return *internal_default_instance(); } + enum HasFromWayIdCase { + kFromWayId = 1, + HAS_FROM_WAY_ID_NOT_SET = 0, + }; + + enum HasFromLanesCase { + kFromLanes = 2, + HAS_FROM_LANES_NOT_SET = 0, + }; + + enum HasToLanesCase { + kToLanes = 3, + HAS_TO_LANES_NOT_SET = 0, + }; + static inline const TripLeg_LaneConnectivity* internal_default_instance() { return reinterpret_cast( &_TripLeg_LaneConnectivity_default_instance_); @@ -425,11 +435,28 @@ class TripLeg_LaneConnectivity final : // accessors ------------------------------------------------------- enum : int { + kFromWayIdFieldNumber = 1, kFromLanesFieldNumber = 2, kToLanesFieldNumber = 3, - kFromWayIdFieldNumber = 1, }; + // uint64 from_way_id = 1; + bool has_from_way_id() const; + private: + bool _internal_has_from_way_id() const; + public: + void clear_from_way_id(); + uint64_t from_way_id() const; + void set_from_way_id(uint64_t value); + private: + uint64_t _internal_from_way_id() const; + void _internal_set_from_way_id(uint64_t value); + public: + // string from_lanes = 2; + bool has_from_lanes() const; + private: + bool _internal_has_from_lanes() const; + public: void clear_from_lanes(); const std::string& from_lanes() const; template @@ -444,6 +471,10 @@ class TripLeg_LaneConnectivity final : public: // string to_lanes = 3; + bool has_to_lanes() const; + private: + bool _internal_has_to_lanes() const; + public: void clear_to_lanes(); const std::string& to_lanes() const; template @@ -457,27 +488,50 @@ class TripLeg_LaneConnectivity final : std::string* _internal_mutable_to_lanes(); public: - // uint64 from_way_id = 1; - void clear_from_way_id(); - uint64_t from_way_id() const; - void set_from_way_id(uint64_t value); - private: - uint64_t _internal_from_way_id() const; - void _internal_set_from_way_id(uint64_t value); - public: - + void clear_has_from_way_id(); + HasFromWayIdCase has_from_way_id_case() const; + void clear_has_from_lanes(); + HasFromLanesCase has_from_lanes_case() const; + void clear_has_to_lanes(); + HasToLanesCase has_to_lanes_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.LaneConnectivity) private: class _Internal; + void set_has_from_way_id(); + void set_has_from_lanes(); + void set_has_to_lanes(); + + inline bool has_has_from_way_id() const; + inline void clear_has_has_from_way_id(); + + inline bool has_has_from_lanes() const; + inline void clear_has_has_from_lanes(); + + inline bool has_has_to_lanes() const; + inline void clear_has_has_to_lanes(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr from_lanes_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr to_lanes_; - uint64_t from_way_id_; + union HasFromWayIdUnion { + constexpr HasFromWayIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t from_way_id_; + } has_from_way_id_; + union HasFromLanesUnion { + constexpr HasFromLanesUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr from_lanes_; + } has_from_lanes_; + union HasToLanesUnion { + constexpr HasToLanesUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr to_lanes_; + } has_to_lanes_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[3]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -518,6 +572,31 @@ class TripLeg_TrafficSegment final : static const TripLeg_TrafficSegment& default_instance() { return *internal_default_instance(); } + enum HasSegmentIdCase { + kSegmentId = 1, + HAS_SEGMENT_ID_NOT_SET = 0, + }; + + enum HasBeginPercentCase { + kBeginPercent = 2, + HAS_BEGIN_PERCENT_NOT_SET = 0, + }; + + enum HasEndPercentCase { + kEndPercent = 3, + HAS_END_PERCENT_NOT_SET = 0, + }; + + enum HasStartsSegmentCase { + kStartsSegment = 4, + HAS_STARTS_SEGMENT_NOT_SET = 0, + }; + + enum HasEndsSegmentCase { + kEndsSegment = 5, + HAS_ENDS_SEGMENT_NOT_SET = 0, + }; + static inline const TripLeg_TrafficSegment* internal_default_instance() { return reinterpret_cast( &_TripLeg_TrafficSegment_default_instance_); @@ -594,6 +673,10 @@ class TripLeg_TrafficSegment final : kEndsSegmentFieldNumber = 5, }; // uint64 segment_id = 1; + bool has_segment_id() const; + private: + bool _internal_has_segment_id() const; + public: void clear_segment_id(); uint64_t segment_id() const; void set_segment_id(uint64_t value); @@ -603,6 +686,10 @@ class TripLeg_TrafficSegment final : public: // float begin_percent = 2; + bool has_begin_percent() const; + private: + bool _internal_has_begin_percent() const; + public: void clear_begin_percent(); float begin_percent() const; void set_begin_percent(float value); @@ -612,6 +699,10 @@ class TripLeg_TrafficSegment final : public: // float end_percent = 3; + bool has_end_percent() const; + private: + bool _internal_has_end_percent() const; + public: void clear_end_percent(); float end_percent() const; void set_end_percent(float value); @@ -621,6 +712,10 @@ class TripLeg_TrafficSegment final : public: // bool starts_segment = 4; + bool has_starts_segment() const; + private: + bool _internal_has_starts_segment() const; + public: void clear_starts_segment(); bool starts_segment() const; void set_starts_segment(bool value); @@ -630,6 +725,10 @@ class TripLeg_TrafficSegment final : public: // bool ends_segment = 5; + bool has_ends_segment() const; + private: + bool _internal_has_ends_segment() const; + public: void clear_ends_segment(); bool ends_segment() const; void set_ends_segment(bool value); @@ -638,20 +737,72 @@ class TripLeg_TrafficSegment final : void _internal_set_ends_segment(bool value); public: + void clear_has_segment_id(); + HasSegmentIdCase has_segment_id_case() const; + void clear_has_begin_percent(); + HasBeginPercentCase has_begin_percent_case() const; + void clear_has_end_percent(); + HasEndPercentCase has_end_percent_case() const; + void clear_has_starts_segment(); + HasStartsSegmentCase has_starts_segment_case() const; + void clear_has_ends_segment(); + HasEndsSegmentCase has_ends_segment_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.TrafficSegment) private: class _Internal; + void set_has_segment_id(); + void set_has_begin_percent(); + void set_has_end_percent(); + void set_has_starts_segment(); + void set_has_ends_segment(); + + inline bool has_has_segment_id() const; + inline void clear_has_has_segment_id(); + + inline bool has_has_begin_percent() const; + inline void clear_has_has_begin_percent(); + + inline bool has_has_end_percent() const; + inline void clear_has_has_end_percent(); + + inline bool has_has_starts_segment() const; + inline void clear_has_has_starts_segment(); + + inline bool has_has_ends_segment() const; + inline void clear_has_has_ends_segment(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - uint64_t segment_id_; - float begin_percent_; - float end_percent_; - bool starts_segment_; - bool ends_segment_; + union HasSegmentIdUnion { + constexpr HasSegmentIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t segment_id_; + } has_segment_id_; + union HasBeginPercentUnion { + constexpr HasBeginPercentUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float begin_percent_; + } has_begin_percent_; + union HasEndPercentUnion { + constexpr HasEndPercentUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float end_percent_; + } has_end_percent_; + union HasStartsSegmentUnion { + constexpr HasStartsSegmentUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool starts_segment_; + } has_starts_segment_; + union HasEndsSegmentUnion { + constexpr HasEndsSegmentUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool ends_segment_; + } has_ends_segment_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[5]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -692,6 +843,11 @@ class TripLeg_Restriction final : static const TripLeg_Restriction& default_instance() { return *internal_default_instance(); } + enum HasTypeCase { + kType = 1, + HAS_TYPE_NOT_SET = 0, + }; + static inline const TripLeg_Restriction* internal_default_instance() { return reinterpret_cast( &_TripLeg_Restriction_default_instance_); @@ -764,6 +920,10 @@ class TripLeg_Restriction final : kTypeFieldNumber = 1, }; // uint32 type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: void clear_type(); uint32_t type() const; void set_type(uint32_t value); @@ -772,16 +932,28 @@ class TripLeg_Restriction final : void _internal_set_type(uint32_t value); public: + void clear_has_type(); + HasTypeCase has_type_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Restriction) private: class _Internal; + void set_has_type(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - uint32_t type_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t type_; + } has_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -822,6 +994,236 @@ class TripLeg_Edge final : static const TripLeg_Edge& default_instance() { return *internal_default_instance(); } + enum HasLengthKmCase { + kLengthKm = 2, + HAS_LENGTH_KM_NOT_SET = 0, + }; + + enum HasSpeedCase { + kSpeed = 3, + HAS_SPEED_NOT_SET = 0, + }; + + enum HasRoadClassCase { + kRoadClass = 4, + HAS_ROAD_CLASS_NOT_SET = 0, + }; + + enum HasBeginHeadingCase { + kBeginHeading = 5, + HAS_BEGIN_HEADING_NOT_SET = 0, + }; + + enum HasEndHeadingCase { + kEndHeading = 6, + HAS_END_HEADING_NOT_SET = 0, + }; + + enum HasBeginShapeIndexCase { + kBeginShapeIndex = 7, + HAS_BEGIN_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasEndShapeIndexCase { + kEndShapeIndex = 8, + HAS_END_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasTraversabilityCase { + kTraversability = 9, + HAS_TRAVERSABILITY_NOT_SET = 0, + }; + + enum HasUseCase { + kUse = 10, + HAS_USE_NOT_SET = 0, + }; + + enum HasTollCase { + kToll = 11, + HAS_TOLL_NOT_SET = 0, + }; + + enum HasUnpavedCase { + kUnpaved = 12, + HAS_UNPAVED_NOT_SET = 0, + }; + + enum HasTunnelCase { + kTunnel = 13, + HAS_TUNNEL_NOT_SET = 0, + }; + + enum HasBridgeCase { + kBridge = 14, + HAS_BRIDGE_NOT_SET = 0, + }; + + enum HasRoundaboutCase { + kRoundabout = 15, + HAS_ROUNDABOUT_NOT_SET = 0, + }; + + enum HasInternalIntersectionCase { + kInternalIntersection = 16, + HAS_INTERNAL_INTERSECTION_NOT_SET = 0, + }; + + enum HasDriveOnLeftCase { + kDriveOnLeft = 17, + HAS_DRIVE_ON_LEFT_NOT_SET = 0, + }; + + enum HasSurfaceCase { + kSurface = 18, + HAS_SURFACE_NOT_SET = 0, + }; + + enum HasTravelModeCase { + kTravelMode = 20, + HAS_TRAVEL_MODE_NOT_SET = 0, + }; + + enum HasVehicleTypeCase { + kVehicleType = 21, + HAS_VEHICLE_TYPE_NOT_SET = 0, + }; + + enum HasPedestrianTypeCase { + kPedestrianType = 22, + HAS_PEDESTRIAN_TYPE_NOT_SET = 0, + }; + + enum HasBicycleTypeCase { + kBicycleType = 23, + HAS_BICYCLE_TYPE_NOT_SET = 0, + }; + + enum HasTransitTypeCase { + kTransitType = 24, + HAS_TRANSIT_TYPE_NOT_SET = 0, + }; + + enum HasIdCase { + kId = 26, + HAS_ID_NOT_SET = 0, + }; + + enum HasWayIdCase { + kWayId = 27, + HAS_WAY_ID_NOT_SET = 0, + }; + + enum HasWeightedGradeCase { + kWeightedGrade = 28, + HAS_WEIGHTED_GRADE_NOT_SET = 0, + }; + + enum HasMaxUpwardGradeCase { + kMaxUpwardGrade = 29, + HAS_MAX_UPWARD_GRADE_NOT_SET = 0, + }; + + enum HasMaxDownwardGradeCase { + kMaxDownwardGrade = 30, + HAS_MAX_DOWNWARD_GRADE_NOT_SET = 0, + }; + + enum HasLaneCountCase { + kLaneCount = 31, + HAS_LANE_COUNT_NOT_SET = 0, + }; + + enum HasCycleLaneCase { + kCycleLane = 32, + HAS_CYCLE_LANE_NOT_SET = 0, + }; + + enum HasBicycleNetworkCase { + kBicycleNetwork = 33, + HAS_BICYCLE_NETWORK_NOT_SET = 0, + }; + + enum HasSidewalkCase { + kSidewalk = 34, + HAS_SIDEWALK_NOT_SET = 0, + }; + + enum HasDensityCase { + kDensity = 35, + HAS_DENSITY_NOT_SET = 0, + }; + + enum HasSpeedLimitCase { + kSpeedLimit = 36, + HAS_SPEED_LIMIT_NOT_SET = 0, + }; + + enum HasTruckSpeedCase { + kTruckSpeed = 37, + HAS_TRUCK_SPEED_NOT_SET = 0, + }; + + enum HasTruckRouteCase { + kTruckRoute = 38, + HAS_TRUCK_ROUTE_NOT_SET = 0, + }; + + enum HasMeanElevationCase { + kMeanElevation = 40, + HAS_MEAN_ELEVATION_NOT_SET = 0, + }; + + enum HasHasTimeRestrictionsCase { + kHasTimeRestrictions = 43, + HAS_HAS_TIME_RESTRICTIONS_NOT_SET = 0, + }; + + enum HasDefaultSpeedCase { + kDefaultSpeed = 44, + HAS_DEFAULT_SPEED_NOT_SET = 0, + }; + + enum HasDestinationOnlyCase { + kDestinationOnly = 46, + HAS_DESTINATION_ONLY_NOT_SET = 0, + }; + + enum HasIsUrbanCase { + kIsUrban = 47, + HAS_IS_URBAN_NOT_SET = 0, + }; + + enum HasSourceAlongEdgeCase { + kSourceAlongEdge = 49, + HAS_SOURCE_ALONG_EDGE_NOT_SET = 0, + }; + + enum HasTargetAlongEdgeCase { + kTargetAlongEdge = 50, + HAS_TARGET_ALONG_EDGE_NOT_SET = 0, + }; + + enum HasSacScaleCase { + kSacScale = 51, + HAS_SAC_SCALE_NOT_SET = 0, + }; + + enum HasShoulderCase { + kShoulder = 52, + HAS_SHOULDER_NOT_SET = 0, + }; + + enum HasTotalLengthKmCase { + kTotalLengthKm = 53, + HAS_TOTAL_LENGTH_KM_NOT_SET = 0, + }; + + enum HasShortcutIdCase { + kShortcutId = 54, + HAS_SHORTCUT_ID_NOT_SET = 0, + }; + static inline const TripLeg_Edge* internal_default_instance() { return reinterpret_cast( &_TripLeg_Edge_default_instance_); @@ -912,38 +1314,39 @@ class TripLeg_Edge final : kUnpavedFieldNumber = 12, kTunnelFieldNumber = 13, kBridgeFieldNumber = 14, - kSurfaceFieldNumber = 18, - kTravelModeFieldNumber = 20, kRoundaboutFieldNumber = 15, kInternalIntersectionFieldNumber = 16, kDriveOnLeftFieldNumber = 17, - kBicycleNetworkFieldNumber = 33, + kSurfaceFieldNumber = 18, + kTravelModeFieldNumber = 20, kVehicleTypeFieldNumber = 21, kPedestrianTypeFieldNumber = 22, kBicycleTypeFieldNumber = 23, - kIdFieldNumber = 26, kTransitTypeFieldNumber = 24, - kWeightedGradeFieldNumber = 28, + kIdFieldNumber = 26, kWayIdFieldNumber = 27, + kWeightedGradeFieldNumber = 28, kMaxUpwardGradeFieldNumber = 29, kMaxDownwardGradeFieldNumber = 30, kLaneCountFieldNumber = 31, kCycleLaneFieldNumber = 32, + kBicycleNetworkFieldNumber = 33, kSidewalkFieldNumber = 34, kDensityFieldNumber = 35, kSpeedLimitFieldNumber = 36, kTruckSpeedFieldNumber = 37, - kMeanElevationFieldNumber = 40, kTruckRouteFieldNumber = 38, + kMeanElevationFieldNumber = 40, kHasTimeRestrictionsFieldNumber = 43, + kDefaultSpeedFieldNumber = 44, kDestinationOnlyFieldNumber = 46, kIsUrbanFieldNumber = 47, - kDefaultSpeedFieldNumber = 44, kSourceAlongEdgeFieldNumber = 49, kTargetAlongEdgeFieldNumber = 50, kSacScaleFieldNumber = 51, kShoulderFieldNumber = 52, - kIndoorFieldNumber = 53, + kTotalLengthKmFieldNumber = 53, + kShortcutIdFieldNumber = 54, }; // repeated .valhalla.StreetName name = 1; int name_size() const; @@ -1090,6 +1493,10 @@ class TripLeg_Edge final : ::valhalla::TripLeg_Restriction* unsafe_arena_release_restriction(); // float length_km = 2; + bool has_length_km() const; + private: + bool _internal_has_length_km() const; + public: void clear_length_km(); float length_km() const; void set_length_km(float value); @@ -1099,6 +1506,10 @@ class TripLeg_Edge final : public: // float speed = 3; + bool has_speed() const; + private: + bool _internal_has_speed() const; + public: void clear_speed(); float speed() const; void set_speed(float value); @@ -1108,6 +1519,10 @@ class TripLeg_Edge final : public: // .valhalla.RoadClass road_class = 4; + bool has_road_class() const; + private: + bool _internal_has_road_class() const; + public: void clear_road_class(); ::valhalla::RoadClass road_class() const; void set_road_class(::valhalla::RoadClass value); @@ -1117,6 +1532,10 @@ class TripLeg_Edge final : public: // uint32 begin_heading = 5; + bool has_begin_heading() const; + private: + bool _internal_has_begin_heading() const; + public: void clear_begin_heading(); uint32_t begin_heading() const; void set_begin_heading(uint32_t value); @@ -1126,6 +1545,10 @@ class TripLeg_Edge final : public: // uint32 end_heading = 6; + bool has_end_heading() const; + private: + bool _internal_has_end_heading() const; + public: void clear_end_heading(); uint32_t end_heading() const; void set_end_heading(uint32_t value); @@ -1135,6 +1558,10 @@ class TripLeg_Edge final : public: // uint32 begin_shape_index = 7; + bool has_begin_shape_index() const; + private: + bool _internal_has_begin_shape_index() const; + public: void clear_begin_shape_index(); uint32_t begin_shape_index() const; void set_begin_shape_index(uint32_t value); @@ -1144,6 +1571,10 @@ class TripLeg_Edge final : public: // uint32 end_shape_index = 8; + bool has_end_shape_index() const; + private: + bool _internal_has_end_shape_index() const; + public: void clear_end_shape_index(); uint32_t end_shape_index() const; void set_end_shape_index(uint32_t value); @@ -1153,6 +1584,10 @@ class TripLeg_Edge final : public: // .valhalla.TripLeg.Traversability traversability = 9; + bool has_traversability() const; + private: + bool _internal_has_traversability() const; + public: void clear_traversability(); ::valhalla::TripLeg_Traversability traversability() const; void set_traversability(::valhalla::TripLeg_Traversability value); @@ -1162,6 +1597,10 @@ class TripLeg_Edge final : public: // .valhalla.TripLeg.Use use = 10; + bool has_use() const; + private: + bool _internal_has_use() const; + public: void clear_use(); ::valhalla::TripLeg_Use use() const; void set_use(::valhalla::TripLeg_Use value); @@ -1171,6 +1610,10 @@ class TripLeg_Edge final : public: // bool toll = 11; + bool has_toll() const; + private: + bool _internal_has_toll() const; + public: void clear_toll(); bool toll() const; void set_toll(bool value); @@ -1180,6 +1623,10 @@ class TripLeg_Edge final : public: // bool unpaved = 12; + bool has_unpaved() const; + private: + bool _internal_has_unpaved() const; + public: void clear_unpaved(); bool unpaved() const; void set_unpaved(bool value); @@ -1189,6 +1636,10 @@ class TripLeg_Edge final : public: // bool tunnel = 13; + bool has_tunnel() const; + private: + bool _internal_has_tunnel() const; + public: void clear_tunnel(); bool tunnel() const; void set_tunnel(bool value); @@ -1198,6 +1649,10 @@ class TripLeg_Edge final : public: // bool bridge = 14; + bool has_bridge() const; + private: + bool _internal_has_bridge() const; + public: void clear_bridge(); bool bridge() const; void set_bridge(bool value); @@ -1206,25 +1661,11 @@ class TripLeg_Edge final : void _internal_set_bridge(bool value); public: - // .valhalla.TripLeg.Surface surface = 18; - void clear_surface(); - ::valhalla::TripLeg_Surface surface() const; - void set_surface(::valhalla::TripLeg_Surface value); - private: - ::valhalla::TripLeg_Surface _internal_surface() const; - void _internal_set_surface(::valhalla::TripLeg_Surface value); - public: - - // .valhalla.TravelMode travel_mode = 20; - void clear_travel_mode(); - ::valhalla::TravelMode travel_mode() const; - void set_travel_mode(::valhalla::TravelMode value); + // bool roundabout = 15; + bool has_roundabout() const; private: - ::valhalla::TravelMode _internal_travel_mode() const; - void _internal_set_travel_mode(::valhalla::TravelMode value); + bool _internal_has_roundabout() const; public: - - // bool roundabout = 15; void clear_roundabout(); bool roundabout() const; void set_roundabout(bool value); @@ -1234,6 +1675,10 @@ class TripLeg_Edge final : public: // bool internal_intersection = 16; + bool has_internal_intersection() const; + private: + bool _internal_has_internal_intersection() const; + public: void clear_internal_intersection(); bool internal_intersection() const; void set_internal_intersection(bool value); @@ -1243,6 +1688,10 @@ class TripLeg_Edge final : public: // bool drive_on_left = 17; + bool has_drive_on_left() const; + private: + bool _internal_has_drive_on_left() const; + public: void clear_drive_on_left(); bool drive_on_left() const; void set_drive_on_left(bool value); @@ -1251,27 +1700,52 @@ class TripLeg_Edge final : void _internal_set_drive_on_left(bool value); public: - // bool bicycle_network = 33; - void clear_bicycle_network(); - bool bicycle_network() const; - void set_bicycle_network(bool value); + // .valhalla.TripLeg.Surface surface = 18; + bool has_surface() const; private: - bool _internal_bicycle_network() const; - void _internal_set_bicycle_network(bool value); + bool _internal_has_surface() const; public: - - // .valhalla.VehicleType vehicle_type = 21; - void clear_vehicle_type(); - ::valhalla::VehicleType vehicle_type() const; - void set_vehicle_type(::valhalla::VehicleType value); + void clear_surface(); + ::valhalla::TripLeg_Surface surface() const; + void set_surface(::valhalla::TripLeg_Surface value); private: - ::valhalla::VehicleType _internal_vehicle_type() const; - void _internal_set_vehicle_type(::valhalla::VehicleType value); + ::valhalla::TripLeg_Surface _internal_surface() const; + void _internal_set_surface(::valhalla::TripLeg_Surface value); public: - // .valhalla.PedestrianType pedestrian_type = 22; - void clear_pedestrian_type(); - ::valhalla::PedestrianType pedestrian_type() const; + // .valhalla.TravelMode travel_mode = 20; + bool has_travel_mode() const; + private: + bool _internal_has_travel_mode() const; + public: + void clear_travel_mode(); + ::valhalla::TravelMode travel_mode() const; + void set_travel_mode(::valhalla::TravelMode value); + private: + ::valhalla::TravelMode _internal_travel_mode() const; + void _internal_set_travel_mode(::valhalla::TravelMode value); + public: + + // .valhalla.VehicleType vehicle_type = 21; + bool has_vehicle_type() const; + private: + bool _internal_has_vehicle_type() const; + public: + void clear_vehicle_type(); + ::valhalla::VehicleType vehicle_type() const; + void set_vehicle_type(::valhalla::VehicleType value); + private: + ::valhalla::VehicleType _internal_vehicle_type() const; + void _internal_set_vehicle_type(::valhalla::VehicleType value); + public: + + // .valhalla.PedestrianType pedestrian_type = 22; + bool has_pedestrian_type() const; + private: + bool _internal_has_pedestrian_type() const; + public: + void clear_pedestrian_type(); + ::valhalla::PedestrianType pedestrian_type() const; void set_pedestrian_type(::valhalla::PedestrianType value); private: ::valhalla::PedestrianType _internal_pedestrian_type() const; @@ -1279,6 +1753,10 @@ class TripLeg_Edge final : public: // .valhalla.BicycleType bicycle_type = 23; + bool has_bicycle_type() const; + private: + bool _internal_has_bicycle_type() const; + public: void clear_bicycle_type(); ::valhalla::BicycleType bicycle_type() const; void set_bicycle_type(::valhalla::BicycleType value); @@ -1287,16 +1765,11 @@ class TripLeg_Edge final : void _internal_set_bicycle_type(::valhalla::BicycleType value); public: - // uint64 id = 26; - void clear_id(); - uint64_t id() const; - void set_id(uint64_t value); + // .valhalla.TransitType transit_type = 24; + bool has_transit_type() const; private: - uint64_t _internal_id() const; - void _internal_set_id(uint64_t value); + bool _internal_has_transit_type() const; public: - - // .valhalla.TransitType transit_type = 24; void clear_transit_type(); ::valhalla::TransitType transit_type() const; void set_transit_type(::valhalla::TransitType value); @@ -1305,16 +1778,24 @@ class TripLeg_Edge final : void _internal_set_transit_type(::valhalla::TransitType value); public: - // float weighted_grade = 28; - void clear_weighted_grade(); - float weighted_grade() const; - void set_weighted_grade(float value); + // uint64 id = 26; + bool has_id() const; private: - float _internal_weighted_grade() const; - void _internal_set_weighted_grade(float value); + bool _internal_has_id() const; + public: + void clear_id(); + uint64_t id() const; + void set_id(uint64_t value); + private: + uint64_t _internal_id() const; + void _internal_set_id(uint64_t value); public: // uint64 way_id = 27; + bool has_way_id() const; + private: + bool _internal_has_way_id() const; + public: void clear_way_id(); uint64_t way_id() const; void set_way_id(uint64_t value); @@ -1323,7 +1804,24 @@ class TripLeg_Edge final : void _internal_set_way_id(uint64_t value); public: + // float weighted_grade = 28; + bool has_weighted_grade() const; + private: + bool _internal_has_weighted_grade() const; + public: + void clear_weighted_grade(); + float weighted_grade() const; + void set_weighted_grade(float value); + private: + float _internal_weighted_grade() const; + void _internal_set_weighted_grade(float value); + public: + // int32 max_upward_grade = 29; + bool has_max_upward_grade() const; + private: + bool _internal_has_max_upward_grade() const; + public: void clear_max_upward_grade(); int32_t max_upward_grade() const; void set_max_upward_grade(int32_t value); @@ -1333,6 +1831,10 @@ class TripLeg_Edge final : public: // int32 max_downward_grade = 30; + bool has_max_downward_grade() const; + private: + bool _internal_has_max_downward_grade() const; + public: void clear_max_downward_grade(); int32_t max_downward_grade() const; void set_max_downward_grade(int32_t value); @@ -1342,6 +1844,10 @@ class TripLeg_Edge final : public: // uint32 lane_count = 31; + bool has_lane_count() const; + private: + bool _internal_has_lane_count() const; + public: void clear_lane_count(); uint32_t lane_count() const; void set_lane_count(uint32_t value); @@ -1351,6 +1857,10 @@ class TripLeg_Edge final : public: // .valhalla.TripLeg.CycleLane cycle_lane = 32; + bool has_cycle_lane() const; + private: + bool _internal_has_cycle_lane() const; + public: void clear_cycle_lane(); ::valhalla::TripLeg_CycleLane cycle_lane() const; void set_cycle_lane(::valhalla::TripLeg_CycleLane value); @@ -1359,7 +1869,24 @@ class TripLeg_Edge final : void _internal_set_cycle_lane(::valhalla::TripLeg_CycleLane value); public: + // uint32 bicycle_network = 33; + bool has_bicycle_network() const; + private: + bool _internal_has_bicycle_network() const; + public: + void clear_bicycle_network(); + uint32_t bicycle_network() const; + void set_bicycle_network(uint32_t value); + private: + uint32_t _internal_bicycle_network() const; + void _internal_set_bicycle_network(uint32_t value); + public: + // .valhalla.TripLeg.Sidewalk sidewalk = 34; + bool has_sidewalk() const; + private: + bool _internal_has_sidewalk() const; + public: void clear_sidewalk(); ::valhalla::TripLeg_Sidewalk sidewalk() const; void set_sidewalk(::valhalla::TripLeg_Sidewalk value); @@ -1369,6 +1896,10 @@ class TripLeg_Edge final : public: // uint32 density = 35; + bool has_density() const; + private: + bool _internal_has_density() const; + public: void clear_density(); uint32_t density() const; void set_density(uint32_t value); @@ -1378,6 +1909,10 @@ class TripLeg_Edge final : public: // uint32 speed_limit = 36; + bool has_speed_limit() const; + private: + bool _internal_has_speed_limit() const; + public: void clear_speed_limit(); uint32_t speed_limit() const; void set_speed_limit(uint32_t value); @@ -1387,6 +1922,10 @@ class TripLeg_Edge final : public: // float truck_speed = 37; + bool has_truck_speed() const; + private: + bool _internal_has_truck_speed() const; + public: void clear_truck_speed(); float truck_speed() const; void set_truck_speed(float value); @@ -1395,16 +1934,11 @@ class TripLeg_Edge final : void _internal_set_truck_speed(float value); public: - // int32 mean_elevation = 40; - void clear_mean_elevation(); - int32_t mean_elevation() const; - void set_mean_elevation(int32_t value); + // bool truck_route = 38; + bool has_truck_route() const; private: - int32_t _internal_mean_elevation() const; - void _internal_set_mean_elevation(int32_t value); + bool _internal_has_truck_route() const; public: - - // bool truck_route = 38; void clear_truck_route(); bool truck_route() const; void set_truck_route(bool value); @@ -1413,7 +1947,24 @@ class TripLeg_Edge final : void _internal_set_truck_route(bool value); public: + // int32 mean_elevation = 40; + bool has_mean_elevation() const; + private: + bool _internal_has_mean_elevation() const; + public: + void clear_mean_elevation(); + int32_t mean_elevation() const; + void set_mean_elevation(int32_t value); + private: + int32_t _internal_mean_elevation() const; + void _internal_set_mean_elevation(int32_t value); + public: + // bool has_time_restrictions = 43; + bool has_has_time_restrictions() const; + private: + bool _internal_has_has_time_restrictions() const; + public: void clear_has_time_restrictions(); bool has_time_restrictions() const; void set_has_time_restrictions(bool value); @@ -1422,7 +1973,24 @@ class TripLeg_Edge final : void _internal_set_has_time_restrictions(bool value); public: + // float default_speed = 44; + bool has_default_speed() const; + private: + bool _internal_has_default_speed() const; + public: + void clear_default_speed(); + float default_speed() const; + void set_default_speed(float value); + private: + float _internal_default_speed() const; + void _internal_set_default_speed(float value); + public: + // bool destination_only = 46; + bool has_destination_only() const; + private: + bool _internal_has_destination_only() const; + public: void clear_destination_only(); bool destination_only() const; void set_destination_only(bool value); @@ -1432,6 +2000,10 @@ class TripLeg_Edge final : public: // bool is_urban = 47; + bool has_is_urban() const; + private: + bool _internal_has_is_urban() const; + public: void clear_is_urban(); bool is_urban() const; void set_is_urban(bool value); @@ -1440,16 +2012,11 @@ class TripLeg_Edge final : void _internal_set_is_urban(bool value); public: - // float default_speed = 44; - void clear_default_speed(); - float default_speed() const; - void set_default_speed(float value); + // float source_along_edge = 49; + bool has_source_along_edge() const; private: - float _internal_default_speed() const; - void _internal_set_default_speed(float value); + bool _internal_has_source_along_edge() const; public: - - // float source_along_edge = 49; void clear_source_along_edge(); float source_along_edge() const; void set_source_along_edge(float value); @@ -1459,6 +2026,10 @@ class TripLeg_Edge final : public: // float target_along_edge = 50; + bool has_target_along_edge() const; + private: + bool _internal_has_target_along_edge() const; + public: void clear_target_along_edge(); float target_along_edge() const; void set_target_along_edge(float value); @@ -1468,6 +2039,10 @@ class TripLeg_Edge final : public: // .valhalla.TripLeg.SacScale sac_scale = 51; + bool has_sac_scale() const; + private: + bool _internal_has_sac_scale() const; + public: void clear_sac_scale(); ::valhalla::TripLeg_SacScale sac_scale() const; void set_sac_scale(::valhalla::TripLeg_SacScale value); @@ -1477,6 +2052,10 @@ class TripLeg_Edge final : public: // bool shoulder = 52; + bool has_shoulder() const; + private: + bool _internal_has_shoulder() const; + public: void clear_shoulder(); bool shoulder() const; void set_shoulder(bool value); @@ -1485,18 +2064,311 @@ class TripLeg_Edge final : void _internal_set_shoulder(bool value); public: - // bool indoor = 53; - void clear_indoor(); - bool indoor() const; - void set_indoor(bool value); + // float total_length_km = 53; + bool has_total_length_km() const; + private: + bool _internal_has_total_length_km() const; + public: + void clear_total_length_km(); + float total_length_km() const; + void set_total_length_km(float value); + private: + float _internal_total_length_km() const; + void _internal_set_total_length_km(float value); + public: + + // int64 shortcut_id = 54; + bool has_shortcut_id() const; private: - bool _internal_indoor() const; - void _internal_set_indoor(bool value); + bool _internal_has_shortcut_id() const; + public: + void clear_shortcut_id(); + int64_t shortcut_id() const; + void set_shortcut_id(int64_t value); + private: + int64_t _internal_shortcut_id() const; + void _internal_set_shortcut_id(int64_t value); public: + void clear_has_length_km(); + HasLengthKmCase has_length_km_case() const; + void clear_has_speed(); + HasSpeedCase has_speed_case() const; + void clear_has_road_class(); + HasRoadClassCase has_road_class_case() const; + void clear_has_begin_heading(); + HasBeginHeadingCase has_begin_heading_case() const; + void clear_has_end_heading(); + HasEndHeadingCase has_end_heading_case() const; + void clear_has_begin_shape_index(); + HasBeginShapeIndexCase has_begin_shape_index_case() const; + void clear_has_end_shape_index(); + HasEndShapeIndexCase has_end_shape_index_case() const; + void clear_has_traversability(); + HasTraversabilityCase has_traversability_case() const; + void clear_has_use(); + HasUseCase has_use_case() const; + void clear_has_toll(); + HasTollCase has_toll_case() const; + void clear_has_unpaved(); + HasUnpavedCase has_unpaved_case() const; + void clear_has_tunnel(); + HasTunnelCase has_tunnel_case() const; + void clear_has_bridge(); + HasBridgeCase has_bridge_case() const; + void clear_has_roundabout(); + HasRoundaboutCase has_roundabout_case() const; + void clear_has_internal_intersection(); + HasInternalIntersectionCase has_internal_intersection_case() const; + void clear_has_drive_on_left(); + HasDriveOnLeftCase has_drive_on_left_case() const; + void clear_has_surface(); + HasSurfaceCase has_surface_case() const; + void clear_has_travel_mode(); + HasTravelModeCase has_travel_mode_case() const; + void clear_has_vehicle_type(); + HasVehicleTypeCase has_vehicle_type_case() const; + void clear_has_pedestrian_type(); + HasPedestrianTypeCase has_pedestrian_type_case() const; + void clear_has_bicycle_type(); + HasBicycleTypeCase has_bicycle_type_case() const; + void clear_has_transit_type(); + HasTransitTypeCase has_transit_type_case() const; + void clear_has_id(); + HasIdCase has_id_case() const; + void clear_has_way_id(); + HasWayIdCase has_way_id_case() const; + void clear_has_weighted_grade(); + HasWeightedGradeCase has_weighted_grade_case() const; + void clear_has_max_upward_grade(); + HasMaxUpwardGradeCase has_max_upward_grade_case() const; + void clear_has_max_downward_grade(); + HasMaxDownwardGradeCase has_max_downward_grade_case() const; + void clear_has_lane_count(); + HasLaneCountCase has_lane_count_case() const; + void clear_has_cycle_lane(); + HasCycleLaneCase has_cycle_lane_case() const; + void clear_has_bicycle_network(); + HasBicycleNetworkCase has_bicycle_network_case() const; + void clear_has_sidewalk(); + HasSidewalkCase has_sidewalk_case() const; + void clear_has_density(); + HasDensityCase has_density_case() const; + void clear_has_speed_limit(); + HasSpeedLimitCase has_speed_limit_case() const; + void clear_has_truck_speed(); + HasTruckSpeedCase has_truck_speed_case() const; + void clear_has_truck_route(); + HasTruckRouteCase has_truck_route_case() const; + void clear_has_mean_elevation(); + HasMeanElevationCase has_mean_elevation_case() const; + void clear_has_has_time_restrictions(); + HasHasTimeRestrictionsCase has_has_time_restrictions_case() const; + void clear_has_default_speed(); + HasDefaultSpeedCase has_default_speed_case() const; + void clear_has_destination_only(); + HasDestinationOnlyCase has_destination_only_case() const; + void clear_has_is_urban(); + HasIsUrbanCase has_is_urban_case() const; + void clear_has_source_along_edge(); + HasSourceAlongEdgeCase has_source_along_edge_case() const; + void clear_has_target_along_edge(); + HasTargetAlongEdgeCase has_target_along_edge_case() const; + void clear_has_sac_scale(); + HasSacScaleCase has_sac_scale_case() const; + void clear_has_shoulder(); + HasShoulderCase has_shoulder_case() const; + void clear_has_total_length_km(); + HasTotalLengthKmCase has_total_length_km_case() const; + void clear_has_shortcut_id(); + HasShortcutIdCase has_shortcut_id_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Edge) private: class _Internal; + void set_has_length_km(); + void set_has_speed(); + void set_has_road_class(); + void set_has_begin_heading(); + void set_has_end_heading(); + void set_has_begin_shape_index(); + void set_has_end_shape_index(); + void set_has_traversability(); + void set_has_use(); + void set_has_toll(); + void set_has_unpaved(); + void set_has_tunnel(); + void set_has_bridge(); + void set_has_roundabout(); + void set_has_internal_intersection(); + void set_has_drive_on_left(); + void set_has_surface(); + void set_has_travel_mode(); + void set_has_vehicle_type(); + void set_has_pedestrian_type(); + void set_has_bicycle_type(); + void set_has_transit_type(); + void set_has_id(); + void set_has_way_id(); + void set_has_weighted_grade(); + void set_has_max_upward_grade(); + void set_has_max_downward_grade(); + void set_has_lane_count(); + void set_has_cycle_lane(); + void set_has_bicycle_network(); + void set_has_sidewalk(); + void set_has_density(); + void set_has_speed_limit(); + void set_has_truck_speed(); + void set_has_truck_route(); + void set_has_mean_elevation(); + void set_has_has_time_restrictions(); + void set_has_default_speed(); + void set_has_destination_only(); + void set_has_is_urban(); + void set_has_source_along_edge(); + void set_has_target_along_edge(); + void set_has_sac_scale(); + void set_has_shoulder(); + void set_has_total_length_km(); + void set_has_shortcut_id(); + + inline bool has_has_length_km() const; + inline void clear_has_has_length_km(); + + inline bool has_has_speed() const; + inline void clear_has_has_speed(); + + inline bool has_has_road_class() const; + inline void clear_has_has_road_class(); + + inline bool has_has_begin_heading() const; + inline void clear_has_has_begin_heading(); + + inline bool has_has_end_heading() const; + inline void clear_has_has_end_heading(); + + inline bool has_has_begin_shape_index() const; + inline void clear_has_has_begin_shape_index(); + + inline bool has_has_end_shape_index() const; + inline void clear_has_has_end_shape_index(); + + inline bool has_has_traversability() const; + inline void clear_has_has_traversability(); + + inline bool has_has_use() const; + inline void clear_has_has_use(); + + inline bool has_has_toll() const; + inline void clear_has_has_toll(); + + inline bool has_has_unpaved() const; + inline void clear_has_has_unpaved(); + + inline bool has_has_tunnel() const; + inline void clear_has_has_tunnel(); + + inline bool has_has_bridge() const; + inline void clear_has_has_bridge(); + + inline bool has_has_roundabout() const; + inline void clear_has_has_roundabout(); + + inline bool has_has_internal_intersection() const; + inline void clear_has_has_internal_intersection(); + + inline bool has_has_drive_on_left() const; + inline void clear_has_has_drive_on_left(); + + inline bool has_has_surface() const; + inline void clear_has_has_surface(); + + inline bool has_has_travel_mode() const; + inline void clear_has_has_travel_mode(); + + inline bool has_has_vehicle_type() const; + inline void clear_has_has_vehicle_type(); + + inline bool has_has_pedestrian_type() const; + inline void clear_has_has_pedestrian_type(); + + inline bool has_has_bicycle_type() const; + inline void clear_has_has_bicycle_type(); + + inline bool has_has_transit_type() const; + inline void clear_has_has_transit_type(); + + inline bool has_has_id() const; + inline void clear_has_has_id(); + + inline bool has_has_way_id() const; + inline void clear_has_has_way_id(); + + inline bool has_has_weighted_grade() const; + inline void clear_has_has_weighted_grade(); + + inline bool has_has_max_upward_grade() const; + inline void clear_has_has_max_upward_grade(); + + inline bool has_has_max_downward_grade() const; + inline void clear_has_has_max_downward_grade(); + + inline bool has_has_lane_count() const; + inline void clear_has_has_lane_count(); + + inline bool has_has_cycle_lane() const; + inline void clear_has_has_cycle_lane(); + + inline bool has_has_bicycle_network() const; + inline void clear_has_has_bicycle_network(); + + inline bool has_has_sidewalk() const; + inline void clear_has_has_sidewalk(); + + inline bool has_has_density() const; + inline void clear_has_has_density(); + + inline bool has_has_speed_limit() const; + inline void clear_has_has_speed_limit(); + + inline bool has_has_truck_speed() const; + inline void clear_has_has_truck_speed(); + + inline bool has_has_truck_route() const; + inline void clear_has_has_truck_route(); + + inline bool has_has_mean_elevation() const; + inline void clear_has_has_mean_elevation(); + + inline bool has_has_has_time_restrictions() const; + inline void clear_has_has_has_time_restrictions(); + + inline bool has_has_default_speed() const; + inline void clear_has_has_default_speed(); + + inline bool has_has_destination_only() const; + inline void clear_has_has_destination_only(); + + inline bool has_has_is_urban() const; + inline void clear_has_has_is_urban(); + + inline bool has_has_source_along_edge() const; + inline void clear_has_has_source_along_edge(); + + inline bool has_has_target_along_edge() const; + inline void clear_has_has_target_along_edge(); + + inline bool has_has_sac_scale() const; + inline void clear_has_has_sac_scale(); + + inline bool has_has_shoulder() const; + inline void clear_has_has_shoulder(); + + inline bool has_has_total_length_km() const; + inline void clear_has_has_total_length_km(); + + inline bool has_has_shortcut_id() const; + inline void clear_has_has_shortcut_id(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -1510,52 +2382,239 @@ class TripLeg_Edge final : ::valhalla::TripSign* sign_; ::valhalla::TransitRouteInfo* transit_route_info_; ::valhalla::TripLeg_Restriction* restriction_; - float length_km_; - float speed_; - int road_class_; - uint32_t begin_heading_; - uint32_t end_heading_; - uint32_t begin_shape_index_; - uint32_t end_shape_index_; - int traversability_; - int use_; - bool toll_; - bool unpaved_; - bool tunnel_; - bool bridge_; - int surface_; - int travel_mode_; - bool roundabout_; - bool internal_intersection_; - bool drive_on_left_; - bool bicycle_network_; - int vehicle_type_; - int pedestrian_type_; - int bicycle_type_; - uint64_t id_; - int transit_type_; - float weighted_grade_; - uint64_t way_id_; - int32_t max_upward_grade_; - int32_t max_downward_grade_; - uint32_t lane_count_; - int cycle_lane_; - int sidewalk_; - uint32_t density_; - uint32_t speed_limit_; - float truck_speed_; - int32_t mean_elevation_; - bool truck_route_; - bool has_time_restrictions_; - bool destination_only_; - bool is_urban_; - float default_speed_; - float source_along_edge_; - float target_along_edge_; - int sac_scale_; - bool shoulder_; - bool indoor_; + union HasLengthKmUnion { + constexpr HasLengthKmUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float length_km_; + } has_length_km_; + union HasSpeedUnion { + constexpr HasSpeedUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float speed_; + } has_speed_; + union HasRoadClassUnion { + constexpr HasRoadClassUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int road_class_; + } has_road_class_; + union HasBeginHeadingUnion { + constexpr HasBeginHeadingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_heading_; + } has_begin_heading_; + union HasEndHeadingUnion { + constexpr HasEndHeadingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t end_heading_; + } has_end_heading_; + union HasBeginShapeIndexUnion { + constexpr HasBeginShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_shape_index_; + } has_begin_shape_index_; + union HasEndShapeIndexUnion { + constexpr HasEndShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t end_shape_index_; + } has_end_shape_index_; + union HasTraversabilityUnion { + constexpr HasTraversabilityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int traversability_; + } has_traversability_; + union HasUseUnion { + constexpr HasUseUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int use_; + } has_use_; + union HasTollUnion { + constexpr HasTollUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool toll_; + } has_toll_; + union HasUnpavedUnion { + constexpr HasUnpavedUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool unpaved_; + } has_unpaved_; + union HasTunnelUnion { + constexpr HasTunnelUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool tunnel_; + } has_tunnel_; + union HasBridgeUnion { + constexpr HasBridgeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool bridge_; + } has_bridge_; + union HasRoundaboutUnion { + constexpr HasRoundaboutUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool roundabout_; + } has_roundabout_; + union HasInternalIntersectionUnion { + constexpr HasInternalIntersectionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool internal_intersection_; + } has_internal_intersection_; + union HasDriveOnLeftUnion { + constexpr HasDriveOnLeftUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool drive_on_left_; + } has_drive_on_left_; + union HasSurfaceUnion { + constexpr HasSurfaceUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int surface_; + } has_surface_; + union HasTravelModeUnion { + constexpr HasTravelModeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int travel_mode_; + } has_travel_mode_; + union HasVehicleTypeUnion { + constexpr HasVehicleTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int vehicle_type_; + } has_vehicle_type_; + union HasPedestrianTypeUnion { + constexpr HasPedestrianTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int pedestrian_type_; + } has_pedestrian_type_; + union HasBicycleTypeUnion { + constexpr HasBicycleTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int bicycle_type_; + } has_bicycle_type_; + union HasTransitTypeUnion { + constexpr HasTransitTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int transit_type_; + } has_transit_type_; + union HasIdUnion { + constexpr HasIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t id_; + } has_id_; + union HasWayIdUnion { + constexpr HasWayIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t way_id_; + } has_way_id_; + union HasWeightedGradeUnion { + constexpr HasWeightedGradeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float weighted_grade_; + } has_weighted_grade_; + union HasMaxUpwardGradeUnion { + constexpr HasMaxUpwardGradeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t max_upward_grade_; + } has_max_upward_grade_; + union HasMaxDownwardGradeUnion { + constexpr HasMaxDownwardGradeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t max_downward_grade_; + } has_max_downward_grade_; + union HasLaneCountUnion { + constexpr HasLaneCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t lane_count_; + } has_lane_count_; + union HasCycleLaneUnion { + constexpr HasCycleLaneUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int cycle_lane_; + } has_cycle_lane_; + union HasBicycleNetworkUnion { + constexpr HasBicycleNetworkUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t bicycle_network_; + } has_bicycle_network_; + union HasSidewalkUnion { + constexpr HasSidewalkUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int sidewalk_; + } has_sidewalk_; + union HasDensityUnion { + constexpr HasDensityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t density_; + } has_density_; + union HasSpeedLimitUnion { + constexpr HasSpeedLimitUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t speed_limit_; + } has_speed_limit_; + union HasTruckSpeedUnion { + constexpr HasTruckSpeedUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float truck_speed_; + } has_truck_speed_; + union HasTruckRouteUnion { + constexpr HasTruckRouteUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool truck_route_; + } has_truck_route_; + union HasMeanElevationUnion { + constexpr HasMeanElevationUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t mean_elevation_; + } has_mean_elevation_; + union HasHasTimeRestrictionsUnion { + constexpr HasHasTimeRestrictionsUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool has_time_restrictions_; + } has_has_time_restrictions_; + union HasDefaultSpeedUnion { + constexpr HasDefaultSpeedUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float default_speed_; + } has_default_speed_; + union HasDestinationOnlyUnion { + constexpr HasDestinationOnlyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool destination_only_; + } has_destination_only_; + union HasIsUrbanUnion { + constexpr HasIsUrbanUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool is_urban_; + } has_is_urban_; + union HasSourceAlongEdgeUnion { + constexpr HasSourceAlongEdgeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float source_along_edge_; + } has_source_along_edge_; + union HasTargetAlongEdgeUnion { + constexpr HasTargetAlongEdgeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float target_along_edge_; + } has_target_along_edge_; + union HasSacScaleUnion { + constexpr HasSacScaleUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int sac_scale_; + } has_sac_scale_; + union HasShoulderUnion { + constexpr HasShoulderUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool shoulder_; + } has_shoulder_; + union HasTotalLengthKmUnion { + constexpr HasTotalLengthKmUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float total_length_km_; + } has_total_length_km_; + union HasShortcutIdUnion { + constexpr HasShortcutIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int64_t shortcut_id_; + } has_shortcut_id_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[46]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -1596,10 +2655,55 @@ class TripLeg_IntersectingEdge final : static const TripLeg_IntersectingEdge& default_instance() { return *internal_default_instance(); } - static inline const TripLeg_IntersectingEdge* internal_default_instance() { - return reinterpret_cast( - &_TripLeg_IntersectingEdge_default_instance_); - } + enum HasBeginHeadingCase { + kBeginHeading = 1, + HAS_BEGIN_HEADING_NOT_SET = 0, + }; + + enum HasPrevNameConsistencyCase { + kPrevNameConsistency = 2, + HAS_PREV_NAME_CONSISTENCY_NOT_SET = 0, + }; + + enum HasCurrNameConsistencyCase { + kCurrNameConsistency = 3, + HAS_CURR_NAME_CONSISTENCY_NOT_SET = 0, + }; + + enum HasDriveabilityCase { + kDriveability = 4, + HAS_DRIVEABILITY_NOT_SET = 0, + }; + + enum HasCyclabilityCase { + kCyclability = 5, + HAS_CYCLABILITY_NOT_SET = 0, + }; + + enum HasWalkabilityCase { + kWalkability = 6, + HAS_WALKABILITY_NOT_SET = 0, + }; + + enum HasUseCase { + kUse = 7, + HAS_USE_NOT_SET = 0, + }; + + enum HasRoadClassCase { + kRoadClass = 8, + HAS_ROAD_CLASS_NOT_SET = 0, + }; + + enum HasLaneCountCase { + kLaneCount = 9, + HAS_LANE_COUNT_NOT_SET = 0, + }; + + static inline const TripLeg_IntersectingEdge* internal_default_instance() { + return reinterpret_cast( + &_TripLeg_IntersectingEdge_default_instance_); + } static constexpr int kIndexInFileMessages = 4; @@ -1695,6 +2799,10 @@ class TripLeg_IntersectingEdge final : ::valhalla::TripSign* unsafe_arena_release_sign(); // uint32 begin_heading = 1; + bool has_begin_heading() const; + private: + bool _internal_has_begin_heading() const; + public: void clear_begin_heading(); uint32_t begin_heading() const; void set_begin_heading(uint32_t value); @@ -1704,6 +2812,10 @@ class TripLeg_IntersectingEdge final : public: // bool prev_name_consistency = 2; + bool has_prev_name_consistency() const; + private: + bool _internal_has_prev_name_consistency() const; + public: void clear_prev_name_consistency(); bool prev_name_consistency() const; void set_prev_name_consistency(bool value); @@ -1713,6 +2825,10 @@ class TripLeg_IntersectingEdge final : public: // bool curr_name_consistency = 3; + bool has_curr_name_consistency() const; + private: + bool _internal_has_curr_name_consistency() const; + public: void clear_curr_name_consistency(); bool curr_name_consistency() const; void set_curr_name_consistency(bool value); @@ -1722,6 +2838,10 @@ class TripLeg_IntersectingEdge final : public: // .valhalla.TripLeg.Traversability driveability = 4; + bool has_driveability() const; + private: + bool _internal_has_driveability() const; + public: void clear_driveability(); ::valhalla::TripLeg_Traversability driveability() const; void set_driveability(::valhalla::TripLeg_Traversability value); @@ -1731,6 +2851,10 @@ class TripLeg_IntersectingEdge final : public: // .valhalla.TripLeg.Traversability cyclability = 5; + bool has_cyclability() const; + private: + bool _internal_has_cyclability() const; + public: void clear_cyclability(); ::valhalla::TripLeg_Traversability cyclability() const; void set_cyclability(::valhalla::TripLeg_Traversability value); @@ -1740,6 +2864,10 @@ class TripLeg_IntersectingEdge final : public: // .valhalla.TripLeg.Traversability walkability = 6; + bool has_walkability() const; + private: + bool _internal_has_walkability() const; + public: void clear_walkability(); ::valhalla::TripLeg_Traversability walkability() const; void set_walkability(::valhalla::TripLeg_Traversability value); @@ -1749,6 +2877,10 @@ class TripLeg_IntersectingEdge final : public: // .valhalla.TripLeg.Use use = 7; + bool has_use() const; + private: + bool _internal_has_use() const; + public: void clear_use(); ::valhalla::TripLeg_Use use() const; void set_use(::valhalla::TripLeg_Use value); @@ -1758,6 +2890,10 @@ class TripLeg_IntersectingEdge final : public: // .valhalla.RoadClass road_class = 8; + bool has_road_class() const; + private: + bool _internal_has_road_class() const; + public: void clear_road_class(); ::valhalla::RoadClass road_class() const; void set_road_class(::valhalla::RoadClass value); @@ -1767,6 +2903,10 @@ class TripLeg_IntersectingEdge final : public: // uint32 lane_count = 9; + bool has_lane_count() const; + private: + bool _internal_has_lane_count() const; + public: void clear_lane_count(); uint32_t lane_count() const; void set_lane_count(uint32_t value); @@ -1775,25 +2915,117 @@ class TripLeg_IntersectingEdge final : void _internal_set_lane_count(uint32_t value); public: + void clear_has_begin_heading(); + HasBeginHeadingCase has_begin_heading_case() const; + void clear_has_prev_name_consistency(); + HasPrevNameConsistencyCase has_prev_name_consistency_case() const; + void clear_has_curr_name_consistency(); + HasCurrNameConsistencyCase has_curr_name_consistency_case() const; + void clear_has_driveability(); + HasDriveabilityCase has_driveability_case() const; + void clear_has_cyclability(); + HasCyclabilityCase has_cyclability_case() const; + void clear_has_walkability(); + HasWalkabilityCase has_walkability_case() const; + void clear_has_use(); + HasUseCase has_use_case() const; + void clear_has_road_class(); + HasRoadClassCase has_road_class_case() const; + void clear_has_lane_count(); + HasLaneCountCase has_lane_count_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.IntersectingEdge) private: class _Internal; + void set_has_begin_heading(); + void set_has_prev_name_consistency(); + void set_has_curr_name_consistency(); + void set_has_driveability(); + void set_has_cyclability(); + void set_has_walkability(); + void set_has_use(); + void set_has_road_class(); + void set_has_lane_count(); + + inline bool has_has_begin_heading() const; + inline void clear_has_has_begin_heading(); + + inline bool has_has_prev_name_consistency() const; + inline void clear_has_has_prev_name_consistency(); + + inline bool has_has_curr_name_consistency() const; + inline void clear_has_has_curr_name_consistency(); + + inline bool has_has_driveability() const; + inline void clear_has_has_driveability(); + + inline bool has_has_cyclability() const; + inline void clear_has_has_cyclability(); + + inline bool has_has_walkability() const; + inline void clear_has_has_walkability(); + + inline bool has_has_use() const; + inline void clear_has_has_use(); + + inline bool has_has_road_class() const; + inline void clear_has_has_road_class(); + + inline bool has_has_lane_count() const; + inline void clear_has_has_lane_count(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::valhalla::TripSign* sign_; - uint32_t begin_heading_; - bool prev_name_consistency_; - bool curr_name_consistency_; - int driveability_; - int cyclability_; - int walkability_; - int use_; - int road_class_; - uint32_t lane_count_; + union HasBeginHeadingUnion { + constexpr HasBeginHeadingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_heading_; + } has_begin_heading_; + union HasPrevNameConsistencyUnion { + constexpr HasPrevNameConsistencyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool prev_name_consistency_; + } has_prev_name_consistency_; + union HasCurrNameConsistencyUnion { + constexpr HasCurrNameConsistencyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool curr_name_consistency_; + } has_curr_name_consistency_; + union HasDriveabilityUnion { + constexpr HasDriveabilityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int driveability_; + } has_driveability_; + union HasCyclabilityUnion { + constexpr HasCyclabilityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int cyclability_; + } has_cyclability_; + union HasWalkabilityUnion { + constexpr HasWalkabilityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int walkability_; + } has_walkability_; + union HasUseUnion { + constexpr HasUseUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int use_; + } has_use_; + union HasRoadClassUnion { + constexpr HasRoadClassUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int road_class_; + } has_road_class_; + union HasLaneCountUnion { + constexpr HasLaneCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t lane_count_; + } has_lane_count_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[9]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -1834,6 +3066,16 @@ class TripLeg_Cost final : static const TripLeg_Cost& default_instance() { return *internal_default_instance(); } + enum HasSecondsCase { + kSeconds = 1, + HAS_SECONDS_NOT_SET = 0, + }; + + enum HasCostCase { + kCost = 2, + HAS_COST_NOT_SET = 0, + }; + static inline const TripLeg_Cost* internal_default_instance() { return reinterpret_cast( &_TripLeg_Cost_default_instance_); @@ -1907,6 +3149,10 @@ class TripLeg_Cost final : kCostFieldNumber = 2, }; // double seconds = 1; + bool has_seconds() const; + private: + bool _internal_has_seconds() const; + public: void clear_seconds(); double seconds() const; void set_seconds(double value); @@ -1916,6 +3162,10 @@ class TripLeg_Cost final : public: // double cost = 2; + bool has_cost() const; + private: + bool _internal_has_cost() const; + public: void clear_cost(); double cost() const; void set_cost(double value); @@ -1924,17 +3174,39 @@ class TripLeg_Cost final : void _internal_set_cost(double value); public: + void clear_has_seconds(); + HasSecondsCase has_seconds_case() const; + void clear_has_cost(); + HasCostCase has_cost_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Cost) private: class _Internal; + void set_has_seconds(); + void set_has_cost(); + + inline bool has_has_seconds() const; + inline void clear_has_has_seconds(); + + inline bool has_has_cost() const; + inline void clear_has_has_cost(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - double seconds_; - double cost_; + union HasSecondsUnion { + constexpr HasSecondsUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double seconds_; + } has_seconds_; + union HasCostUnion { + constexpr HasCostUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double cost_; + } has_cost_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -2134,6 +3406,26 @@ class TripLeg_Node final : static const TripLeg_Node& default_instance() { return *internal_default_instance(); } + enum HasAdminIndexCase { + kAdminIndex = 3, + HAS_ADMIN_INDEX_NOT_SET = 0, + }; + + enum HasTypeCase { + kType = 4, + HAS_TYPE_NOT_SET = 0, + }; + + enum HasForkCase { + kFork = 5, + HAS_FORK_NOT_SET = 0, + }; + + enum HasTimeZoneCase { + kTimeZone = 11, + HAS_TIME_ZONE_NOT_SET = 0, + }; + static inline const TripLeg_Node* internal_default_instance() { return reinterpret_cast( &_TripLeg_Node_default_instance_); @@ -2227,10 +3519,6 @@ class TripLeg_Node final : TripLeg_Node_Type_kTollGantry; static constexpr Type kSumpBuster = TripLeg_Node_Type_kSumpBuster; - static constexpr Type kBuildingEntrance = - TripLeg_Node_Type_kBuildingEntrance; - static constexpr Type kElevator = - TripLeg_Node_Type_kElevator; static inline bool Type_IsValid(int value) { return TripLeg_Node_Type_IsValid(value); } @@ -2257,7 +3545,6 @@ class TripLeg_Node final : enum : int { kIntersectingEdgeFieldNumber = 2, kRecostsFieldNumber = 13, - kTimeZoneFieldNumber = 11, kEdgeFieldNumber = 1, kTransitPlatformInfoFieldNumber = 6, kTransitStationInfoFieldNumber = 7, @@ -2267,6 +3554,7 @@ class TripLeg_Node final : kAdminIndexFieldNumber = 3, kTypeFieldNumber = 4, kForkFieldNumber = 5, + kTimeZoneFieldNumber = 11, }; // repeated .valhalla.TripLeg.IntersectingEdge intersecting_edge = 2; int intersecting_edge_size() const; @@ -2304,20 +3592,6 @@ class TripLeg_Node final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_PathCost >& recosts() const; - // string time_zone = 11; - void clear_time_zone(); - const std::string& time_zone() const; - template - void set_time_zone(ArgT0&& arg0, ArgT... args); - std::string* mutable_time_zone(); - PROTOBUF_NODISCARD std::string* release_time_zone(); - void set_allocated_time_zone(std::string* time_zone); - private: - const std::string& _internal_time_zone() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_time_zone(const std::string& value); - std::string* _internal_mutable_time_zone(); - public: - // .valhalla.TripLeg.Edge edge = 1; bool has_edge() const; private: @@ -2427,6 +3701,10 @@ class TripLeg_Node final : ::valhalla::BikeShareStationInfo* unsafe_arena_release_bss_info(); // uint32 admin_index = 3; + bool has_admin_index() const; + private: + bool _internal_has_admin_index() const; + public: void clear_admin_index(); uint32_t admin_index() const; void set_admin_index(uint32_t value); @@ -2436,6 +3714,10 @@ class TripLeg_Node final : public: // .valhalla.TripLeg.Node.Type type = 4; + bool has_type() const; + private: + bool _internal_has_type() const; + public: void clear_type(); ::valhalla::TripLeg_Node_Type type() const; void set_type(::valhalla::TripLeg_Node_Type value); @@ -2445,6 +3727,10 @@ class TripLeg_Node final : public: // bool fork = 5; + bool has_fork() const; + private: + bool _internal_has_fork() const; + public: void clear_fork(); bool fork() const; void set_fork(bool value); @@ -2453,9 +3739,51 @@ class TripLeg_Node final : void _internal_set_fork(bool value); public: + // string time_zone = 11; + bool has_time_zone() const; + private: + bool _internal_has_time_zone() const; + public: + void clear_time_zone(); + const std::string& time_zone() const; + template + void set_time_zone(ArgT0&& arg0, ArgT... args); + std::string* mutable_time_zone(); + PROTOBUF_NODISCARD std::string* release_time_zone(); + void set_allocated_time_zone(std::string* time_zone); + private: + const std::string& _internal_time_zone() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_time_zone(const std::string& value); + std::string* _internal_mutable_time_zone(); + public: + + void clear_has_admin_index(); + HasAdminIndexCase has_admin_index_case() const; + void clear_has_type(); + HasTypeCase has_type_case() const; + void clear_has_fork(); + HasForkCase has_fork_case() const; + void clear_has_time_zone(); + HasTimeZoneCase has_time_zone_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Node) private: class _Internal; + void set_has_admin_index(); + void set_has_type(); + void set_has_fork(); + void set_has_time_zone(); + + inline bool has_has_admin_index() const; + inline void clear_has_has_admin_index(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); + + inline bool has_has_fork() const; + inline void clear_has_has_fork(); + + inline bool has_has_time_zone() const; + inline void clear_has_has_time_zone(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -2463,17 +3791,35 @@ class TripLeg_Node final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_IntersectingEdge > intersecting_edge_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_PathCost > recosts_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_zone_; ::valhalla::TripLeg_Edge* edge_; ::valhalla::TransitPlatformInfo* transit_platform_info_; ::valhalla::TransitStationInfo* transit_station_info_; ::valhalla::TransitEgressInfo* transit_egress_info_; ::valhalla::TripLeg_PathCost* cost_; ::valhalla::BikeShareStationInfo* bss_info_; - uint32_t admin_index_; - int type_; - bool fork_; + union HasAdminIndexUnion { + constexpr HasAdminIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t admin_index_; + } has_admin_index_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; + union HasForkUnion { + constexpr HasForkUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool fork_; + } has_fork_; + union HasTimeZoneUnion { + constexpr HasTimeZoneUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_zone_; + } has_time_zone_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[4]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -2514,6 +3860,26 @@ class TripLeg_Admin final : static const TripLeg_Admin& default_instance() { return *internal_default_instance(); } + enum HasCountryCodeCase { + kCountryCode = 1, + HAS_COUNTRY_CODE_NOT_SET = 0, + }; + + enum HasCountryTextCase { + kCountryText = 2, + HAS_COUNTRY_TEXT_NOT_SET = 0, + }; + + enum HasStateCodeCase { + kStateCode = 3, + HAS_STATE_CODE_NOT_SET = 0, + }; + + enum HasStateTextCase { + kStateText = 4, + HAS_STATE_TEXT_NOT_SET = 0, + }; + static inline const TripLeg_Admin* internal_default_instance() { return reinterpret_cast( &_TripLeg_Admin_default_instance_); @@ -2589,6 +3955,10 @@ class TripLeg_Admin final : kStateTextFieldNumber = 4, }; // string country_code = 1; + bool has_country_code() const; + private: + bool _internal_has_country_code() const; + public: void clear_country_code(); const std::string& country_code() const; template @@ -2603,6 +3973,10 @@ class TripLeg_Admin final : public: // string country_text = 2; + bool has_country_text() const; + private: + bool _internal_has_country_text() const; + public: void clear_country_text(); const std::string& country_text() const; template @@ -2617,6 +3991,10 @@ class TripLeg_Admin final : public: // string state_code = 3; + bool has_state_code() const; + private: + bool _internal_has_state_code() const; + public: void clear_state_code(); const std::string& state_code() const; template @@ -2631,6 +4009,10 @@ class TripLeg_Admin final : public: // string state_text = 4; + bool has_state_text() const; + private: + bool _internal_has_state_text() const; + public: void clear_state_text(); const std::string& state_text() const; template @@ -2644,19 +4026,61 @@ class TripLeg_Admin final : std::string* _internal_mutable_state_text(); public: + void clear_has_country_code(); + HasCountryCodeCase has_country_code_case() const; + void clear_has_country_text(); + HasCountryTextCase has_country_text_case() const; + void clear_has_state_code(); + HasStateCodeCase has_state_code_case() const; + void clear_has_state_text(); + HasStateTextCase has_state_text_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Admin) private: class _Internal; + void set_has_country_code(); + void set_has_country_text(); + void set_has_state_code(); + void set_has_state_text(); + + inline bool has_has_country_code() const; + inline void clear_has_has_country_code(); + + inline bool has_has_country_text() const; + inline void clear_has_has_country_text(); + + inline bool has_has_state_code() const; + inline void clear_has_has_state_code(); + + inline bool has_has_state_text() const; + inline void clear_has_has_state_text(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_code_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_text_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_code_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_text_; + union HasCountryCodeUnion { + constexpr HasCountryCodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_code_; + } has_country_code_; + union HasCountryTextUnion { + constexpr HasCountryTextUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_text_; + } has_country_text_; + union HasStateCodeUnion { + constexpr HasStateCodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_code_; + } has_state_code_; + union HasStateTextUnion { + constexpr HasStateTextUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_text_; + } has_state_text_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[4]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -2916,6 +4340,16 @@ class TripLeg_Incident final : static const TripLeg_Incident& default_instance() { return *internal_default_instance(); } + enum HasBeginShapeIndexCase { + kBeginShapeIndex = 3, + HAS_BEGIN_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasEndShapeIndexCase { + kEndShapeIndex = 4, + HAS_END_SHAPE_INDEX_NOT_SET = 0, + }; + static inline const TripLeg_Incident* internal_default_instance() { return reinterpret_cast( &_TripLeg_Incident_default_instance_); @@ -3008,6 +4442,10 @@ class TripLeg_Incident final : ::valhalla::IncidentsTile_Metadata* unsafe_arena_release_metadata(); // uint32 begin_shape_index = 3; + bool has_begin_shape_index() const; + private: + bool _internal_has_begin_shape_index() const; + public: void clear_begin_shape_index(); uint32_t begin_shape_index() const; void set_begin_shape_index(uint32_t value); @@ -3017,6 +4455,10 @@ class TripLeg_Incident final : public: // uint32 end_shape_index = 4; + bool has_end_shape_index() const; + private: + bool _internal_has_end_shape_index() const; + public: void clear_end_shape_index(); uint32_t end_shape_index() const; void set_end_shape_index(uint32_t value); @@ -3025,18 +4467,40 @@ class TripLeg_Incident final : void _internal_set_end_shape_index(uint32_t value); public: + void clear_has_begin_shape_index(); + HasBeginShapeIndexCase has_begin_shape_index_case() const; + void clear_has_end_shape_index(); + HasEndShapeIndexCase has_end_shape_index_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg.Incident) private: class _Internal; + void set_has_begin_shape_index(); + void set_has_end_shape_index(); + + inline bool has_has_begin_shape_index() const; + inline void clear_has_has_begin_shape_index(); + + inline bool has_has_end_shape_index() const; + inline void clear_has_has_end_shape_index(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::valhalla::IncidentsTile_Metadata* metadata_; - uint32_t begin_shape_index_; - uint32_t end_shape_index_; + union HasBeginShapeIndexUnion { + constexpr HasBeginShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t begin_shape_index_; + } has_begin_shape_index_; + union HasEndShapeIndexUnion { + constexpr HasEndShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t end_shape_index_; + } has_end_shape_index_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -3258,6 +4722,31 @@ class TripLeg final : static const TripLeg& default_instance() { return *internal_default_instance(); } + enum HasOsmChangesetCase { + kOsmChangeset = 1, + HAS_OSM_CHANGESET_NOT_SET = 0, + }; + + enum HasTripIdCase { + kTripId = 2, + HAS_TRIP_ID_NOT_SET = 0, + }; + + enum HasLegIdCase { + kLegId = 3, + HAS_LEG_ID_NOT_SET = 0, + }; + + enum HasLegCountCase { + kLegCount = 4, + HAS_LEG_COUNT_NOT_SET = 0, + }; + + enum HasShapeCase { + kShape = 8, + HAS_SHAPE_NOT_SET = 0, + }; + static inline const TripLeg* internal_default_instance() { return reinterpret_cast( &_TripLeg_default_instance_); @@ -3410,10 +4899,6 @@ class TripLeg final : TripLeg_Use_kBridlewayUse; static constexpr Use kPedestrianCrossingUse = TripLeg_Use_kPedestrianCrossingUse; - static constexpr Use kElevatorUse = - TripLeg_Use_kElevatorUse; - static constexpr Use kEscalatorUse = - TripLeg_Use_kEscalatorUse; static constexpr Use kRestAreaUse = TripLeg_Use_kRestAreaUse; static constexpr Use kServiceAreaUse = @@ -3424,8 +4909,6 @@ class TripLeg final : TripLeg_Use_kFerryUse; static constexpr Use kRailFerryUse = TripLeg_Use_kRailFerryUse; - static constexpr Use kConstructionUse = - TripLeg_Use_kConstructionUse; static constexpr Use kRailUse = TripLeg_Use_kRailUse; static constexpr Use kBusUse = @@ -3600,13 +5083,13 @@ class TripLeg final : kIncidentsFieldNumber = 11, kAlgorithmsFieldNumber = 12, kClosuresFieldNumber = 13, - kShapeFieldNumber = 8, kBboxFieldNumber = 9, kShapeAttributesFieldNumber = 10, kOsmChangesetFieldNumber = 1, kTripIdFieldNumber = 2, kLegIdFieldNumber = 3, kLegCountFieldNumber = 4, + kShapeFieldNumber = 8, }; // repeated .valhalla.Location location = 5; int location_size() const; @@ -3722,20 +5205,6 @@ class TripLeg final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_Closure >& closures() const; - // string shape = 8; - void clear_shape(); - const std::string& shape() const; - template - void set_shape(ArgT0&& arg0, ArgT... args); - std::string* mutable_shape(); - PROTOBUF_NODISCARD std::string* release_shape(); - void set_allocated_shape(std::string* shape); - private: - const std::string& _internal_shape() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_shape(const std::string& value); - std::string* _internal_mutable_shape(); - public: - // .valhalla.BoundingBox bbox = 9; bool has_bbox() const; private: @@ -3773,6 +5242,10 @@ class TripLeg final : ::valhalla::TripLeg_ShapeAttributes* unsafe_arena_release_shape_attributes(); // uint64 osm_changeset = 1; + bool has_osm_changeset() const; + private: + bool _internal_has_osm_changeset() const; + public: void clear_osm_changeset(); uint64_t osm_changeset() const; void set_osm_changeset(uint64_t value); @@ -3782,6 +5255,10 @@ class TripLeg final : public: // uint64 trip_id = 2; + bool has_trip_id() const; + private: + bool _internal_has_trip_id() const; + public: void clear_trip_id(); uint64_t trip_id() const; void set_trip_id(uint64_t value); @@ -3791,6 +5268,10 @@ class TripLeg final : public: // uint32 leg_id = 3; + bool has_leg_id() const; + private: + bool _internal_has_leg_id() const; + public: void clear_leg_id(); uint32_t leg_id() const; void set_leg_id(uint32_t value); @@ -3800,6 +5281,10 @@ class TripLeg final : public: // uint32 leg_count = 4; + bool has_leg_count() const; + private: + bool _internal_has_leg_count() const; + public: void clear_leg_count(); uint32_t leg_count() const; void set_leg_count(uint32_t value); @@ -3808,9 +5293,57 @@ class TripLeg final : void _internal_set_leg_count(uint32_t value); public: + // string shape = 8; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const std::string& shape() const; + template + void set_shape(ArgT0&& arg0, ArgT... args); + std::string* mutable_shape(); + PROTOBUF_NODISCARD std::string* release_shape(); + void set_allocated_shape(std::string* shape); + private: + const std::string& _internal_shape() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_shape(const std::string& value); + std::string* _internal_mutable_shape(); + public: + + void clear_has_osm_changeset(); + HasOsmChangesetCase has_osm_changeset_case() const; + void clear_has_trip_id(); + HasTripIdCase has_trip_id_case() const; + void clear_has_leg_id(); + HasLegIdCase has_leg_id_case() const; + void clear_has_leg_count(); + HasLegCountCase has_leg_count_case() const; + void clear_has_shape(); + HasShapeCase has_shape_case() const; // @@protoc_insertion_point(class_scope:valhalla.TripLeg) private: class _Internal; + void set_has_osm_changeset(); + void set_has_trip_id(); + void set_has_leg_id(); + void set_has_leg_count(); + void set_has_shape(); + + inline bool has_has_osm_changeset() const; + inline void clear_has_has_osm_changeset(); + + inline bool has_has_trip_id() const; + inline void clear_has_has_trip_id(); + + inline bool has_has_leg_id() const; + inline void clear_has_has_leg_id(); + + inline bool has_has_leg_count() const; + inline void clear_has_has_leg_count(); + + inline bool has_has_shape() const; + inline void clear_has_has_shape(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -3822,14 +5355,36 @@ class TripLeg final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_Incident > incidents_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField algorithms_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TripLeg_Closure > closures_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr shape_; ::valhalla::BoundingBox* bbox_; ::valhalla::TripLeg_ShapeAttributes* shape_attributes_; - uint64_t osm_changeset_; - uint64_t trip_id_; - uint32_t leg_id_; - uint32_t leg_count_; + union HasOsmChangesetUnion { + constexpr HasOsmChangesetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t osm_changeset_; + } has_osm_changeset_; + union HasTripIdUnion { + constexpr HasTripIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t trip_id_; + } has_trip_id_; + union HasLegIdUnion { + constexpr HasLegIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t leg_id_; + } has_leg_id_; + union HasLegCountUnion { + constexpr HasLegCountUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t leg_count_; + } has_leg_count_; + union HasShapeUnion { + constexpr HasShapeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr shape_; + } has_shape_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[5]; + }; union { Impl_ _impl_; }; friend struct ::TableStruct_trip_2eproto; @@ -4124,38 +5679,71 @@ class Trip final : // TripLeg_LaneConnectivity // uint64 from_way_id = 1; +inline bool TripLeg_LaneConnectivity::_internal_has_from_way_id() const { + return has_from_way_id_case() == kFromWayId; +} +inline bool TripLeg_LaneConnectivity::has_from_way_id() const { + return _internal_has_from_way_id(); +} +inline void TripLeg_LaneConnectivity::set_has_from_way_id() { + _impl_._oneof_case_[0] = kFromWayId; +} inline void TripLeg_LaneConnectivity::clear_from_way_id() { - _impl_.from_way_id_ = uint64_t{0u}; + if (_internal_has_from_way_id()) { + _impl_.has_from_way_id_.from_way_id_ = uint64_t{0u}; + clear_has_has_from_way_id(); + } } inline uint64_t TripLeg_LaneConnectivity::_internal_from_way_id() const { - return _impl_.from_way_id_; + if (_internal_has_from_way_id()) { + return _impl_.has_from_way_id_.from_way_id_; + } + return uint64_t{0u}; +} +inline void TripLeg_LaneConnectivity::_internal_set_from_way_id(uint64_t value) { + if (!_internal_has_from_way_id()) { + clear_has_from_way_id(); + set_has_from_way_id(); + } + _impl_.has_from_way_id_.from_way_id_ = value; } inline uint64_t TripLeg_LaneConnectivity::from_way_id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.LaneConnectivity.from_way_id) return _internal_from_way_id(); } -inline void TripLeg_LaneConnectivity::_internal_set_from_way_id(uint64_t value) { - - _impl_.from_way_id_ = value; -} inline void TripLeg_LaneConnectivity::set_from_way_id(uint64_t value) { _internal_set_from_way_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.LaneConnectivity.from_way_id) } // string from_lanes = 2; +inline bool TripLeg_LaneConnectivity::_internal_has_from_lanes() const { + return has_from_lanes_case() == kFromLanes; +} +inline bool TripLeg_LaneConnectivity::has_from_lanes() const { + return _internal_has_from_lanes(); +} +inline void TripLeg_LaneConnectivity::set_has_from_lanes() { + _impl_._oneof_case_[1] = kFromLanes; +} inline void TripLeg_LaneConnectivity::clear_from_lanes() { - _impl_.from_lanes_.ClearToEmpty(); + if (_internal_has_from_lanes()) { + _impl_.has_from_lanes_.from_lanes_.Destroy(); + clear_has_has_from_lanes(); + } } inline const std::string& TripLeg_LaneConnectivity::from_lanes() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.LaneConnectivity.from_lanes) return _internal_from_lanes(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_LaneConnectivity::set_from_lanes(ArgT0&& arg0, ArgT... args) { - - _impl_.from_lanes_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_LaneConnectivity::set_from_lanes(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_from_lanes()) { + clear_has_from_lanes(); + set_has_from_lanes(); + _impl_.has_from_lanes_.from_lanes_.InitDefault(); + } + _impl_.has_from_lanes_.from_lanes_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.LaneConnectivity.from_lanes) } inline std::string* TripLeg_LaneConnectivity::mutable_from_lanes() { @@ -4164,48 +5752,75 @@ inline std::string* TripLeg_LaneConnectivity::mutable_from_lanes() { return _s; } inline const std::string& TripLeg_LaneConnectivity::_internal_from_lanes() const { - return _impl_.from_lanes_.Get(); + if (_internal_has_from_lanes()) { + return _impl_.has_from_lanes_.from_lanes_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_LaneConnectivity::_internal_set_from_lanes(const std::string& value) { - - _impl_.from_lanes_.Set(value, GetArenaForAllocation()); + if (!_internal_has_from_lanes()) { + clear_has_from_lanes(); + set_has_from_lanes(); + _impl_.has_from_lanes_.from_lanes_.InitDefault(); + } + _impl_.has_from_lanes_.from_lanes_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_LaneConnectivity::_internal_mutable_from_lanes() { - - return _impl_.from_lanes_.Mutable(GetArenaForAllocation()); + if (!_internal_has_from_lanes()) { + clear_has_from_lanes(); + set_has_from_lanes(); + _impl_.has_from_lanes_.from_lanes_.InitDefault(); + } + return _impl_.has_from_lanes_.from_lanes_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_LaneConnectivity::release_from_lanes() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.LaneConnectivity.from_lanes) - return _impl_.from_lanes_.Release(); + if (_internal_has_from_lanes()) { + clear_has_has_from_lanes(); + return _impl_.has_from_lanes_.from_lanes_.Release(); + } else { + return nullptr; + } } inline void TripLeg_LaneConnectivity::set_allocated_from_lanes(std::string* from_lanes) { - if (from_lanes != nullptr) { - - } else { - + if (has_has_from_lanes()) { + clear_has_from_lanes(); } - _impl_.from_lanes_.SetAllocated(from_lanes, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.from_lanes_.IsDefault()) { - _impl_.from_lanes_.Set("", GetArenaForAllocation()); + if (from_lanes != nullptr) { + set_has_from_lanes(); + _impl_.has_from_lanes_.from_lanes_.InitAllocated(from_lanes, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.LaneConnectivity.from_lanes) } // string to_lanes = 3; +inline bool TripLeg_LaneConnectivity::_internal_has_to_lanes() const { + return has_to_lanes_case() == kToLanes; +} +inline bool TripLeg_LaneConnectivity::has_to_lanes() const { + return _internal_has_to_lanes(); +} +inline void TripLeg_LaneConnectivity::set_has_to_lanes() { + _impl_._oneof_case_[2] = kToLanes; +} inline void TripLeg_LaneConnectivity::clear_to_lanes() { - _impl_.to_lanes_.ClearToEmpty(); + if (_internal_has_to_lanes()) { + _impl_.has_to_lanes_.to_lanes_.Destroy(); + clear_has_has_to_lanes(); + } } inline const std::string& TripLeg_LaneConnectivity::to_lanes() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.LaneConnectivity.to_lanes) return _internal_to_lanes(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_LaneConnectivity::set_to_lanes(ArgT0&& arg0, ArgT... args) { - - _impl_.to_lanes_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_LaneConnectivity::set_to_lanes(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_to_lanes()) { + clear_has_to_lanes(); + set_has_to_lanes(); + _impl_.has_to_lanes_.to_lanes_.InitDefault(); + } + _impl_.has_to_lanes_.to_lanes_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.LaneConnectivity.to_lanes) } inline std::string* TripLeg_LaneConnectivity::mutable_to_lanes() { @@ -4214,163 +5829,364 @@ inline std::string* TripLeg_LaneConnectivity::mutable_to_lanes() { return _s; } inline const std::string& TripLeg_LaneConnectivity::_internal_to_lanes() const { - return _impl_.to_lanes_.Get(); + if (_internal_has_to_lanes()) { + return _impl_.has_to_lanes_.to_lanes_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_LaneConnectivity::_internal_set_to_lanes(const std::string& value) { - - _impl_.to_lanes_.Set(value, GetArenaForAllocation()); + if (!_internal_has_to_lanes()) { + clear_has_to_lanes(); + set_has_to_lanes(); + _impl_.has_to_lanes_.to_lanes_.InitDefault(); + } + _impl_.has_to_lanes_.to_lanes_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_LaneConnectivity::_internal_mutable_to_lanes() { - - return _impl_.to_lanes_.Mutable(GetArenaForAllocation()); + if (!_internal_has_to_lanes()) { + clear_has_to_lanes(); + set_has_to_lanes(); + _impl_.has_to_lanes_.to_lanes_.InitDefault(); + } + return _impl_.has_to_lanes_.to_lanes_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_LaneConnectivity::release_to_lanes() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.LaneConnectivity.to_lanes) - return _impl_.to_lanes_.Release(); + if (_internal_has_to_lanes()) { + clear_has_has_to_lanes(); + return _impl_.has_to_lanes_.to_lanes_.Release(); + } else { + return nullptr; + } } inline void TripLeg_LaneConnectivity::set_allocated_to_lanes(std::string* to_lanes) { - if (to_lanes != nullptr) { - - } else { - + if (has_has_to_lanes()) { + clear_has_to_lanes(); } - _impl_.to_lanes_.SetAllocated(to_lanes, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.to_lanes_.IsDefault()) { - _impl_.to_lanes_.Set("", GetArenaForAllocation()); + if (to_lanes != nullptr) { + set_has_to_lanes(); + _impl_.has_to_lanes_.to_lanes_.InitAllocated(to_lanes, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.LaneConnectivity.to_lanes) } +inline bool TripLeg_LaneConnectivity::has_has_from_way_id() const { + return has_from_way_id_case() != HAS_FROM_WAY_ID_NOT_SET; +} +inline void TripLeg_LaneConnectivity::clear_has_has_from_way_id() { + _impl_._oneof_case_[0] = HAS_FROM_WAY_ID_NOT_SET; +} +inline bool TripLeg_LaneConnectivity::has_has_from_lanes() const { + return has_from_lanes_case() != HAS_FROM_LANES_NOT_SET; +} +inline void TripLeg_LaneConnectivity::clear_has_has_from_lanes() { + _impl_._oneof_case_[1] = HAS_FROM_LANES_NOT_SET; +} +inline bool TripLeg_LaneConnectivity::has_has_to_lanes() const { + return has_to_lanes_case() != HAS_TO_LANES_NOT_SET; +} +inline void TripLeg_LaneConnectivity::clear_has_has_to_lanes() { + _impl_._oneof_case_[2] = HAS_TO_LANES_NOT_SET; +} +inline TripLeg_LaneConnectivity::HasFromWayIdCase TripLeg_LaneConnectivity::has_from_way_id_case() const { + return TripLeg_LaneConnectivity::HasFromWayIdCase(_impl_._oneof_case_[0]); +} +inline TripLeg_LaneConnectivity::HasFromLanesCase TripLeg_LaneConnectivity::has_from_lanes_case() const { + return TripLeg_LaneConnectivity::HasFromLanesCase(_impl_._oneof_case_[1]); +} +inline TripLeg_LaneConnectivity::HasToLanesCase TripLeg_LaneConnectivity::has_to_lanes_case() const { + return TripLeg_LaneConnectivity::HasToLanesCase(_impl_._oneof_case_[2]); +} // ------------------------------------------------------------------- // TripLeg_TrafficSegment // uint64 segment_id = 1; +inline bool TripLeg_TrafficSegment::_internal_has_segment_id() const { + return has_segment_id_case() == kSegmentId; +} +inline bool TripLeg_TrafficSegment::has_segment_id() const { + return _internal_has_segment_id(); +} +inline void TripLeg_TrafficSegment::set_has_segment_id() { + _impl_._oneof_case_[0] = kSegmentId; +} inline void TripLeg_TrafficSegment::clear_segment_id() { - _impl_.segment_id_ = uint64_t{0u}; + if (_internal_has_segment_id()) { + _impl_.has_segment_id_.segment_id_ = uint64_t{0u}; + clear_has_has_segment_id(); + } } inline uint64_t TripLeg_TrafficSegment::_internal_segment_id() const { - return _impl_.segment_id_; + if (_internal_has_segment_id()) { + return _impl_.has_segment_id_.segment_id_; + } + return uint64_t{0u}; +} +inline void TripLeg_TrafficSegment::_internal_set_segment_id(uint64_t value) { + if (!_internal_has_segment_id()) { + clear_has_segment_id(); + set_has_segment_id(); + } + _impl_.has_segment_id_.segment_id_ = value; } inline uint64_t TripLeg_TrafficSegment::segment_id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.TrafficSegment.segment_id) return _internal_segment_id(); } -inline void TripLeg_TrafficSegment::_internal_set_segment_id(uint64_t value) { - - _impl_.segment_id_ = value; -} inline void TripLeg_TrafficSegment::set_segment_id(uint64_t value) { _internal_set_segment_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.TrafficSegment.segment_id) } // float begin_percent = 2; +inline bool TripLeg_TrafficSegment::_internal_has_begin_percent() const { + return has_begin_percent_case() == kBeginPercent; +} +inline bool TripLeg_TrafficSegment::has_begin_percent() const { + return _internal_has_begin_percent(); +} +inline void TripLeg_TrafficSegment::set_has_begin_percent() { + _impl_._oneof_case_[1] = kBeginPercent; +} inline void TripLeg_TrafficSegment::clear_begin_percent() { - _impl_.begin_percent_ = 0; + if (_internal_has_begin_percent()) { + _impl_.has_begin_percent_.begin_percent_ = 0; + clear_has_has_begin_percent(); + } } inline float TripLeg_TrafficSegment::_internal_begin_percent() const { - return _impl_.begin_percent_; + if (_internal_has_begin_percent()) { + return _impl_.has_begin_percent_.begin_percent_; + } + return 0; +} +inline void TripLeg_TrafficSegment::_internal_set_begin_percent(float value) { + if (!_internal_has_begin_percent()) { + clear_has_begin_percent(); + set_has_begin_percent(); + } + _impl_.has_begin_percent_.begin_percent_ = value; } inline float TripLeg_TrafficSegment::begin_percent() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.TrafficSegment.begin_percent) return _internal_begin_percent(); } -inline void TripLeg_TrafficSegment::_internal_set_begin_percent(float value) { - - _impl_.begin_percent_ = value; -} inline void TripLeg_TrafficSegment::set_begin_percent(float value) { _internal_set_begin_percent(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.TrafficSegment.begin_percent) } // float end_percent = 3; +inline bool TripLeg_TrafficSegment::_internal_has_end_percent() const { + return has_end_percent_case() == kEndPercent; +} +inline bool TripLeg_TrafficSegment::has_end_percent() const { + return _internal_has_end_percent(); +} +inline void TripLeg_TrafficSegment::set_has_end_percent() { + _impl_._oneof_case_[2] = kEndPercent; +} inline void TripLeg_TrafficSegment::clear_end_percent() { - _impl_.end_percent_ = 0; + if (_internal_has_end_percent()) { + _impl_.has_end_percent_.end_percent_ = 0; + clear_has_has_end_percent(); + } } inline float TripLeg_TrafficSegment::_internal_end_percent() const { - return _impl_.end_percent_; + if (_internal_has_end_percent()) { + return _impl_.has_end_percent_.end_percent_; + } + return 0; +} +inline void TripLeg_TrafficSegment::_internal_set_end_percent(float value) { + if (!_internal_has_end_percent()) { + clear_has_end_percent(); + set_has_end_percent(); + } + _impl_.has_end_percent_.end_percent_ = value; } inline float TripLeg_TrafficSegment::end_percent() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.TrafficSegment.end_percent) return _internal_end_percent(); } -inline void TripLeg_TrafficSegment::_internal_set_end_percent(float value) { - - _impl_.end_percent_ = value; -} inline void TripLeg_TrafficSegment::set_end_percent(float value) { _internal_set_end_percent(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.TrafficSegment.end_percent) } // bool starts_segment = 4; +inline bool TripLeg_TrafficSegment::_internal_has_starts_segment() const { + return has_starts_segment_case() == kStartsSegment; +} +inline bool TripLeg_TrafficSegment::has_starts_segment() const { + return _internal_has_starts_segment(); +} +inline void TripLeg_TrafficSegment::set_has_starts_segment() { + _impl_._oneof_case_[3] = kStartsSegment; +} inline void TripLeg_TrafficSegment::clear_starts_segment() { - _impl_.starts_segment_ = false; + if (_internal_has_starts_segment()) { + _impl_.has_starts_segment_.starts_segment_ = false; + clear_has_has_starts_segment(); + } } inline bool TripLeg_TrafficSegment::_internal_starts_segment() const { - return _impl_.starts_segment_; + if (_internal_has_starts_segment()) { + return _impl_.has_starts_segment_.starts_segment_; + } + return false; +} +inline void TripLeg_TrafficSegment::_internal_set_starts_segment(bool value) { + if (!_internal_has_starts_segment()) { + clear_has_starts_segment(); + set_has_starts_segment(); + } + _impl_.has_starts_segment_.starts_segment_ = value; } inline bool TripLeg_TrafficSegment::starts_segment() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.TrafficSegment.starts_segment) return _internal_starts_segment(); } -inline void TripLeg_TrafficSegment::_internal_set_starts_segment(bool value) { - - _impl_.starts_segment_ = value; -} inline void TripLeg_TrafficSegment::set_starts_segment(bool value) { _internal_set_starts_segment(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.TrafficSegment.starts_segment) } // bool ends_segment = 5; +inline bool TripLeg_TrafficSegment::_internal_has_ends_segment() const { + return has_ends_segment_case() == kEndsSegment; +} +inline bool TripLeg_TrafficSegment::has_ends_segment() const { + return _internal_has_ends_segment(); +} +inline void TripLeg_TrafficSegment::set_has_ends_segment() { + _impl_._oneof_case_[4] = kEndsSegment; +} inline void TripLeg_TrafficSegment::clear_ends_segment() { - _impl_.ends_segment_ = false; + if (_internal_has_ends_segment()) { + _impl_.has_ends_segment_.ends_segment_ = false; + clear_has_has_ends_segment(); + } } inline bool TripLeg_TrafficSegment::_internal_ends_segment() const { - return _impl_.ends_segment_; + if (_internal_has_ends_segment()) { + return _impl_.has_ends_segment_.ends_segment_; + } + return false; +} +inline void TripLeg_TrafficSegment::_internal_set_ends_segment(bool value) { + if (!_internal_has_ends_segment()) { + clear_has_ends_segment(); + set_has_ends_segment(); + } + _impl_.has_ends_segment_.ends_segment_ = value; } inline bool TripLeg_TrafficSegment::ends_segment() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.TrafficSegment.ends_segment) return _internal_ends_segment(); } -inline void TripLeg_TrafficSegment::_internal_set_ends_segment(bool value) { - - _impl_.ends_segment_ = value; -} inline void TripLeg_TrafficSegment::set_ends_segment(bool value) { _internal_set_ends_segment(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.TrafficSegment.ends_segment) } +inline bool TripLeg_TrafficSegment::has_has_segment_id() const { + return has_segment_id_case() != HAS_SEGMENT_ID_NOT_SET; +} +inline void TripLeg_TrafficSegment::clear_has_has_segment_id() { + _impl_._oneof_case_[0] = HAS_SEGMENT_ID_NOT_SET; +} +inline bool TripLeg_TrafficSegment::has_has_begin_percent() const { + return has_begin_percent_case() != HAS_BEGIN_PERCENT_NOT_SET; +} +inline void TripLeg_TrafficSegment::clear_has_has_begin_percent() { + _impl_._oneof_case_[1] = HAS_BEGIN_PERCENT_NOT_SET; +} +inline bool TripLeg_TrafficSegment::has_has_end_percent() const { + return has_end_percent_case() != HAS_END_PERCENT_NOT_SET; +} +inline void TripLeg_TrafficSegment::clear_has_has_end_percent() { + _impl_._oneof_case_[2] = HAS_END_PERCENT_NOT_SET; +} +inline bool TripLeg_TrafficSegment::has_has_starts_segment() const { + return has_starts_segment_case() != HAS_STARTS_SEGMENT_NOT_SET; +} +inline void TripLeg_TrafficSegment::clear_has_has_starts_segment() { + _impl_._oneof_case_[3] = HAS_STARTS_SEGMENT_NOT_SET; +} +inline bool TripLeg_TrafficSegment::has_has_ends_segment() const { + return has_ends_segment_case() != HAS_ENDS_SEGMENT_NOT_SET; +} +inline void TripLeg_TrafficSegment::clear_has_has_ends_segment() { + _impl_._oneof_case_[4] = HAS_ENDS_SEGMENT_NOT_SET; +} +inline TripLeg_TrafficSegment::HasSegmentIdCase TripLeg_TrafficSegment::has_segment_id_case() const { + return TripLeg_TrafficSegment::HasSegmentIdCase(_impl_._oneof_case_[0]); +} +inline TripLeg_TrafficSegment::HasBeginPercentCase TripLeg_TrafficSegment::has_begin_percent_case() const { + return TripLeg_TrafficSegment::HasBeginPercentCase(_impl_._oneof_case_[1]); +} +inline TripLeg_TrafficSegment::HasEndPercentCase TripLeg_TrafficSegment::has_end_percent_case() const { + return TripLeg_TrafficSegment::HasEndPercentCase(_impl_._oneof_case_[2]); +} +inline TripLeg_TrafficSegment::HasStartsSegmentCase TripLeg_TrafficSegment::has_starts_segment_case() const { + return TripLeg_TrafficSegment::HasStartsSegmentCase(_impl_._oneof_case_[3]); +} +inline TripLeg_TrafficSegment::HasEndsSegmentCase TripLeg_TrafficSegment::has_ends_segment_case() const { + return TripLeg_TrafficSegment::HasEndsSegmentCase(_impl_._oneof_case_[4]); +} // ------------------------------------------------------------------- // TripLeg_Restriction // uint32 type = 1; +inline bool TripLeg_Restriction::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool TripLeg_Restriction::has_type() const { + return _internal_has_type(); +} +inline void TripLeg_Restriction::set_has_type() { + _impl_._oneof_case_[0] = kType; +} inline void TripLeg_Restriction::clear_type() { - _impl_.type_ = 0u; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0u; + clear_has_has_type(); + } } inline uint32_t TripLeg_Restriction::_internal_type() const { - return _impl_.type_; + if (_internal_has_type()) { + return _impl_.has_type_.type_; + } + return 0u; +} +inline void TripLeg_Restriction::_internal_set_type(uint32_t value) { + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline uint32_t TripLeg_Restriction::type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Restriction.type) return _internal_type(); } -inline void TripLeg_Restriction::_internal_set_type(uint32_t value) { - - _impl_.type_ = value; -} inline void TripLeg_Restriction::set_type(uint32_t value) { _internal_set_type(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Restriction.type) } +inline bool TripLeg_Restriction::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void TripLeg_Restriction::clear_has_has_type() { + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} +inline TripLeg_Restriction::HasTypeCase TripLeg_Restriction::has_type_case() const { + return TripLeg_Restriction::HasTypeCase(_impl_._oneof_case_[0]); +} // ------------------------------------------------------------------- // TripLeg_Edge @@ -4413,59 +6229,113 @@ TripLeg_Edge::name() const { } // float length_km = 2; +inline bool TripLeg_Edge::_internal_has_length_km() const { + return has_length_km_case() == kLengthKm; +} +inline bool TripLeg_Edge::has_length_km() const { + return _internal_has_length_km(); +} +inline void TripLeg_Edge::set_has_length_km() { + _impl_._oneof_case_[0] = kLengthKm; +} inline void TripLeg_Edge::clear_length_km() { - _impl_.length_km_ = 0; + if (_internal_has_length_km()) { + _impl_.has_length_km_.length_km_ = 0; + clear_has_has_length_km(); + } } inline float TripLeg_Edge::_internal_length_km() const { - return _impl_.length_km_; + if (_internal_has_length_km()) { + return _impl_.has_length_km_.length_km_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_length_km(float value) { + if (!_internal_has_length_km()) { + clear_has_length_km(); + set_has_length_km(); + } + _impl_.has_length_km_.length_km_ = value; } inline float TripLeg_Edge::length_km() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.length_km) return _internal_length_km(); } -inline void TripLeg_Edge::_internal_set_length_km(float value) { - - _impl_.length_km_ = value; -} inline void TripLeg_Edge::set_length_km(float value) { _internal_set_length_km(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.length_km) } // float speed = 3; +inline bool TripLeg_Edge::_internal_has_speed() const { + return has_speed_case() == kSpeed; +} +inline bool TripLeg_Edge::has_speed() const { + return _internal_has_speed(); +} +inline void TripLeg_Edge::set_has_speed() { + _impl_._oneof_case_[1] = kSpeed; +} inline void TripLeg_Edge::clear_speed() { - _impl_.speed_ = 0; + if (_internal_has_speed()) { + _impl_.has_speed_.speed_ = 0; + clear_has_has_speed(); + } } inline float TripLeg_Edge::_internal_speed() const { - return _impl_.speed_; + if (_internal_has_speed()) { + return _impl_.has_speed_.speed_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_speed(float value) { + if (!_internal_has_speed()) { + clear_has_speed(); + set_has_speed(); + } + _impl_.has_speed_.speed_ = value; } inline float TripLeg_Edge::speed() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.speed) return _internal_speed(); } -inline void TripLeg_Edge::_internal_set_speed(float value) { - - _impl_.speed_ = value; -} inline void TripLeg_Edge::set_speed(float value) { _internal_set_speed(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.speed) } // .valhalla.RoadClass road_class = 4; +inline bool TripLeg_Edge::_internal_has_road_class() const { + return has_road_class_case() == kRoadClass; +} +inline bool TripLeg_Edge::has_road_class() const { + return _internal_has_road_class(); +} +inline void TripLeg_Edge::set_has_road_class() { + _impl_._oneof_case_[2] = kRoadClass; +} inline void TripLeg_Edge::clear_road_class() { - _impl_.road_class_ = 0; + if (_internal_has_road_class()) { + _impl_.has_road_class_.road_class_ = 0; + clear_has_has_road_class(); + } } inline ::valhalla::RoadClass TripLeg_Edge::_internal_road_class() const { - return static_cast< ::valhalla::RoadClass >(_impl_.road_class_); + if (_internal_has_road_class()) { + return static_cast< ::valhalla::RoadClass >(_impl_.has_road_class_.road_class_); + } + return static_cast< ::valhalla::RoadClass >(0); } inline ::valhalla::RoadClass TripLeg_Edge::road_class() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.road_class) return _internal_road_class(); } inline void TripLeg_Edge::_internal_set_road_class(::valhalla::RoadClass value) { - - _impl_.road_class_ = value; + if (!_internal_has_road_class()) { + clear_has_road_class(); + set_has_road_class(); + } + _impl_.has_road_class_.road_class_ = value; } inline void TripLeg_Edge::set_road_class(::valhalla::RoadClass value) { _internal_set_road_class(value); @@ -4473,99 +6343,189 @@ inline void TripLeg_Edge::set_road_class(::valhalla::RoadClass value) { } // uint32 begin_heading = 5; +inline bool TripLeg_Edge::_internal_has_begin_heading() const { + return has_begin_heading_case() == kBeginHeading; +} +inline bool TripLeg_Edge::has_begin_heading() const { + return _internal_has_begin_heading(); +} +inline void TripLeg_Edge::set_has_begin_heading() { + _impl_._oneof_case_[3] = kBeginHeading; +} inline void TripLeg_Edge::clear_begin_heading() { - _impl_.begin_heading_ = 0u; + if (_internal_has_begin_heading()) { + _impl_.has_begin_heading_.begin_heading_ = 0u; + clear_has_has_begin_heading(); + } } inline uint32_t TripLeg_Edge::_internal_begin_heading() const { - return _impl_.begin_heading_; + if (_internal_has_begin_heading()) { + return _impl_.has_begin_heading_.begin_heading_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_begin_heading(uint32_t value) { + if (!_internal_has_begin_heading()) { + clear_has_begin_heading(); + set_has_begin_heading(); + } + _impl_.has_begin_heading_.begin_heading_ = value; } inline uint32_t TripLeg_Edge::begin_heading() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.begin_heading) return _internal_begin_heading(); } -inline void TripLeg_Edge::_internal_set_begin_heading(uint32_t value) { - - _impl_.begin_heading_ = value; -} inline void TripLeg_Edge::set_begin_heading(uint32_t value) { _internal_set_begin_heading(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.begin_heading) } // uint32 end_heading = 6; +inline bool TripLeg_Edge::_internal_has_end_heading() const { + return has_end_heading_case() == kEndHeading; +} +inline bool TripLeg_Edge::has_end_heading() const { + return _internal_has_end_heading(); +} +inline void TripLeg_Edge::set_has_end_heading() { + _impl_._oneof_case_[4] = kEndHeading; +} inline void TripLeg_Edge::clear_end_heading() { - _impl_.end_heading_ = 0u; + if (_internal_has_end_heading()) { + _impl_.has_end_heading_.end_heading_ = 0u; + clear_has_has_end_heading(); + } } inline uint32_t TripLeg_Edge::_internal_end_heading() const { - return _impl_.end_heading_; + if (_internal_has_end_heading()) { + return _impl_.has_end_heading_.end_heading_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_end_heading(uint32_t value) { + if (!_internal_has_end_heading()) { + clear_has_end_heading(); + set_has_end_heading(); + } + _impl_.has_end_heading_.end_heading_ = value; } inline uint32_t TripLeg_Edge::end_heading() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.end_heading) return _internal_end_heading(); } -inline void TripLeg_Edge::_internal_set_end_heading(uint32_t value) { - - _impl_.end_heading_ = value; -} inline void TripLeg_Edge::set_end_heading(uint32_t value) { _internal_set_end_heading(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.end_heading) } // uint32 begin_shape_index = 7; +inline bool TripLeg_Edge::_internal_has_begin_shape_index() const { + return has_begin_shape_index_case() == kBeginShapeIndex; +} +inline bool TripLeg_Edge::has_begin_shape_index() const { + return _internal_has_begin_shape_index(); +} +inline void TripLeg_Edge::set_has_begin_shape_index() { + _impl_._oneof_case_[5] = kBeginShapeIndex; +} inline void TripLeg_Edge::clear_begin_shape_index() { - _impl_.begin_shape_index_ = 0u; + if (_internal_has_begin_shape_index()) { + _impl_.has_begin_shape_index_.begin_shape_index_ = 0u; + clear_has_has_begin_shape_index(); + } } inline uint32_t TripLeg_Edge::_internal_begin_shape_index() const { - return _impl_.begin_shape_index_; + if (_internal_has_begin_shape_index()) { + return _impl_.has_begin_shape_index_.begin_shape_index_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_begin_shape_index(uint32_t value) { + if (!_internal_has_begin_shape_index()) { + clear_has_begin_shape_index(); + set_has_begin_shape_index(); + } + _impl_.has_begin_shape_index_.begin_shape_index_ = value; } inline uint32_t TripLeg_Edge::begin_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.begin_shape_index) return _internal_begin_shape_index(); } -inline void TripLeg_Edge::_internal_set_begin_shape_index(uint32_t value) { - - _impl_.begin_shape_index_ = value; -} inline void TripLeg_Edge::set_begin_shape_index(uint32_t value) { _internal_set_begin_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.begin_shape_index) } // uint32 end_shape_index = 8; +inline bool TripLeg_Edge::_internal_has_end_shape_index() const { + return has_end_shape_index_case() == kEndShapeIndex; +} +inline bool TripLeg_Edge::has_end_shape_index() const { + return _internal_has_end_shape_index(); +} +inline void TripLeg_Edge::set_has_end_shape_index() { + _impl_._oneof_case_[6] = kEndShapeIndex; +} inline void TripLeg_Edge::clear_end_shape_index() { - _impl_.end_shape_index_ = 0u; + if (_internal_has_end_shape_index()) { + _impl_.has_end_shape_index_.end_shape_index_ = 0u; + clear_has_has_end_shape_index(); + } } inline uint32_t TripLeg_Edge::_internal_end_shape_index() const { - return _impl_.end_shape_index_; + if (_internal_has_end_shape_index()) { + return _impl_.has_end_shape_index_.end_shape_index_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_end_shape_index(uint32_t value) { + if (!_internal_has_end_shape_index()) { + clear_has_end_shape_index(); + set_has_end_shape_index(); + } + _impl_.has_end_shape_index_.end_shape_index_ = value; } inline uint32_t TripLeg_Edge::end_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.end_shape_index) return _internal_end_shape_index(); } -inline void TripLeg_Edge::_internal_set_end_shape_index(uint32_t value) { - - _impl_.end_shape_index_ = value; -} inline void TripLeg_Edge::set_end_shape_index(uint32_t value) { _internal_set_end_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.end_shape_index) } // .valhalla.TripLeg.Traversability traversability = 9; +inline bool TripLeg_Edge::_internal_has_traversability() const { + return has_traversability_case() == kTraversability; +} +inline bool TripLeg_Edge::has_traversability() const { + return _internal_has_traversability(); +} +inline void TripLeg_Edge::set_has_traversability() { + _impl_._oneof_case_[7] = kTraversability; +} inline void TripLeg_Edge::clear_traversability() { - _impl_.traversability_ = 0; + if (_internal_has_traversability()) { + _impl_.has_traversability_.traversability_ = 0; + clear_has_has_traversability(); + } } inline ::valhalla::TripLeg_Traversability TripLeg_Edge::_internal_traversability() const { - return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.traversability_); + if (_internal_has_traversability()) { + return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.has_traversability_.traversability_); + } + return static_cast< ::valhalla::TripLeg_Traversability >(0); } inline ::valhalla::TripLeg_Traversability TripLeg_Edge::traversability() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.traversability) return _internal_traversability(); } inline void TripLeg_Edge::_internal_set_traversability(::valhalla::TripLeg_Traversability value) { - - _impl_.traversability_ = value; + if (!_internal_has_traversability()) { + clear_has_traversability(); + set_has_traversability(); + } + _impl_.has_traversability_.traversability_ = value; } inline void TripLeg_Edge::set_traversability(::valhalla::TripLeg_Traversability value) { _internal_set_traversability(value); @@ -4573,19 +6533,37 @@ inline void TripLeg_Edge::set_traversability(::valhalla::TripLeg_Traversability } // .valhalla.TripLeg.Use use = 10; +inline bool TripLeg_Edge::_internal_has_use() const { + return has_use_case() == kUse; +} +inline bool TripLeg_Edge::has_use() const { + return _internal_has_use(); +} +inline void TripLeg_Edge::set_has_use() { + _impl_._oneof_case_[8] = kUse; +} inline void TripLeg_Edge::clear_use() { - _impl_.use_ = 0; + if (_internal_has_use()) { + _impl_.has_use_.use_ = 0; + clear_has_has_use(); + } } inline ::valhalla::TripLeg_Use TripLeg_Edge::_internal_use() const { - return static_cast< ::valhalla::TripLeg_Use >(_impl_.use_); + if (_internal_has_use()) { + return static_cast< ::valhalla::TripLeg_Use >(_impl_.has_use_.use_); + } + return static_cast< ::valhalla::TripLeg_Use >(0); } inline ::valhalla::TripLeg_Use TripLeg_Edge::use() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.use) return _internal_use(); } inline void TripLeg_Edge::_internal_set_use(::valhalla::TripLeg_Use value) { - - _impl_.use_ = value; + if (!_internal_has_use()) { + clear_has_use(); + set_has_use(); + } + _impl_.has_use_.use_ = value; } inline void TripLeg_Edge::set_use(::valhalla::TripLeg_Use value) { _internal_set_use(value); @@ -4593,19 +6571,37 @@ inline void TripLeg_Edge::set_use(::valhalla::TripLeg_Use value) { } // bool toll = 11; -inline void TripLeg_Edge::clear_toll() { - _impl_.toll_ = false; +inline bool TripLeg_Edge::_internal_has_toll() const { + return has_toll_case() == kToll; } -inline bool TripLeg_Edge::_internal_toll() const { - return _impl_.toll_; +inline bool TripLeg_Edge::has_toll() const { + return _internal_has_toll(); } -inline bool TripLeg_Edge::toll() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.toll) - return _internal_toll(); +inline void TripLeg_Edge::set_has_toll() { + _impl_._oneof_case_[9] = kToll; +} +inline void TripLeg_Edge::clear_toll() { + if (_internal_has_toll()) { + _impl_.has_toll_.toll_ = false; + clear_has_has_toll(); + } +} +inline bool TripLeg_Edge::_internal_toll() const { + if (_internal_has_toll()) { + return _impl_.has_toll_.toll_; + } + return false; } inline void TripLeg_Edge::_internal_set_toll(bool value) { - - _impl_.toll_ = value; + if (!_internal_has_toll()) { + clear_has_toll(); + set_has_toll(); + } + _impl_.has_toll_.toll_ = value; +} +inline bool TripLeg_Edge::toll() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.toll) + return _internal_toll(); } inline void TripLeg_Edge::set_toll(bool value) { _internal_set_toll(value); @@ -4613,139 +6609,265 @@ inline void TripLeg_Edge::set_toll(bool value) { } // bool unpaved = 12; +inline bool TripLeg_Edge::_internal_has_unpaved() const { + return has_unpaved_case() == kUnpaved; +} +inline bool TripLeg_Edge::has_unpaved() const { + return _internal_has_unpaved(); +} +inline void TripLeg_Edge::set_has_unpaved() { + _impl_._oneof_case_[10] = kUnpaved; +} inline void TripLeg_Edge::clear_unpaved() { - _impl_.unpaved_ = false; + if (_internal_has_unpaved()) { + _impl_.has_unpaved_.unpaved_ = false; + clear_has_has_unpaved(); + } } inline bool TripLeg_Edge::_internal_unpaved() const { - return _impl_.unpaved_; + if (_internal_has_unpaved()) { + return _impl_.has_unpaved_.unpaved_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_unpaved(bool value) { + if (!_internal_has_unpaved()) { + clear_has_unpaved(); + set_has_unpaved(); + } + _impl_.has_unpaved_.unpaved_ = value; } inline bool TripLeg_Edge::unpaved() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.unpaved) return _internal_unpaved(); } -inline void TripLeg_Edge::_internal_set_unpaved(bool value) { - - _impl_.unpaved_ = value; -} inline void TripLeg_Edge::set_unpaved(bool value) { _internal_set_unpaved(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.unpaved) } // bool tunnel = 13; +inline bool TripLeg_Edge::_internal_has_tunnel() const { + return has_tunnel_case() == kTunnel; +} +inline bool TripLeg_Edge::has_tunnel() const { + return _internal_has_tunnel(); +} +inline void TripLeg_Edge::set_has_tunnel() { + _impl_._oneof_case_[11] = kTunnel; +} inline void TripLeg_Edge::clear_tunnel() { - _impl_.tunnel_ = false; + if (_internal_has_tunnel()) { + _impl_.has_tunnel_.tunnel_ = false; + clear_has_has_tunnel(); + } } inline bool TripLeg_Edge::_internal_tunnel() const { - return _impl_.tunnel_; + if (_internal_has_tunnel()) { + return _impl_.has_tunnel_.tunnel_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_tunnel(bool value) { + if (!_internal_has_tunnel()) { + clear_has_tunnel(); + set_has_tunnel(); + } + _impl_.has_tunnel_.tunnel_ = value; } inline bool TripLeg_Edge::tunnel() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.tunnel) return _internal_tunnel(); } -inline void TripLeg_Edge::_internal_set_tunnel(bool value) { - - _impl_.tunnel_ = value; -} inline void TripLeg_Edge::set_tunnel(bool value) { _internal_set_tunnel(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.tunnel) } // bool bridge = 14; +inline bool TripLeg_Edge::_internal_has_bridge() const { + return has_bridge_case() == kBridge; +} +inline bool TripLeg_Edge::has_bridge() const { + return _internal_has_bridge(); +} +inline void TripLeg_Edge::set_has_bridge() { + _impl_._oneof_case_[12] = kBridge; +} inline void TripLeg_Edge::clear_bridge() { - _impl_.bridge_ = false; + if (_internal_has_bridge()) { + _impl_.has_bridge_.bridge_ = false; + clear_has_has_bridge(); + } } inline bool TripLeg_Edge::_internal_bridge() const { - return _impl_.bridge_; + if (_internal_has_bridge()) { + return _impl_.has_bridge_.bridge_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_bridge(bool value) { + if (!_internal_has_bridge()) { + clear_has_bridge(); + set_has_bridge(); + } + _impl_.has_bridge_.bridge_ = value; } inline bool TripLeg_Edge::bridge() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.bridge) return _internal_bridge(); } -inline void TripLeg_Edge::_internal_set_bridge(bool value) { - - _impl_.bridge_ = value; -} inline void TripLeg_Edge::set_bridge(bool value) { _internal_set_bridge(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.bridge) } // bool roundabout = 15; +inline bool TripLeg_Edge::_internal_has_roundabout() const { + return has_roundabout_case() == kRoundabout; +} +inline bool TripLeg_Edge::has_roundabout() const { + return _internal_has_roundabout(); +} +inline void TripLeg_Edge::set_has_roundabout() { + _impl_._oneof_case_[13] = kRoundabout; +} inline void TripLeg_Edge::clear_roundabout() { - _impl_.roundabout_ = false; + if (_internal_has_roundabout()) { + _impl_.has_roundabout_.roundabout_ = false; + clear_has_has_roundabout(); + } } inline bool TripLeg_Edge::_internal_roundabout() const { - return _impl_.roundabout_; + if (_internal_has_roundabout()) { + return _impl_.has_roundabout_.roundabout_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_roundabout(bool value) { + if (!_internal_has_roundabout()) { + clear_has_roundabout(); + set_has_roundabout(); + } + _impl_.has_roundabout_.roundabout_ = value; } inline bool TripLeg_Edge::roundabout() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.roundabout) return _internal_roundabout(); } -inline void TripLeg_Edge::_internal_set_roundabout(bool value) { - - _impl_.roundabout_ = value; -} inline void TripLeg_Edge::set_roundabout(bool value) { _internal_set_roundabout(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.roundabout) } // bool internal_intersection = 16; +inline bool TripLeg_Edge::_internal_has_internal_intersection() const { + return has_internal_intersection_case() == kInternalIntersection; +} +inline bool TripLeg_Edge::has_internal_intersection() const { + return _internal_has_internal_intersection(); +} +inline void TripLeg_Edge::set_has_internal_intersection() { + _impl_._oneof_case_[14] = kInternalIntersection; +} inline void TripLeg_Edge::clear_internal_intersection() { - _impl_.internal_intersection_ = false; + if (_internal_has_internal_intersection()) { + _impl_.has_internal_intersection_.internal_intersection_ = false; + clear_has_has_internal_intersection(); + } } inline bool TripLeg_Edge::_internal_internal_intersection() const { - return _impl_.internal_intersection_; + if (_internal_has_internal_intersection()) { + return _impl_.has_internal_intersection_.internal_intersection_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_internal_intersection(bool value) { + if (!_internal_has_internal_intersection()) { + clear_has_internal_intersection(); + set_has_internal_intersection(); + } + _impl_.has_internal_intersection_.internal_intersection_ = value; } inline bool TripLeg_Edge::internal_intersection() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.internal_intersection) return _internal_internal_intersection(); } -inline void TripLeg_Edge::_internal_set_internal_intersection(bool value) { - - _impl_.internal_intersection_ = value; -} inline void TripLeg_Edge::set_internal_intersection(bool value) { _internal_set_internal_intersection(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.internal_intersection) } // bool drive_on_left = 17; +inline bool TripLeg_Edge::_internal_has_drive_on_left() const { + return has_drive_on_left_case() == kDriveOnLeft; +} +inline bool TripLeg_Edge::has_drive_on_left() const { + return _internal_has_drive_on_left(); +} +inline void TripLeg_Edge::set_has_drive_on_left() { + _impl_._oneof_case_[15] = kDriveOnLeft; +} inline void TripLeg_Edge::clear_drive_on_left() { - _impl_.drive_on_left_ = false; + if (_internal_has_drive_on_left()) { + _impl_.has_drive_on_left_.drive_on_left_ = false; + clear_has_has_drive_on_left(); + } } inline bool TripLeg_Edge::_internal_drive_on_left() const { - return _impl_.drive_on_left_; + if (_internal_has_drive_on_left()) { + return _impl_.has_drive_on_left_.drive_on_left_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_drive_on_left(bool value) { + if (!_internal_has_drive_on_left()) { + clear_has_drive_on_left(); + set_has_drive_on_left(); + } + _impl_.has_drive_on_left_.drive_on_left_ = value; } inline bool TripLeg_Edge::drive_on_left() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.drive_on_left) return _internal_drive_on_left(); } -inline void TripLeg_Edge::_internal_set_drive_on_left(bool value) { - - _impl_.drive_on_left_ = value; -} inline void TripLeg_Edge::set_drive_on_left(bool value) { _internal_set_drive_on_left(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.drive_on_left) } // .valhalla.TripLeg.Surface surface = 18; +inline bool TripLeg_Edge::_internal_has_surface() const { + return has_surface_case() == kSurface; +} +inline bool TripLeg_Edge::has_surface() const { + return _internal_has_surface(); +} +inline void TripLeg_Edge::set_has_surface() { + _impl_._oneof_case_[16] = kSurface; +} inline void TripLeg_Edge::clear_surface() { - _impl_.surface_ = 0; + if (_internal_has_surface()) { + _impl_.has_surface_.surface_ = 0; + clear_has_has_surface(); + } } inline ::valhalla::TripLeg_Surface TripLeg_Edge::_internal_surface() const { - return static_cast< ::valhalla::TripLeg_Surface >(_impl_.surface_); + if (_internal_has_surface()) { + return static_cast< ::valhalla::TripLeg_Surface >(_impl_.has_surface_.surface_); + } + return static_cast< ::valhalla::TripLeg_Surface >(0); } inline ::valhalla::TripLeg_Surface TripLeg_Edge::surface() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.surface) return _internal_surface(); } inline void TripLeg_Edge::_internal_set_surface(::valhalla::TripLeg_Surface value) { - - _impl_.surface_ = value; + if (!_internal_has_surface()) { + clear_has_surface(); + set_has_surface(); + } + _impl_.has_surface_.surface_ = value; } inline void TripLeg_Edge::set_surface(::valhalla::TripLeg_Surface value) { _internal_set_surface(value); @@ -4838,19 +6960,37 @@ inline void TripLeg_Edge::set_allocated_sign(::valhalla::TripSign* sign) { } // .valhalla.TravelMode travel_mode = 20; +inline bool TripLeg_Edge::_internal_has_travel_mode() const { + return has_travel_mode_case() == kTravelMode; +} +inline bool TripLeg_Edge::has_travel_mode() const { + return _internal_has_travel_mode(); +} +inline void TripLeg_Edge::set_has_travel_mode() { + _impl_._oneof_case_[17] = kTravelMode; +} inline void TripLeg_Edge::clear_travel_mode() { - _impl_.travel_mode_ = 0; + if (_internal_has_travel_mode()) { + _impl_.has_travel_mode_.travel_mode_ = 0; + clear_has_has_travel_mode(); + } } inline ::valhalla::TravelMode TripLeg_Edge::_internal_travel_mode() const { - return static_cast< ::valhalla::TravelMode >(_impl_.travel_mode_); + if (_internal_has_travel_mode()) { + return static_cast< ::valhalla::TravelMode >(_impl_.has_travel_mode_.travel_mode_); + } + return static_cast< ::valhalla::TravelMode >(0); } inline ::valhalla::TravelMode TripLeg_Edge::travel_mode() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.travel_mode) return _internal_travel_mode(); } inline void TripLeg_Edge::_internal_set_travel_mode(::valhalla::TravelMode value) { - - _impl_.travel_mode_ = value; + if (!_internal_has_travel_mode()) { + clear_has_travel_mode(); + set_has_travel_mode(); + } + _impl_.has_travel_mode_.travel_mode_ = value; } inline void TripLeg_Edge::set_travel_mode(::valhalla::TravelMode value) { _internal_set_travel_mode(value); @@ -4858,19 +6998,37 @@ inline void TripLeg_Edge::set_travel_mode(::valhalla::TravelMode value) { } // .valhalla.VehicleType vehicle_type = 21; +inline bool TripLeg_Edge::_internal_has_vehicle_type() const { + return has_vehicle_type_case() == kVehicleType; +} +inline bool TripLeg_Edge::has_vehicle_type() const { + return _internal_has_vehicle_type(); +} +inline void TripLeg_Edge::set_has_vehicle_type() { + _impl_._oneof_case_[18] = kVehicleType; +} inline void TripLeg_Edge::clear_vehicle_type() { - _impl_.vehicle_type_ = 0; + if (_internal_has_vehicle_type()) { + _impl_.has_vehicle_type_.vehicle_type_ = 0; + clear_has_has_vehicle_type(); + } } inline ::valhalla::VehicleType TripLeg_Edge::_internal_vehicle_type() const { - return static_cast< ::valhalla::VehicleType >(_impl_.vehicle_type_); + if (_internal_has_vehicle_type()) { + return static_cast< ::valhalla::VehicleType >(_impl_.has_vehicle_type_.vehicle_type_); + } + return static_cast< ::valhalla::VehicleType >(0); } inline ::valhalla::VehicleType TripLeg_Edge::vehicle_type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.vehicle_type) return _internal_vehicle_type(); } inline void TripLeg_Edge::_internal_set_vehicle_type(::valhalla::VehicleType value) { - - _impl_.vehicle_type_ = value; + if (!_internal_has_vehicle_type()) { + clear_has_vehicle_type(); + set_has_vehicle_type(); + } + _impl_.has_vehicle_type_.vehicle_type_ = value; } inline void TripLeg_Edge::set_vehicle_type(::valhalla::VehicleType value) { _internal_set_vehicle_type(value); @@ -4878,19 +7036,37 @@ inline void TripLeg_Edge::set_vehicle_type(::valhalla::VehicleType value) { } // .valhalla.PedestrianType pedestrian_type = 22; +inline bool TripLeg_Edge::_internal_has_pedestrian_type() const { + return has_pedestrian_type_case() == kPedestrianType; +} +inline bool TripLeg_Edge::has_pedestrian_type() const { + return _internal_has_pedestrian_type(); +} +inline void TripLeg_Edge::set_has_pedestrian_type() { + _impl_._oneof_case_[19] = kPedestrianType; +} inline void TripLeg_Edge::clear_pedestrian_type() { - _impl_.pedestrian_type_ = 0; + if (_internal_has_pedestrian_type()) { + _impl_.has_pedestrian_type_.pedestrian_type_ = 0; + clear_has_has_pedestrian_type(); + } } inline ::valhalla::PedestrianType TripLeg_Edge::_internal_pedestrian_type() const { - return static_cast< ::valhalla::PedestrianType >(_impl_.pedestrian_type_); + if (_internal_has_pedestrian_type()) { + return static_cast< ::valhalla::PedestrianType >(_impl_.has_pedestrian_type_.pedestrian_type_); + } + return static_cast< ::valhalla::PedestrianType >(0); } inline ::valhalla::PedestrianType TripLeg_Edge::pedestrian_type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.pedestrian_type) return _internal_pedestrian_type(); } inline void TripLeg_Edge::_internal_set_pedestrian_type(::valhalla::PedestrianType value) { - - _impl_.pedestrian_type_ = value; + if (!_internal_has_pedestrian_type()) { + clear_has_pedestrian_type(); + set_has_pedestrian_type(); + } + _impl_.has_pedestrian_type_.pedestrian_type_ = value; } inline void TripLeg_Edge::set_pedestrian_type(::valhalla::PedestrianType value) { _internal_set_pedestrian_type(value); @@ -4898,19 +7074,37 @@ inline void TripLeg_Edge::set_pedestrian_type(::valhalla::PedestrianType value) } // .valhalla.BicycleType bicycle_type = 23; +inline bool TripLeg_Edge::_internal_has_bicycle_type() const { + return has_bicycle_type_case() == kBicycleType; +} +inline bool TripLeg_Edge::has_bicycle_type() const { + return _internal_has_bicycle_type(); +} +inline void TripLeg_Edge::set_has_bicycle_type() { + _impl_._oneof_case_[20] = kBicycleType; +} inline void TripLeg_Edge::clear_bicycle_type() { - _impl_.bicycle_type_ = 0; + if (_internal_has_bicycle_type()) { + _impl_.has_bicycle_type_.bicycle_type_ = 0; + clear_has_has_bicycle_type(); + } } inline ::valhalla::BicycleType TripLeg_Edge::_internal_bicycle_type() const { - return static_cast< ::valhalla::BicycleType >(_impl_.bicycle_type_); + if (_internal_has_bicycle_type()) { + return static_cast< ::valhalla::BicycleType >(_impl_.has_bicycle_type_.bicycle_type_); + } + return static_cast< ::valhalla::BicycleType >(0); } inline ::valhalla::BicycleType TripLeg_Edge::bicycle_type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.bicycle_type) return _internal_bicycle_type(); } inline void TripLeg_Edge::_internal_set_bicycle_type(::valhalla::BicycleType value) { - - _impl_.bicycle_type_ = value; + if (!_internal_has_bicycle_type()) { + clear_has_bicycle_type(); + set_has_bicycle_type(); + } + _impl_.has_bicycle_type_.bicycle_type_ = value; } inline void TripLeg_Edge::set_bicycle_type(::valhalla::BicycleType value) { _internal_set_bicycle_type(value); @@ -4918,19 +7112,37 @@ inline void TripLeg_Edge::set_bicycle_type(::valhalla::BicycleType value) { } // .valhalla.TransitType transit_type = 24; +inline bool TripLeg_Edge::_internal_has_transit_type() const { + return has_transit_type_case() == kTransitType; +} +inline bool TripLeg_Edge::has_transit_type() const { + return _internal_has_transit_type(); +} +inline void TripLeg_Edge::set_has_transit_type() { + _impl_._oneof_case_[21] = kTransitType; +} inline void TripLeg_Edge::clear_transit_type() { - _impl_.transit_type_ = 0; + if (_internal_has_transit_type()) { + _impl_.has_transit_type_.transit_type_ = 0; + clear_has_has_transit_type(); + } } inline ::valhalla::TransitType TripLeg_Edge::_internal_transit_type() const { - return static_cast< ::valhalla::TransitType >(_impl_.transit_type_); + if (_internal_has_transit_type()) { + return static_cast< ::valhalla::TransitType >(_impl_.has_transit_type_.transit_type_); + } + return static_cast< ::valhalla::TransitType >(0); } inline ::valhalla::TransitType TripLeg_Edge::transit_type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.transit_type) return _internal_transit_type(); } inline void TripLeg_Edge::_internal_set_transit_type(::valhalla::TransitType value) { - - _impl_.transit_type_ = value; + if (!_internal_has_transit_type()) { + clear_has_transit_type(); + set_has_transit_type(); + } + _impl_.has_transit_type_.transit_type_ = value; } inline void TripLeg_Edge::set_transit_type(::valhalla::TransitType value) { _internal_set_transit_type(value); @@ -5023,179 +7235,341 @@ inline void TripLeg_Edge::set_allocated_transit_route_info(::valhalla::TransitRo } // uint64 id = 26; +inline bool TripLeg_Edge::_internal_has_id() const { + return has_id_case() == kId; +} +inline bool TripLeg_Edge::has_id() const { + return _internal_has_id(); +} +inline void TripLeg_Edge::set_has_id() { + _impl_._oneof_case_[22] = kId; +} inline void TripLeg_Edge::clear_id() { - _impl_.id_ = uint64_t{0u}; + if (_internal_has_id()) { + _impl_.has_id_.id_ = uint64_t{0u}; + clear_has_has_id(); + } } inline uint64_t TripLeg_Edge::_internal_id() const { - return _impl_.id_; + if (_internal_has_id()) { + return _impl_.has_id_.id_; + } + return uint64_t{0u}; +} +inline void TripLeg_Edge::_internal_set_id(uint64_t value) { + if (!_internal_has_id()) { + clear_has_id(); + set_has_id(); + } + _impl_.has_id_.id_ = value; } inline uint64_t TripLeg_Edge::id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.id) return _internal_id(); } -inline void TripLeg_Edge::_internal_set_id(uint64_t value) { - - _impl_.id_ = value; -} inline void TripLeg_Edge::set_id(uint64_t value) { _internal_set_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.id) } // uint64 way_id = 27; +inline bool TripLeg_Edge::_internal_has_way_id() const { + return has_way_id_case() == kWayId; +} +inline bool TripLeg_Edge::has_way_id() const { + return _internal_has_way_id(); +} +inline void TripLeg_Edge::set_has_way_id() { + _impl_._oneof_case_[23] = kWayId; +} inline void TripLeg_Edge::clear_way_id() { - _impl_.way_id_ = uint64_t{0u}; + if (_internal_has_way_id()) { + _impl_.has_way_id_.way_id_ = uint64_t{0u}; + clear_has_has_way_id(); + } } inline uint64_t TripLeg_Edge::_internal_way_id() const { - return _impl_.way_id_; + if (_internal_has_way_id()) { + return _impl_.has_way_id_.way_id_; + } + return uint64_t{0u}; +} +inline void TripLeg_Edge::_internal_set_way_id(uint64_t value) { + if (!_internal_has_way_id()) { + clear_has_way_id(); + set_has_way_id(); + } + _impl_.has_way_id_.way_id_ = value; } inline uint64_t TripLeg_Edge::way_id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.way_id) return _internal_way_id(); } -inline void TripLeg_Edge::_internal_set_way_id(uint64_t value) { - - _impl_.way_id_ = value; -} inline void TripLeg_Edge::set_way_id(uint64_t value) { _internal_set_way_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.way_id) } // float weighted_grade = 28; +inline bool TripLeg_Edge::_internal_has_weighted_grade() const { + return has_weighted_grade_case() == kWeightedGrade; +} +inline bool TripLeg_Edge::has_weighted_grade() const { + return _internal_has_weighted_grade(); +} +inline void TripLeg_Edge::set_has_weighted_grade() { + _impl_._oneof_case_[24] = kWeightedGrade; +} inline void TripLeg_Edge::clear_weighted_grade() { - _impl_.weighted_grade_ = 0; + if (_internal_has_weighted_grade()) { + _impl_.has_weighted_grade_.weighted_grade_ = 0; + clear_has_has_weighted_grade(); + } } inline float TripLeg_Edge::_internal_weighted_grade() const { - return _impl_.weighted_grade_; + if (_internal_has_weighted_grade()) { + return _impl_.has_weighted_grade_.weighted_grade_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_weighted_grade(float value) { + if (!_internal_has_weighted_grade()) { + clear_has_weighted_grade(); + set_has_weighted_grade(); + } + _impl_.has_weighted_grade_.weighted_grade_ = value; } inline float TripLeg_Edge::weighted_grade() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.weighted_grade) return _internal_weighted_grade(); } -inline void TripLeg_Edge::_internal_set_weighted_grade(float value) { - - _impl_.weighted_grade_ = value; -} inline void TripLeg_Edge::set_weighted_grade(float value) { _internal_set_weighted_grade(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.weighted_grade) } // int32 max_upward_grade = 29; +inline bool TripLeg_Edge::_internal_has_max_upward_grade() const { + return has_max_upward_grade_case() == kMaxUpwardGrade; +} +inline bool TripLeg_Edge::has_max_upward_grade() const { + return _internal_has_max_upward_grade(); +} +inline void TripLeg_Edge::set_has_max_upward_grade() { + _impl_._oneof_case_[25] = kMaxUpwardGrade; +} inline void TripLeg_Edge::clear_max_upward_grade() { - _impl_.max_upward_grade_ = 0; + if (_internal_has_max_upward_grade()) { + _impl_.has_max_upward_grade_.max_upward_grade_ = 0; + clear_has_has_max_upward_grade(); + } } inline int32_t TripLeg_Edge::_internal_max_upward_grade() const { - return _impl_.max_upward_grade_; + if (_internal_has_max_upward_grade()) { + return _impl_.has_max_upward_grade_.max_upward_grade_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_max_upward_grade(int32_t value) { + if (!_internal_has_max_upward_grade()) { + clear_has_max_upward_grade(); + set_has_max_upward_grade(); + } + _impl_.has_max_upward_grade_.max_upward_grade_ = value; } inline int32_t TripLeg_Edge::max_upward_grade() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.max_upward_grade) return _internal_max_upward_grade(); } -inline void TripLeg_Edge::_internal_set_max_upward_grade(int32_t value) { - - _impl_.max_upward_grade_ = value; -} inline void TripLeg_Edge::set_max_upward_grade(int32_t value) { _internal_set_max_upward_grade(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.max_upward_grade) } // int32 max_downward_grade = 30; +inline bool TripLeg_Edge::_internal_has_max_downward_grade() const { + return has_max_downward_grade_case() == kMaxDownwardGrade; +} +inline bool TripLeg_Edge::has_max_downward_grade() const { + return _internal_has_max_downward_grade(); +} +inline void TripLeg_Edge::set_has_max_downward_grade() { + _impl_._oneof_case_[26] = kMaxDownwardGrade; +} inline void TripLeg_Edge::clear_max_downward_grade() { - _impl_.max_downward_grade_ = 0; + if (_internal_has_max_downward_grade()) { + _impl_.has_max_downward_grade_.max_downward_grade_ = 0; + clear_has_has_max_downward_grade(); + } } inline int32_t TripLeg_Edge::_internal_max_downward_grade() const { - return _impl_.max_downward_grade_; + if (_internal_has_max_downward_grade()) { + return _impl_.has_max_downward_grade_.max_downward_grade_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_max_downward_grade(int32_t value) { + if (!_internal_has_max_downward_grade()) { + clear_has_max_downward_grade(); + set_has_max_downward_grade(); + } + _impl_.has_max_downward_grade_.max_downward_grade_ = value; } inline int32_t TripLeg_Edge::max_downward_grade() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.max_downward_grade) return _internal_max_downward_grade(); } -inline void TripLeg_Edge::_internal_set_max_downward_grade(int32_t value) { - - _impl_.max_downward_grade_ = value; -} inline void TripLeg_Edge::set_max_downward_grade(int32_t value) { _internal_set_max_downward_grade(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.max_downward_grade) } // uint32 lane_count = 31; +inline bool TripLeg_Edge::_internal_has_lane_count() const { + return has_lane_count_case() == kLaneCount; +} +inline bool TripLeg_Edge::has_lane_count() const { + return _internal_has_lane_count(); +} +inline void TripLeg_Edge::set_has_lane_count() { + _impl_._oneof_case_[27] = kLaneCount; +} inline void TripLeg_Edge::clear_lane_count() { - _impl_.lane_count_ = 0u; + if (_internal_has_lane_count()) { + _impl_.has_lane_count_.lane_count_ = 0u; + clear_has_has_lane_count(); + } } inline uint32_t TripLeg_Edge::_internal_lane_count() const { - return _impl_.lane_count_; + if (_internal_has_lane_count()) { + return _impl_.has_lane_count_.lane_count_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_lane_count(uint32_t value) { + if (!_internal_has_lane_count()) { + clear_has_lane_count(); + set_has_lane_count(); + } + _impl_.has_lane_count_.lane_count_ = value; } inline uint32_t TripLeg_Edge::lane_count() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.lane_count) return _internal_lane_count(); } -inline void TripLeg_Edge::_internal_set_lane_count(uint32_t value) { - - _impl_.lane_count_ = value; -} inline void TripLeg_Edge::set_lane_count(uint32_t value) { _internal_set_lane_count(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.lane_count) } // .valhalla.TripLeg.CycleLane cycle_lane = 32; +inline bool TripLeg_Edge::_internal_has_cycle_lane() const { + return has_cycle_lane_case() == kCycleLane; +} +inline bool TripLeg_Edge::has_cycle_lane() const { + return _internal_has_cycle_lane(); +} +inline void TripLeg_Edge::set_has_cycle_lane() { + _impl_._oneof_case_[28] = kCycleLane; +} inline void TripLeg_Edge::clear_cycle_lane() { - _impl_.cycle_lane_ = 0; + if (_internal_has_cycle_lane()) { + _impl_.has_cycle_lane_.cycle_lane_ = 0; + clear_has_has_cycle_lane(); + } } inline ::valhalla::TripLeg_CycleLane TripLeg_Edge::_internal_cycle_lane() const { - return static_cast< ::valhalla::TripLeg_CycleLane >(_impl_.cycle_lane_); + if (_internal_has_cycle_lane()) { + return static_cast< ::valhalla::TripLeg_CycleLane >(_impl_.has_cycle_lane_.cycle_lane_); + } + return static_cast< ::valhalla::TripLeg_CycleLane >(0); } inline ::valhalla::TripLeg_CycleLane TripLeg_Edge::cycle_lane() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.cycle_lane) return _internal_cycle_lane(); } inline void TripLeg_Edge::_internal_set_cycle_lane(::valhalla::TripLeg_CycleLane value) { - - _impl_.cycle_lane_ = value; + if (!_internal_has_cycle_lane()) { + clear_has_cycle_lane(); + set_has_cycle_lane(); + } + _impl_.has_cycle_lane_.cycle_lane_ = value; } inline void TripLeg_Edge::set_cycle_lane(::valhalla::TripLeg_CycleLane value) { _internal_set_cycle_lane(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.cycle_lane) } -// bool bicycle_network = 33; +// uint32 bicycle_network = 33; +inline bool TripLeg_Edge::_internal_has_bicycle_network() const { + return has_bicycle_network_case() == kBicycleNetwork; +} +inline bool TripLeg_Edge::has_bicycle_network() const { + return _internal_has_bicycle_network(); +} +inline void TripLeg_Edge::set_has_bicycle_network() { + _impl_._oneof_case_[29] = kBicycleNetwork; +} inline void TripLeg_Edge::clear_bicycle_network() { - _impl_.bicycle_network_ = false; + if (_internal_has_bicycle_network()) { + _impl_.has_bicycle_network_.bicycle_network_ = 0u; + clear_has_has_bicycle_network(); + } } -inline bool TripLeg_Edge::_internal_bicycle_network() const { - return _impl_.bicycle_network_; +inline uint32_t TripLeg_Edge::_internal_bicycle_network() const { + if (_internal_has_bicycle_network()) { + return _impl_.has_bicycle_network_.bicycle_network_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_bicycle_network(uint32_t value) { + if (!_internal_has_bicycle_network()) { + clear_has_bicycle_network(); + set_has_bicycle_network(); + } + _impl_.has_bicycle_network_.bicycle_network_ = value; } -inline bool TripLeg_Edge::bicycle_network() const { +inline uint32_t TripLeg_Edge::bicycle_network() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.bicycle_network) return _internal_bicycle_network(); } -inline void TripLeg_Edge::_internal_set_bicycle_network(bool value) { - - _impl_.bicycle_network_ = value; -} -inline void TripLeg_Edge::set_bicycle_network(bool value) { +inline void TripLeg_Edge::set_bicycle_network(uint32_t value) { _internal_set_bicycle_network(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.bicycle_network) } // .valhalla.TripLeg.Sidewalk sidewalk = 34; +inline bool TripLeg_Edge::_internal_has_sidewalk() const { + return has_sidewalk_case() == kSidewalk; +} +inline bool TripLeg_Edge::has_sidewalk() const { + return _internal_has_sidewalk(); +} +inline void TripLeg_Edge::set_has_sidewalk() { + _impl_._oneof_case_[30] = kSidewalk; +} inline void TripLeg_Edge::clear_sidewalk() { - _impl_.sidewalk_ = 0; + if (_internal_has_sidewalk()) { + _impl_.has_sidewalk_.sidewalk_ = 0; + clear_has_has_sidewalk(); + } } inline ::valhalla::TripLeg_Sidewalk TripLeg_Edge::_internal_sidewalk() const { - return static_cast< ::valhalla::TripLeg_Sidewalk >(_impl_.sidewalk_); + if (_internal_has_sidewalk()) { + return static_cast< ::valhalla::TripLeg_Sidewalk >(_impl_.has_sidewalk_.sidewalk_); + } + return static_cast< ::valhalla::TripLeg_Sidewalk >(0); } inline ::valhalla::TripLeg_Sidewalk TripLeg_Edge::sidewalk() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.sidewalk) return _internal_sidewalk(); } inline void TripLeg_Edge::_internal_set_sidewalk(::valhalla::TripLeg_Sidewalk value) { - - _impl_.sidewalk_ = value; + if (!_internal_has_sidewalk()) { + clear_has_sidewalk(); + set_has_sidewalk(); + } + _impl_.has_sidewalk_.sidewalk_ = value; } inline void TripLeg_Edge::set_sidewalk(::valhalla::TripLeg_Sidewalk value) { _internal_set_sidewalk(value); @@ -5203,79 +7577,151 @@ inline void TripLeg_Edge::set_sidewalk(::valhalla::TripLeg_Sidewalk value) { } // uint32 density = 35; +inline bool TripLeg_Edge::_internal_has_density() const { + return has_density_case() == kDensity; +} +inline bool TripLeg_Edge::has_density() const { + return _internal_has_density(); +} +inline void TripLeg_Edge::set_has_density() { + _impl_._oneof_case_[31] = kDensity; +} inline void TripLeg_Edge::clear_density() { - _impl_.density_ = 0u; + if (_internal_has_density()) { + _impl_.has_density_.density_ = 0u; + clear_has_has_density(); + } } inline uint32_t TripLeg_Edge::_internal_density() const { - return _impl_.density_; + if (_internal_has_density()) { + return _impl_.has_density_.density_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_density(uint32_t value) { + if (!_internal_has_density()) { + clear_has_density(); + set_has_density(); + } + _impl_.has_density_.density_ = value; } inline uint32_t TripLeg_Edge::density() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.density) return _internal_density(); } -inline void TripLeg_Edge::_internal_set_density(uint32_t value) { - - _impl_.density_ = value; -} inline void TripLeg_Edge::set_density(uint32_t value) { _internal_set_density(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.density) } // uint32 speed_limit = 36; +inline bool TripLeg_Edge::_internal_has_speed_limit() const { + return has_speed_limit_case() == kSpeedLimit; +} +inline bool TripLeg_Edge::has_speed_limit() const { + return _internal_has_speed_limit(); +} +inline void TripLeg_Edge::set_has_speed_limit() { + _impl_._oneof_case_[32] = kSpeedLimit; +} inline void TripLeg_Edge::clear_speed_limit() { - _impl_.speed_limit_ = 0u; + if (_internal_has_speed_limit()) { + _impl_.has_speed_limit_.speed_limit_ = 0u; + clear_has_has_speed_limit(); + } } inline uint32_t TripLeg_Edge::_internal_speed_limit() const { - return _impl_.speed_limit_; + if (_internal_has_speed_limit()) { + return _impl_.has_speed_limit_.speed_limit_; + } + return 0u; +} +inline void TripLeg_Edge::_internal_set_speed_limit(uint32_t value) { + if (!_internal_has_speed_limit()) { + clear_has_speed_limit(); + set_has_speed_limit(); + } + _impl_.has_speed_limit_.speed_limit_ = value; } inline uint32_t TripLeg_Edge::speed_limit() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.speed_limit) return _internal_speed_limit(); } -inline void TripLeg_Edge::_internal_set_speed_limit(uint32_t value) { - - _impl_.speed_limit_ = value; -} inline void TripLeg_Edge::set_speed_limit(uint32_t value) { _internal_set_speed_limit(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.speed_limit) } // float truck_speed = 37; +inline bool TripLeg_Edge::_internal_has_truck_speed() const { + return has_truck_speed_case() == kTruckSpeed; +} +inline bool TripLeg_Edge::has_truck_speed() const { + return _internal_has_truck_speed(); +} +inline void TripLeg_Edge::set_has_truck_speed() { + _impl_._oneof_case_[33] = kTruckSpeed; +} inline void TripLeg_Edge::clear_truck_speed() { - _impl_.truck_speed_ = 0; + if (_internal_has_truck_speed()) { + _impl_.has_truck_speed_.truck_speed_ = 0; + clear_has_has_truck_speed(); + } } inline float TripLeg_Edge::_internal_truck_speed() const { - return _impl_.truck_speed_; + if (_internal_has_truck_speed()) { + return _impl_.has_truck_speed_.truck_speed_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_truck_speed(float value) { + if (!_internal_has_truck_speed()) { + clear_has_truck_speed(); + set_has_truck_speed(); + } + _impl_.has_truck_speed_.truck_speed_ = value; } inline float TripLeg_Edge::truck_speed() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.truck_speed) return _internal_truck_speed(); } -inline void TripLeg_Edge::_internal_set_truck_speed(float value) { - - _impl_.truck_speed_ = value; -} inline void TripLeg_Edge::set_truck_speed(float value) { _internal_set_truck_speed(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.truck_speed) } // bool truck_route = 38; +inline bool TripLeg_Edge::_internal_has_truck_route() const { + return has_truck_route_case() == kTruckRoute; +} +inline bool TripLeg_Edge::has_truck_route() const { + return _internal_has_truck_route(); +} +inline void TripLeg_Edge::set_has_truck_route() { + _impl_._oneof_case_[34] = kTruckRoute; +} inline void TripLeg_Edge::clear_truck_route() { - _impl_.truck_route_ = false; + if (_internal_has_truck_route()) { + _impl_.has_truck_route_.truck_route_ = false; + clear_has_has_truck_route(); + } } inline bool TripLeg_Edge::_internal_truck_route() const { - return _impl_.truck_route_; -} -inline bool TripLeg_Edge::truck_route() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.truck_route) - return _internal_truck_route(); + if (_internal_has_truck_route()) { + return _impl_.has_truck_route_.truck_route_; + } + return false; } inline void TripLeg_Edge::_internal_set_truck_route(bool value) { - - _impl_.truck_route_ = value; + if (!_internal_has_truck_route()) { + clear_has_truck_route(); + set_has_truck_route(); + } + _impl_.has_truck_route_.truck_route_ = value; +} +inline bool TripLeg_Edge::truck_route() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.truck_route) + return _internal_truck_route(); } inline void TripLeg_Edge::set_truck_route(bool value) { _internal_set_truck_route(value); @@ -5323,20 +7769,38 @@ TripLeg_Edge::lane_connectivity() const { } // int32 mean_elevation = 40; +inline bool TripLeg_Edge::_internal_has_mean_elevation() const { + return has_mean_elevation_case() == kMeanElevation; +} +inline bool TripLeg_Edge::has_mean_elevation() const { + return _internal_has_mean_elevation(); +} +inline void TripLeg_Edge::set_has_mean_elevation() { + _impl_._oneof_case_[35] = kMeanElevation; +} inline void TripLeg_Edge::clear_mean_elevation() { - _impl_.mean_elevation_ = 0; + if (_internal_has_mean_elevation()) { + _impl_.has_mean_elevation_.mean_elevation_ = 0; + clear_has_has_mean_elevation(); + } } inline int32_t TripLeg_Edge::_internal_mean_elevation() const { - return _impl_.mean_elevation_; + if (_internal_has_mean_elevation()) { + return _impl_.has_mean_elevation_.mean_elevation_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_mean_elevation(int32_t value) { + if (!_internal_has_mean_elevation()) { + clear_has_mean_elevation(); + set_has_mean_elevation(); + } + _impl_.has_mean_elevation_.mean_elevation_ = value; } inline int32_t TripLeg_Edge::mean_elevation() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.mean_elevation) return _internal_mean_elevation(); } -inline void TripLeg_Edge::_internal_set_mean_elevation(int32_t value) { - - _impl_.mean_elevation_ = value; -} inline void TripLeg_Edge::set_mean_elevation(int32_t value) { _internal_set_mean_elevation(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.mean_elevation) @@ -5420,40 +7884,76 @@ TripLeg_Edge::turn_lanes() const { } // bool has_time_restrictions = 43; +inline bool TripLeg_Edge::_internal_has_has_time_restrictions() const { + return has_has_time_restrictions_case() == kHasTimeRestrictions; +} +inline bool TripLeg_Edge::has_has_time_restrictions() const { + return _internal_has_has_time_restrictions(); +} +inline void TripLeg_Edge::set_has_has_time_restrictions() { + _impl_._oneof_case_[36] = kHasTimeRestrictions; +} inline void TripLeg_Edge::clear_has_time_restrictions() { - _impl_.has_time_restrictions_ = false; + if (_internal_has_has_time_restrictions()) { + _impl_.has_has_time_restrictions_.has_time_restrictions_ = false; + clear_has_has_has_time_restrictions(); + } } inline bool TripLeg_Edge::_internal_has_time_restrictions() const { - return _impl_.has_time_restrictions_; + if (_internal_has_has_time_restrictions()) { + return _impl_.has_has_time_restrictions_.has_time_restrictions_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_has_time_restrictions(bool value) { + if (!_internal_has_has_time_restrictions()) { + clear_has_has_time_restrictions(); + set_has_has_time_restrictions(); + } + _impl_.has_has_time_restrictions_.has_time_restrictions_ = value; } inline bool TripLeg_Edge::has_time_restrictions() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.has_time_restrictions) return _internal_has_time_restrictions(); } -inline void TripLeg_Edge::_internal_set_has_time_restrictions(bool value) { - - _impl_.has_time_restrictions_ = value; -} inline void TripLeg_Edge::set_has_time_restrictions(bool value) { _internal_set_has_time_restrictions(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.has_time_restrictions) } // float default_speed = 44; +inline bool TripLeg_Edge::_internal_has_default_speed() const { + return has_default_speed_case() == kDefaultSpeed; +} +inline bool TripLeg_Edge::has_default_speed() const { + return _internal_has_default_speed(); +} +inline void TripLeg_Edge::set_has_default_speed() { + _impl_._oneof_case_[37] = kDefaultSpeed; +} inline void TripLeg_Edge::clear_default_speed() { - _impl_.default_speed_ = 0; + if (_internal_has_default_speed()) { + _impl_.has_default_speed_.default_speed_ = 0; + clear_has_has_default_speed(); + } } inline float TripLeg_Edge::_internal_default_speed() const { - return _impl_.default_speed_; + if (_internal_has_default_speed()) { + return _impl_.has_default_speed_.default_speed_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_default_speed(float value) { + if (!_internal_has_default_speed()) { + clear_has_default_speed(); + set_has_default_speed(); + } + _impl_.has_default_speed_.default_speed_ = value; } inline float TripLeg_Edge::default_speed() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.default_speed) return _internal_default_speed(); } -inline void TripLeg_Edge::_internal_set_default_speed(float value) { - - _impl_.default_speed_ = value; -} inline void TripLeg_Edge::set_default_speed(float value) { _internal_set_default_speed(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.default_speed) @@ -5550,260 +8050,910 @@ inline void TripLeg_Edge::set_allocated_restriction(::valhalla::TripLeg_Restrict } // bool destination_only = 46; +inline bool TripLeg_Edge::_internal_has_destination_only() const { + return has_destination_only_case() == kDestinationOnly; +} +inline bool TripLeg_Edge::has_destination_only() const { + return _internal_has_destination_only(); +} +inline void TripLeg_Edge::set_has_destination_only() { + _impl_._oneof_case_[38] = kDestinationOnly; +} inline void TripLeg_Edge::clear_destination_only() { - _impl_.destination_only_ = false; + if (_internal_has_destination_only()) { + _impl_.has_destination_only_.destination_only_ = false; + clear_has_has_destination_only(); + } } inline bool TripLeg_Edge::_internal_destination_only() const { - return _impl_.destination_only_; + if (_internal_has_destination_only()) { + return _impl_.has_destination_only_.destination_only_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_destination_only(bool value) { + if (!_internal_has_destination_only()) { + clear_has_destination_only(); + set_has_destination_only(); + } + _impl_.has_destination_only_.destination_only_ = value; +} +inline bool TripLeg_Edge::destination_only() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.destination_only) + return _internal_destination_only(); +} +inline void TripLeg_Edge::set_destination_only(bool value) { + _internal_set_destination_only(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.destination_only) +} + +// bool is_urban = 47; +inline bool TripLeg_Edge::_internal_has_is_urban() const { + return has_is_urban_case() == kIsUrban; +} +inline bool TripLeg_Edge::has_is_urban() const { + return _internal_has_is_urban(); +} +inline void TripLeg_Edge::set_has_is_urban() { + _impl_._oneof_case_[39] = kIsUrban; +} +inline void TripLeg_Edge::clear_is_urban() { + if (_internal_has_is_urban()) { + _impl_.has_is_urban_.is_urban_ = false; + clear_has_has_is_urban(); + } +} +inline bool TripLeg_Edge::_internal_is_urban() const { + if (_internal_has_is_urban()) { + return _impl_.has_is_urban_.is_urban_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_is_urban(bool value) { + if (!_internal_has_is_urban()) { + clear_has_is_urban(); + set_has_is_urban(); + } + _impl_.has_is_urban_.is_urban_ = value; +} +inline bool TripLeg_Edge::is_urban() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.is_urban) + return _internal_is_urban(); +} +inline void TripLeg_Edge::set_is_urban(bool value) { + _internal_set_is_urban(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.is_urban) +} + +// repeated .valhalla.TaggedValue tagged_value = 48; +inline int TripLeg_Edge::_internal_tagged_value_size() const { + return _impl_.tagged_value_.size(); +} +inline int TripLeg_Edge::tagged_value_size() const { + return _internal_tagged_value_size(); +} +inline ::valhalla::TaggedValue* TripLeg_Edge::mutable_tagged_value(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.TripLeg.Edge.tagged_value) + return _impl_.tagged_value_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TaggedValue >* +TripLeg_Edge::mutable_tagged_value() { + // @@protoc_insertion_point(field_mutable_list:valhalla.TripLeg.Edge.tagged_value) + return &_impl_.tagged_value_; +} +inline const ::valhalla::TaggedValue& TripLeg_Edge::_internal_tagged_value(int index) const { + return _impl_.tagged_value_.Get(index); +} +inline const ::valhalla::TaggedValue& TripLeg_Edge::tagged_value(int index) const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.tagged_value) + return _internal_tagged_value(index); +} +inline ::valhalla::TaggedValue* TripLeg_Edge::_internal_add_tagged_value() { + return _impl_.tagged_value_.Add(); +} +inline ::valhalla::TaggedValue* TripLeg_Edge::add_tagged_value() { + ::valhalla::TaggedValue* _add = _internal_add_tagged_value(); + // @@protoc_insertion_point(field_add:valhalla.TripLeg.Edge.tagged_value) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TaggedValue >& +TripLeg_Edge::tagged_value() const { + // @@protoc_insertion_point(field_list:valhalla.TripLeg.Edge.tagged_value) + return _impl_.tagged_value_; +} + +// float source_along_edge = 49; +inline bool TripLeg_Edge::_internal_has_source_along_edge() const { + return has_source_along_edge_case() == kSourceAlongEdge; +} +inline bool TripLeg_Edge::has_source_along_edge() const { + return _internal_has_source_along_edge(); +} +inline void TripLeg_Edge::set_has_source_along_edge() { + _impl_._oneof_case_[40] = kSourceAlongEdge; +} +inline void TripLeg_Edge::clear_source_along_edge() { + if (_internal_has_source_along_edge()) { + _impl_.has_source_along_edge_.source_along_edge_ = 0; + clear_has_has_source_along_edge(); + } +} +inline float TripLeg_Edge::_internal_source_along_edge() const { + if (_internal_has_source_along_edge()) { + return _impl_.has_source_along_edge_.source_along_edge_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_source_along_edge(float value) { + if (!_internal_has_source_along_edge()) { + clear_has_source_along_edge(); + set_has_source_along_edge(); + } + _impl_.has_source_along_edge_.source_along_edge_ = value; +} +inline float TripLeg_Edge::source_along_edge() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.source_along_edge) + return _internal_source_along_edge(); +} +inline void TripLeg_Edge::set_source_along_edge(float value) { + _internal_set_source_along_edge(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.source_along_edge) +} + +// float target_along_edge = 50; +inline bool TripLeg_Edge::_internal_has_target_along_edge() const { + return has_target_along_edge_case() == kTargetAlongEdge; +} +inline bool TripLeg_Edge::has_target_along_edge() const { + return _internal_has_target_along_edge(); +} +inline void TripLeg_Edge::set_has_target_along_edge() { + _impl_._oneof_case_[41] = kTargetAlongEdge; +} +inline void TripLeg_Edge::clear_target_along_edge() { + if (_internal_has_target_along_edge()) { + _impl_.has_target_along_edge_.target_along_edge_ = 0; + clear_has_has_target_along_edge(); + } +} +inline float TripLeg_Edge::_internal_target_along_edge() const { + if (_internal_has_target_along_edge()) { + return _impl_.has_target_along_edge_.target_along_edge_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_target_along_edge(float value) { + if (!_internal_has_target_along_edge()) { + clear_has_target_along_edge(); + set_has_target_along_edge(); + } + _impl_.has_target_along_edge_.target_along_edge_ = value; +} +inline float TripLeg_Edge::target_along_edge() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.target_along_edge) + return _internal_target_along_edge(); +} +inline void TripLeg_Edge::set_target_along_edge(float value) { + _internal_set_target_along_edge(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.target_along_edge) +} + +// .valhalla.TripLeg.SacScale sac_scale = 51; +inline bool TripLeg_Edge::_internal_has_sac_scale() const { + return has_sac_scale_case() == kSacScale; +} +inline bool TripLeg_Edge::has_sac_scale() const { + return _internal_has_sac_scale(); +} +inline void TripLeg_Edge::set_has_sac_scale() { + _impl_._oneof_case_[42] = kSacScale; +} +inline void TripLeg_Edge::clear_sac_scale() { + if (_internal_has_sac_scale()) { + _impl_.has_sac_scale_.sac_scale_ = 0; + clear_has_has_sac_scale(); + } +} +inline ::valhalla::TripLeg_SacScale TripLeg_Edge::_internal_sac_scale() const { + if (_internal_has_sac_scale()) { + return static_cast< ::valhalla::TripLeg_SacScale >(_impl_.has_sac_scale_.sac_scale_); + } + return static_cast< ::valhalla::TripLeg_SacScale >(0); +} +inline ::valhalla::TripLeg_SacScale TripLeg_Edge::sac_scale() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.sac_scale) + return _internal_sac_scale(); +} +inline void TripLeg_Edge::_internal_set_sac_scale(::valhalla::TripLeg_SacScale value) { + if (!_internal_has_sac_scale()) { + clear_has_sac_scale(); + set_has_sac_scale(); + } + _impl_.has_sac_scale_.sac_scale_ = value; +} +inline void TripLeg_Edge::set_sac_scale(::valhalla::TripLeg_SacScale value) { + _internal_set_sac_scale(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.sac_scale) +} + +// bool shoulder = 52; +inline bool TripLeg_Edge::_internal_has_shoulder() const { + return has_shoulder_case() == kShoulder; +} +inline bool TripLeg_Edge::has_shoulder() const { + return _internal_has_shoulder(); +} +inline void TripLeg_Edge::set_has_shoulder() { + _impl_._oneof_case_[43] = kShoulder; +} +inline void TripLeg_Edge::clear_shoulder() { + if (_internal_has_shoulder()) { + _impl_.has_shoulder_.shoulder_ = false; + clear_has_has_shoulder(); + } +} +inline bool TripLeg_Edge::_internal_shoulder() const { + if (_internal_has_shoulder()) { + return _impl_.has_shoulder_.shoulder_; + } + return false; +} +inline void TripLeg_Edge::_internal_set_shoulder(bool value) { + if (!_internal_has_shoulder()) { + clear_has_shoulder(); + set_has_shoulder(); + } + _impl_.has_shoulder_.shoulder_ = value; +} +inline bool TripLeg_Edge::shoulder() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.shoulder) + return _internal_shoulder(); +} +inline void TripLeg_Edge::set_shoulder(bool value) { + _internal_set_shoulder(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.shoulder) +} + +// float total_length_km = 53; +inline bool TripLeg_Edge::_internal_has_total_length_km() const { + return has_total_length_km_case() == kTotalLengthKm; +} +inline bool TripLeg_Edge::has_total_length_km() const { + return _internal_has_total_length_km(); +} +inline void TripLeg_Edge::set_has_total_length_km() { + _impl_._oneof_case_[44] = kTotalLengthKm; +} +inline void TripLeg_Edge::clear_total_length_km() { + if (_internal_has_total_length_km()) { + _impl_.has_total_length_km_.total_length_km_ = 0; + clear_has_has_total_length_km(); + } +} +inline float TripLeg_Edge::_internal_total_length_km() const { + if (_internal_has_total_length_km()) { + return _impl_.has_total_length_km_.total_length_km_; + } + return 0; +} +inline void TripLeg_Edge::_internal_set_total_length_km(float value) { + if (!_internal_has_total_length_km()) { + clear_has_total_length_km(); + set_has_total_length_km(); + } + _impl_.has_total_length_km_.total_length_km_ = value; +} +inline float TripLeg_Edge::total_length_km() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.total_length_km) + return _internal_total_length_km(); +} +inline void TripLeg_Edge::set_total_length_km(float value) { + _internal_set_total_length_km(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.total_length_km) +} + +// int64 shortcut_id = 54; +inline bool TripLeg_Edge::_internal_has_shortcut_id() const { + return has_shortcut_id_case() == kShortcutId; +} +inline bool TripLeg_Edge::has_shortcut_id() const { + return _internal_has_shortcut_id(); +} +inline void TripLeg_Edge::set_has_shortcut_id() { + _impl_._oneof_case_[45] = kShortcutId; +} +inline void TripLeg_Edge::clear_shortcut_id() { + if (_internal_has_shortcut_id()) { + _impl_.has_shortcut_id_.shortcut_id_ = int64_t{0}; + clear_has_has_shortcut_id(); + } +} +inline int64_t TripLeg_Edge::_internal_shortcut_id() const { + if (_internal_has_shortcut_id()) { + return _impl_.has_shortcut_id_.shortcut_id_; + } + return int64_t{0}; +} +inline void TripLeg_Edge::_internal_set_shortcut_id(int64_t value) { + if (!_internal_has_shortcut_id()) { + clear_has_shortcut_id(); + set_has_shortcut_id(); + } + _impl_.has_shortcut_id_.shortcut_id_ = value; +} +inline int64_t TripLeg_Edge::shortcut_id() const { + // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.shortcut_id) + return _internal_shortcut_id(); +} +inline void TripLeg_Edge::set_shortcut_id(int64_t value) { + _internal_set_shortcut_id(value); + // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.shortcut_id) +} + +inline bool TripLeg_Edge::has_has_length_km() const { + return has_length_km_case() != HAS_LENGTH_KM_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_length_km() { + _impl_._oneof_case_[0] = HAS_LENGTH_KM_NOT_SET; +} +inline bool TripLeg_Edge::has_has_speed() const { + return has_speed_case() != HAS_SPEED_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_speed() { + _impl_._oneof_case_[1] = HAS_SPEED_NOT_SET; +} +inline bool TripLeg_Edge::has_has_road_class() const { + return has_road_class_case() != HAS_ROAD_CLASS_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_road_class() { + _impl_._oneof_case_[2] = HAS_ROAD_CLASS_NOT_SET; +} +inline bool TripLeg_Edge::has_has_begin_heading() const { + return has_begin_heading_case() != HAS_BEGIN_HEADING_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_begin_heading() { + _impl_._oneof_case_[3] = HAS_BEGIN_HEADING_NOT_SET; +} +inline bool TripLeg_Edge::has_has_end_heading() const { + return has_end_heading_case() != HAS_END_HEADING_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_end_heading() { + _impl_._oneof_case_[4] = HAS_END_HEADING_NOT_SET; +} +inline bool TripLeg_Edge::has_has_begin_shape_index() const { + return has_begin_shape_index_case() != HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_begin_shape_index() { + _impl_._oneof_case_[5] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline bool TripLeg_Edge::has_has_end_shape_index() const { + return has_end_shape_index_case() != HAS_END_SHAPE_INDEX_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_end_shape_index() { + _impl_._oneof_case_[6] = HAS_END_SHAPE_INDEX_NOT_SET; +} +inline bool TripLeg_Edge::has_has_traversability() const { + return has_traversability_case() != HAS_TRAVERSABILITY_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_traversability() { + _impl_._oneof_case_[7] = HAS_TRAVERSABILITY_NOT_SET; +} +inline bool TripLeg_Edge::has_has_use() const { + return has_use_case() != HAS_USE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_use() { + _impl_._oneof_case_[8] = HAS_USE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_toll() const { + return has_toll_case() != HAS_TOLL_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_toll() { + _impl_._oneof_case_[9] = HAS_TOLL_NOT_SET; +} +inline bool TripLeg_Edge::has_has_unpaved() const { + return has_unpaved_case() != HAS_UNPAVED_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_unpaved() { + _impl_._oneof_case_[10] = HAS_UNPAVED_NOT_SET; +} +inline bool TripLeg_Edge::has_has_tunnel() const { + return has_tunnel_case() != HAS_TUNNEL_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_tunnel() { + _impl_._oneof_case_[11] = HAS_TUNNEL_NOT_SET; +} +inline bool TripLeg_Edge::has_has_bridge() const { + return has_bridge_case() != HAS_BRIDGE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_bridge() { + _impl_._oneof_case_[12] = HAS_BRIDGE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_roundabout() const { + return has_roundabout_case() != HAS_ROUNDABOUT_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_roundabout() { + _impl_._oneof_case_[13] = HAS_ROUNDABOUT_NOT_SET; +} +inline bool TripLeg_Edge::has_has_internal_intersection() const { + return has_internal_intersection_case() != HAS_INTERNAL_INTERSECTION_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_internal_intersection() { + _impl_._oneof_case_[14] = HAS_INTERNAL_INTERSECTION_NOT_SET; +} +inline bool TripLeg_Edge::has_has_drive_on_left() const { + return has_drive_on_left_case() != HAS_DRIVE_ON_LEFT_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_drive_on_left() { + _impl_._oneof_case_[15] = HAS_DRIVE_ON_LEFT_NOT_SET; +} +inline bool TripLeg_Edge::has_has_surface() const { + return has_surface_case() != HAS_SURFACE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_surface() { + _impl_._oneof_case_[16] = HAS_SURFACE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_travel_mode() const { + return has_travel_mode_case() != HAS_TRAVEL_MODE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_travel_mode() { + _impl_._oneof_case_[17] = HAS_TRAVEL_MODE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_vehicle_type() const { + return has_vehicle_type_case() != HAS_VEHICLE_TYPE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_vehicle_type() { + _impl_._oneof_case_[18] = HAS_VEHICLE_TYPE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_pedestrian_type() const { + return has_pedestrian_type_case() != HAS_PEDESTRIAN_TYPE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_pedestrian_type() { + _impl_._oneof_case_[19] = HAS_PEDESTRIAN_TYPE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_bicycle_type() const { + return has_bicycle_type_case() != HAS_BICYCLE_TYPE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_bicycle_type() { + _impl_._oneof_case_[20] = HAS_BICYCLE_TYPE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_transit_type() const { + return has_transit_type_case() != HAS_TRANSIT_TYPE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_transit_type() { + _impl_._oneof_case_[21] = HAS_TRANSIT_TYPE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_id() const { + return has_id_case() != HAS_ID_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_id() { + _impl_._oneof_case_[22] = HAS_ID_NOT_SET; +} +inline bool TripLeg_Edge::has_has_way_id() const { + return has_way_id_case() != HAS_WAY_ID_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_way_id() { + _impl_._oneof_case_[23] = HAS_WAY_ID_NOT_SET; +} +inline bool TripLeg_Edge::has_has_weighted_grade() const { + return has_weighted_grade_case() != HAS_WEIGHTED_GRADE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_weighted_grade() { + _impl_._oneof_case_[24] = HAS_WEIGHTED_GRADE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_max_upward_grade() const { + return has_max_upward_grade_case() != HAS_MAX_UPWARD_GRADE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_max_upward_grade() { + _impl_._oneof_case_[25] = HAS_MAX_UPWARD_GRADE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_max_downward_grade() const { + return has_max_downward_grade_case() != HAS_MAX_DOWNWARD_GRADE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_max_downward_grade() { + _impl_._oneof_case_[26] = HAS_MAX_DOWNWARD_GRADE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_lane_count() const { + return has_lane_count_case() != HAS_LANE_COUNT_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_lane_count() { + _impl_._oneof_case_[27] = HAS_LANE_COUNT_NOT_SET; +} +inline bool TripLeg_Edge::has_has_cycle_lane() const { + return has_cycle_lane_case() != HAS_CYCLE_LANE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_cycle_lane() { + _impl_._oneof_case_[28] = HAS_CYCLE_LANE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_bicycle_network() const { + return has_bicycle_network_case() != HAS_BICYCLE_NETWORK_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_bicycle_network() { + _impl_._oneof_case_[29] = HAS_BICYCLE_NETWORK_NOT_SET; +} +inline bool TripLeg_Edge::has_has_sidewalk() const { + return has_sidewalk_case() != HAS_SIDEWALK_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_sidewalk() { + _impl_._oneof_case_[30] = HAS_SIDEWALK_NOT_SET; +} +inline bool TripLeg_Edge::has_has_density() const { + return has_density_case() != HAS_DENSITY_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_density() { + _impl_._oneof_case_[31] = HAS_DENSITY_NOT_SET; +} +inline bool TripLeg_Edge::has_has_speed_limit() const { + return has_speed_limit_case() != HAS_SPEED_LIMIT_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_speed_limit() { + _impl_._oneof_case_[32] = HAS_SPEED_LIMIT_NOT_SET; +} +inline bool TripLeg_Edge::has_has_truck_speed() const { + return has_truck_speed_case() != HAS_TRUCK_SPEED_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_truck_speed() { + _impl_._oneof_case_[33] = HAS_TRUCK_SPEED_NOT_SET; +} +inline bool TripLeg_Edge::has_has_truck_route() const { + return has_truck_route_case() != HAS_TRUCK_ROUTE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_truck_route() { + _impl_._oneof_case_[34] = HAS_TRUCK_ROUTE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_mean_elevation() const { + return has_mean_elevation_case() != HAS_MEAN_ELEVATION_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_mean_elevation() { + _impl_._oneof_case_[35] = HAS_MEAN_ELEVATION_NOT_SET; +} +inline bool TripLeg_Edge::has_has_has_time_restrictions() const { + return has_has_time_restrictions_case() != HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_has_time_restrictions() { + _impl_._oneof_case_[36] = HAS_HAS_TIME_RESTRICTIONS_NOT_SET; +} +inline bool TripLeg_Edge::has_has_default_speed() const { + return has_default_speed_case() != HAS_DEFAULT_SPEED_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_default_speed() { + _impl_._oneof_case_[37] = HAS_DEFAULT_SPEED_NOT_SET; +} +inline bool TripLeg_Edge::has_has_destination_only() const { + return has_destination_only_case() != HAS_DESTINATION_ONLY_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_destination_only() { + _impl_._oneof_case_[38] = HAS_DESTINATION_ONLY_NOT_SET; +} +inline bool TripLeg_Edge::has_has_is_urban() const { + return has_is_urban_case() != HAS_IS_URBAN_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_is_urban() { + _impl_._oneof_case_[39] = HAS_IS_URBAN_NOT_SET; +} +inline bool TripLeg_Edge::has_has_source_along_edge() const { + return has_source_along_edge_case() != HAS_SOURCE_ALONG_EDGE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_source_along_edge() { + _impl_._oneof_case_[40] = HAS_SOURCE_ALONG_EDGE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_target_along_edge() const { + return has_target_along_edge_case() != HAS_TARGET_ALONG_EDGE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_target_along_edge() { + _impl_._oneof_case_[41] = HAS_TARGET_ALONG_EDGE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_sac_scale() const { + return has_sac_scale_case() != HAS_SAC_SCALE_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_sac_scale() { + _impl_._oneof_case_[42] = HAS_SAC_SCALE_NOT_SET; +} +inline bool TripLeg_Edge::has_has_shoulder() const { + return has_shoulder_case() != HAS_SHOULDER_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_shoulder() { + _impl_._oneof_case_[43] = HAS_SHOULDER_NOT_SET; +} +inline bool TripLeg_Edge::has_has_total_length_km() const { + return has_total_length_km_case() != HAS_TOTAL_LENGTH_KM_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_total_length_km() { + _impl_._oneof_case_[44] = HAS_TOTAL_LENGTH_KM_NOT_SET; +} +inline bool TripLeg_Edge::has_has_shortcut_id() const { + return has_shortcut_id_case() != HAS_SHORTCUT_ID_NOT_SET; +} +inline void TripLeg_Edge::clear_has_has_shortcut_id() { + _impl_._oneof_case_[45] = HAS_SHORTCUT_ID_NOT_SET; +} +inline TripLeg_Edge::HasLengthKmCase TripLeg_Edge::has_length_km_case() const { + return TripLeg_Edge::HasLengthKmCase(_impl_._oneof_case_[0]); +} +inline TripLeg_Edge::HasSpeedCase TripLeg_Edge::has_speed_case() const { + return TripLeg_Edge::HasSpeedCase(_impl_._oneof_case_[1]); +} +inline TripLeg_Edge::HasRoadClassCase TripLeg_Edge::has_road_class_case() const { + return TripLeg_Edge::HasRoadClassCase(_impl_._oneof_case_[2]); +} +inline TripLeg_Edge::HasBeginHeadingCase TripLeg_Edge::has_begin_heading_case() const { + return TripLeg_Edge::HasBeginHeadingCase(_impl_._oneof_case_[3]); } -inline bool TripLeg_Edge::destination_only() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.destination_only) - return _internal_destination_only(); +inline TripLeg_Edge::HasEndHeadingCase TripLeg_Edge::has_end_heading_case() const { + return TripLeg_Edge::HasEndHeadingCase(_impl_._oneof_case_[4]); } -inline void TripLeg_Edge::_internal_set_destination_only(bool value) { - - _impl_.destination_only_ = value; +inline TripLeg_Edge::HasBeginShapeIndexCase TripLeg_Edge::has_begin_shape_index_case() const { + return TripLeg_Edge::HasBeginShapeIndexCase(_impl_._oneof_case_[5]); } -inline void TripLeg_Edge::set_destination_only(bool value) { - _internal_set_destination_only(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.destination_only) +inline TripLeg_Edge::HasEndShapeIndexCase TripLeg_Edge::has_end_shape_index_case() const { + return TripLeg_Edge::HasEndShapeIndexCase(_impl_._oneof_case_[6]); } - -// bool is_urban = 47; -inline void TripLeg_Edge::clear_is_urban() { - _impl_.is_urban_ = false; +inline TripLeg_Edge::HasTraversabilityCase TripLeg_Edge::has_traversability_case() const { + return TripLeg_Edge::HasTraversabilityCase(_impl_._oneof_case_[7]); } -inline bool TripLeg_Edge::_internal_is_urban() const { - return _impl_.is_urban_; +inline TripLeg_Edge::HasUseCase TripLeg_Edge::has_use_case() const { + return TripLeg_Edge::HasUseCase(_impl_._oneof_case_[8]); } -inline bool TripLeg_Edge::is_urban() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.is_urban) - return _internal_is_urban(); +inline TripLeg_Edge::HasTollCase TripLeg_Edge::has_toll_case() const { + return TripLeg_Edge::HasTollCase(_impl_._oneof_case_[9]); } -inline void TripLeg_Edge::_internal_set_is_urban(bool value) { - - _impl_.is_urban_ = value; +inline TripLeg_Edge::HasUnpavedCase TripLeg_Edge::has_unpaved_case() const { + return TripLeg_Edge::HasUnpavedCase(_impl_._oneof_case_[10]); } -inline void TripLeg_Edge::set_is_urban(bool value) { - _internal_set_is_urban(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.is_urban) +inline TripLeg_Edge::HasTunnelCase TripLeg_Edge::has_tunnel_case() const { + return TripLeg_Edge::HasTunnelCase(_impl_._oneof_case_[11]); } - -// repeated .valhalla.TaggedValue tagged_value = 48; -inline int TripLeg_Edge::_internal_tagged_value_size() const { - return _impl_.tagged_value_.size(); +inline TripLeg_Edge::HasBridgeCase TripLeg_Edge::has_bridge_case() const { + return TripLeg_Edge::HasBridgeCase(_impl_._oneof_case_[12]); } -inline int TripLeg_Edge::tagged_value_size() const { - return _internal_tagged_value_size(); +inline TripLeg_Edge::HasRoundaboutCase TripLeg_Edge::has_roundabout_case() const { + return TripLeg_Edge::HasRoundaboutCase(_impl_._oneof_case_[13]); } -inline ::valhalla::TaggedValue* TripLeg_Edge::mutable_tagged_value(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.TripLeg.Edge.tagged_value) - return _impl_.tagged_value_.Mutable(index); +inline TripLeg_Edge::HasInternalIntersectionCase TripLeg_Edge::has_internal_intersection_case() const { + return TripLeg_Edge::HasInternalIntersectionCase(_impl_._oneof_case_[14]); } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TaggedValue >* -TripLeg_Edge::mutable_tagged_value() { - // @@protoc_insertion_point(field_mutable_list:valhalla.TripLeg.Edge.tagged_value) - return &_impl_.tagged_value_; +inline TripLeg_Edge::HasDriveOnLeftCase TripLeg_Edge::has_drive_on_left_case() const { + return TripLeg_Edge::HasDriveOnLeftCase(_impl_._oneof_case_[15]); } -inline const ::valhalla::TaggedValue& TripLeg_Edge::_internal_tagged_value(int index) const { - return _impl_.tagged_value_.Get(index); +inline TripLeg_Edge::HasSurfaceCase TripLeg_Edge::has_surface_case() const { + return TripLeg_Edge::HasSurfaceCase(_impl_._oneof_case_[16]); } -inline const ::valhalla::TaggedValue& TripLeg_Edge::tagged_value(int index) const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.tagged_value) - return _internal_tagged_value(index); +inline TripLeg_Edge::HasTravelModeCase TripLeg_Edge::has_travel_mode_case() const { + return TripLeg_Edge::HasTravelModeCase(_impl_._oneof_case_[17]); } -inline ::valhalla::TaggedValue* TripLeg_Edge::_internal_add_tagged_value() { - return _impl_.tagged_value_.Add(); +inline TripLeg_Edge::HasVehicleTypeCase TripLeg_Edge::has_vehicle_type_case() const { + return TripLeg_Edge::HasVehicleTypeCase(_impl_._oneof_case_[18]); } -inline ::valhalla::TaggedValue* TripLeg_Edge::add_tagged_value() { - ::valhalla::TaggedValue* _add = _internal_add_tagged_value(); - // @@protoc_insertion_point(field_add:valhalla.TripLeg.Edge.tagged_value) - return _add; +inline TripLeg_Edge::HasPedestrianTypeCase TripLeg_Edge::has_pedestrian_type_case() const { + return TripLeg_Edge::HasPedestrianTypeCase(_impl_._oneof_case_[19]); } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TaggedValue >& -TripLeg_Edge::tagged_value() const { - // @@protoc_insertion_point(field_list:valhalla.TripLeg.Edge.tagged_value) - return _impl_.tagged_value_; +inline TripLeg_Edge::HasBicycleTypeCase TripLeg_Edge::has_bicycle_type_case() const { + return TripLeg_Edge::HasBicycleTypeCase(_impl_._oneof_case_[20]); } - -// float source_along_edge = 49; -inline void TripLeg_Edge::clear_source_along_edge() { - _impl_.source_along_edge_ = 0; +inline TripLeg_Edge::HasTransitTypeCase TripLeg_Edge::has_transit_type_case() const { + return TripLeg_Edge::HasTransitTypeCase(_impl_._oneof_case_[21]); } -inline float TripLeg_Edge::_internal_source_along_edge() const { - return _impl_.source_along_edge_; +inline TripLeg_Edge::HasIdCase TripLeg_Edge::has_id_case() const { + return TripLeg_Edge::HasIdCase(_impl_._oneof_case_[22]); } -inline float TripLeg_Edge::source_along_edge() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.source_along_edge) - return _internal_source_along_edge(); +inline TripLeg_Edge::HasWayIdCase TripLeg_Edge::has_way_id_case() const { + return TripLeg_Edge::HasWayIdCase(_impl_._oneof_case_[23]); } -inline void TripLeg_Edge::_internal_set_source_along_edge(float value) { - - _impl_.source_along_edge_ = value; +inline TripLeg_Edge::HasWeightedGradeCase TripLeg_Edge::has_weighted_grade_case() const { + return TripLeg_Edge::HasWeightedGradeCase(_impl_._oneof_case_[24]); } -inline void TripLeg_Edge::set_source_along_edge(float value) { - _internal_set_source_along_edge(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.source_along_edge) +inline TripLeg_Edge::HasMaxUpwardGradeCase TripLeg_Edge::has_max_upward_grade_case() const { + return TripLeg_Edge::HasMaxUpwardGradeCase(_impl_._oneof_case_[25]); } - -// float target_along_edge = 50; -inline void TripLeg_Edge::clear_target_along_edge() { - _impl_.target_along_edge_ = 0; +inline TripLeg_Edge::HasMaxDownwardGradeCase TripLeg_Edge::has_max_downward_grade_case() const { + return TripLeg_Edge::HasMaxDownwardGradeCase(_impl_._oneof_case_[26]); } -inline float TripLeg_Edge::_internal_target_along_edge() const { - return _impl_.target_along_edge_; +inline TripLeg_Edge::HasLaneCountCase TripLeg_Edge::has_lane_count_case() const { + return TripLeg_Edge::HasLaneCountCase(_impl_._oneof_case_[27]); } -inline float TripLeg_Edge::target_along_edge() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.target_along_edge) - return _internal_target_along_edge(); +inline TripLeg_Edge::HasCycleLaneCase TripLeg_Edge::has_cycle_lane_case() const { + return TripLeg_Edge::HasCycleLaneCase(_impl_._oneof_case_[28]); } -inline void TripLeg_Edge::_internal_set_target_along_edge(float value) { - - _impl_.target_along_edge_ = value; +inline TripLeg_Edge::HasBicycleNetworkCase TripLeg_Edge::has_bicycle_network_case() const { + return TripLeg_Edge::HasBicycleNetworkCase(_impl_._oneof_case_[29]); } -inline void TripLeg_Edge::set_target_along_edge(float value) { - _internal_set_target_along_edge(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.target_along_edge) +inline TripLeg_Edge::HasSidewalkCase TripLeg_Edge::has_sidewalk_case() const { + return TripLeg_Edge::HasSidewalkCase(_impl_._oneof_case_[30]); } - -// .valhalla.TripLeg.SacScale sac_scale = 51; -inline void TripLeg_Edge::clear_sac_scale() { - _impl_.sac_scale_ = 0; +inline TripLeg_Edge::HasDensityCase TripLeg_Edge::has_density_case() const { + return TripLeg_Edge::HasDensityCase(_impl_._oneof_case_[31]); } -inline ::valhalla::TripLeg_SacScale TripLeg_Edge::_internal_sac_scale() const { - return static_cast< ::valhalla::TripLeg_SacScale >(_impl_.sac_scale_); +inline TripLeg_Edge::HasSpeedLimitCase TripLeg_Edge::has_speed_limit_case() const { + return TripLeg_Edge::HasSpeedLimitCase(_impl_._oneof_case_[32]); } -inline ::valhalla::TripLeg_SacScale TripLeg_Edge::sac_scale() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.sac_scale) - return _internal_sac_scale(); +inline TripLeg_Edge::HasTruckSpeedCase TripLeg_Edge::has_truck_speed_case() const { + return TripLeg_Edge::HasTruckSpeedCase(_impl_._oneof_case_[33]); } -inline void TripLeg_Edge::_internal_set_sac_scale(::valhalla::TripLeg_SacScale value) { - - _impl_.sac_scale_ = value; +inline TripLeg_Edge::HasTruckRouteCase TripLeg_Edge::has_truck_route_case() const { + return TripLeg_Edge::HasTruckRouteCase(_impl_._oneof_case_[34]); } -inline void TripLeg_Edge::set_sac_scale(::valhalla::TripLeg_SacScale value) { - _internal_set_sac_scale(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.sac_scale) +inline TripLeg_Edge::HasMeanElevationCase TripLeg_Edge::has_mean_elevation_case() const { + return TripLeg_Edge::HasMeanElevationCase(_impl_._oneof_case_[35]); } - -// bool shoulder = 52; -inline void TripLeg_Edge::clear_shoulder() { - _impl_.shoulder_ = false; +inline TripLeg_Edge::HasHasTimeRestrictionsCase TripLeg_Edge::has_has_time_restrictions_case() const { + return TripLeg_Edge::HasHasTimeRestrictionsCase(_impl_._oneof_case_[36]); } -inline bool TripLeg_Edge::_internal_shoulder() const { - return _impl_.shoulder_; +inline TripLeg_Edge::HasDefaultSpeedCase TripLeg_Edge::has_default_speed_case() const { + return TripLeg_Edge::HasDefaultSpeedCase(_impl_._oneof_case_[37]); } -inline bool TripLeg_Edge::shoulder() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.shoulder) - return _internal_shoulder(); +inline TripLeg_Edge::HasDestinationOnlyCase TripLeg_Edge::has_destination_only_case() const { + return TripLeg_Edge::HasDestinationOnlyCase(_impl_._oneof_case_[38]); } -inline void TripLeg_Edge::_internal_set_shoulder(bool value) { - - _impl_.shoulder_ = value; +inline TripLeg_Edge::HasIsUrbanCase TripLeg_Edge::has_is_urban_case() const { + return TripLeg_Edge::HasIsUrbanCase(_impl_._oneof_case_[39]); } -inline void TripLeg_Edge::set_shoulder(bool value) { - _internal_set_shoulder(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.shoulder) +inline TripLeg_Edge::HasSourceAlongEdgeCase TripLeg_Edge::has_source_along_edge_case() const { + return TripLeg_Edge::HasSourceAlongEdgeCase(_impl_._oneof_case_[40]); } - -// bool indoor = 53; -inline void TripLeg_Edge::clear_indoor() { - _impl_.indoor_ = false; +inline TripLeg_Edge::HasTargetAlongEdgeCase TripLeg_Edge::has_target_along_edge_case() const { + return TripLeg_Edge::HasTargetAlongEdgeCase(_impl_._oneof_case_[41]); } -inline bool TripLeg_Edge::_internal_indoor() const { - return _impl_.indoor_; +inline TripLeg_Edge::HasSacScaleCase TripLeg_Edge::has_sac_scale_case() const { + return TripLeg_Edge::HasSacScaleCase(_impl_._oneof_case_[42]); } -inline bool TripLeg_Edge::indoor() const { - // @@protoc_insertion_point(field_get:valhalla.TripLeg.Edge.indoor) - return _internal_indoor(); +inline TripLeg_Edge::HasShoulderCase TripLeg_Edge::has_shoulder_case() const { + return TripLeg_Edge::HasShoulderCase(_impl_._oneof_case_[43]); } -inline void TripLeg_Edge::_internal_set_indoor(bool value) { - - _impl_.indoor_ = value; +inline TripLeg_Edge::HasTotalLengthKmCase TripLeg_Edge::has_total_length_km_case() const { + return TripLeg_Edge::HasTotalLengthKmCase(_impl_._oneof_case_[44]); } -inline void TripLeg_Edge::set_indoor(bool value) { - _internal_set_indoor(value); - // @@protoc_insertion_point(field_set:valhalla.TripLeg.Edge.indoor) +inline TripLeg_Edge::HasShortcutIdCase TripLeg_Edge::has_shortcut_id_case() const { + return TripLeg_Edge::HasShortcutIdCase(_impl_._oneof_case_[45]); } - // ------------------------------------------------------------------- // TripLeg_IntersectingEdge // uint32 begin_heading = 1; +inline bool TripLeg_IntersectingEdge::_internal_has_begin_heading() const { + return has_begin_heading_case() == kBeginHeading; +} +inline bool TripLeg_IntersectingEdge::has_begin_heading() const { + return _internal_has_begin_heading(); +} +inline void TripLeg_IntersectingEdge::set_has_begin_heading() { + _impl_._oneof_case_[0] = kBeginHeading; +} inline void TripLeg_IntersectingEdge::clear_begin_heading() { - _impl_.begin_heading_ = 0u; + if (_internal_has_begin_heading()) { + _impl_.has_begin_heading_.begin_heading_ = 0u; + clear_has_has_begin_heading(); + } } inline uint32_t TripLeg_IntersectingEdge::_internal_begin_heading() const { - return _impl_.begin_heading_; + if (_internal_has_begin_heading()) { + return _impl_.has_begin_heading_.begin_heading_; + } + return 0u; +} +inline void TripLeg_IntersectingEdge::_internal_set_begin_heading(uint32_t value) { + if (!_internal_has_begin_heading()) { + clear_has_begin_heading(); + set_has_begin_heading(); + } + _impl_.has_begin_heading_.begin_heading_ = value; } inline uint32_t TripLeg_IntersectingEdge::begin_heading() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.begin_heading) return _internal_begin_heading(); } -inline void TripLeg_IntersectingEdge::_internal_set_begin_heading(uint32_t value) { - - _impl_.begin_heading_ = value; -} inline void TripLeg_IntersectingEdge::set_begin_heading(uint32_t value) { _internal_set_begin_heading(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.IntersectingEdge.begin_heading) } // bool prev_name_consistency = 2; +inline bool TripLeg_IntersectingEdge::_internal_has_prev_name_consistency() const { + return has_prev_name_consistency_case() == kPrevNameConsistency; +} +inline bool TripLeg_IntersectingEdge::has_prev_name_consistency() const { + return _internal_has_prev_name_consistency(); +} +inline void TripLeg_IntersectingEdge::set_has_prev_name_consistency() { + _impl_._oneof_case_[1] = kPrevNameConsistency; +} inline void TripLeg_IntersectingEdge::clear_prev_name_consistency() { - _impl_.prev_name_consistency_ = false; + if (_internal_has_prev_name_consistency()) { + _impl_.has_prev_name_consistency_.prev_name_consistency_ = false; + clear_has_has_prev_name_consistency(); + } } inline bool TripLeg_IntersectingEdge::_internal_prev_name_consistency() const { - return _impl_.prev_name_consistency_; + if (_internal_has_prev_name_consistency()) { + return _impl_.has_prev_name_consistency_.prev_name_consistency_; + } + return false; +} +inline void TripLeg_IntersectingEdge::_internal_set_prev_name_consistency(bool value) { + if (!_internal_has_prev_name_consistency()) { + clear_has_prev_name_consistency(); + set_has_prev_name_consistency(); + } + _impl_.has_prev_name_consistency_.prev_name_consistency_ = value; } inline bool TripLeg_IntersectingEdge::prev_name_consistency() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.prev_name_consistency) return _internal_prev_name_consistency(); } -inline void TripLeg_IntersectingEdge::_internal_set_prev_name_consistency(bool value) { - - _impl_.prev_name_consistency_ = value; -} inline void TripLeg_IntersectingEdge::set_prev_name_consistency(bool value) { _internal_set_prev_name_consistency(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.IntersectingEdge.prev_name_consistency) } // bool curr_name_consistency = 3; +inline bool TripLeg_IntersectingEdge::_internal_has_curr_name_consistency() const { + return has_curr_name_consistency_case() == kCurrNameConsistency; +} +inline bool TripLeg_IntersectingEdge::has_curr_name_consistency() const { + return _internal_has_curr_name_consistency(); +} +inline void TripLeg_IntersectingEdge::set_has_curr_name_consistency() { + _impl_._oneof_case_[2] = kCurrNameConsistency; +} inline void TripLeg_IntersectingEdge::clear_curr_name_consistency() { - _impl_.curr_name_consistency_ = false; + if (_internal_has_curr_name_consistency()) { + _impl_.has_curr_name_consistency_.curr_name_consistency_ = false; + clear_has_has_curr_name_consistency(); + } } inline bool TripLeg_IntersectingEdge::_internal_curr_name_consistency() const { - return _impl_.curr_name_consistency_; + if (_internal_has_curr_name_consistency()) { + return _impl_.has_curr_name_consistency_.curr_name_consistency_; + } + return false; +} +inline void TripLeg_IntersectingEdge::_internal_set_curr_name_consistency(bool value) { + if (!_internal_has_curr_name_consistency()) { + clear_has_curr_name_consistency(); + set_has_curr_name_consistency(); + } + _impl_.has_curr_name_consistency_.curr_name_consistency_ = value; } inline bool TripLeg_IntersectingEdge::curr_name_consistency() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.curr_name_consistency) return _internal_curr_name_consistency(); } -inline void TripLeg_IntersectingEdge::_internal_set_curr_name_consistency(bool value) { - - _impl_.curr_name_consistency_ = value; -} inline void TripLeg_IntersectingEdge::set_curr_name_consistency(bool value) { _internal_set_curr_name_consistency(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.IntersectingEdge.curr_name_consistency) } // .valhalla.TripLeg.Traversability driveability = 4; +inline bool TripLeg_IntersectingEdge::_internal_has_driveability() const { + return has_driveability_case() == kDriveability; +} +inline bool TripLeg_IntersectingEdge::has_driveability() const { + return _internal_has_driveability(); +} +inline void TripLeg_IntersectingEdge::set_has_driveability() { + _impl_._oneof_case_[3] = kDriveability; +} inline void TripLeg_IntersectingEdge::clear_driveability() { - _impl_.driveability_ = 0; + if (_internal_has_driveability()) { + _impl_.has_driveability_.driveability_ = 0; + clear_has_has_driveability(); + } } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::_internal_driveability() const { - return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.driveability_); + if (_internal_has_driveability()) { + return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.has_driveability_.driveability_); + } + return static_cast< ::valhalla::TripLeg_Traversability >(0); } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::driveability() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.driveability) return _internal_driveability(); } inline void TripLeg_IntersectingEdge::_internal_set_driveability(::valhalla::TripLeg_Traversability value) { - - _impl_.driveability_ = value; + if (!_internal_has_driveability()) { + clear_has_driveability(); + set_has_driveability(); + } + _impl_.has_driveability_.driveability_ = value; } inline void TripLeg_IntersectingEdge::set_driveability(::valhalla::TripLeg_Traversability value) { _internal_set_driveability(value); @@ -5811,19 +8961,37 @@ inline void TripLeg_IntersectingEdge::set_driveability(::valhalla::TripLeg_Trave } // .valhalla.TripLeg.Traversability cyclability = 5; +inline bool TripLeg_IntersectingEdge::_internal_has_cyclability() const { + return has_cyclability_case() == kCyclability; +} +inline bool TripLeg_IntersectingEdge::has_cyclability() const { + return _internal_has_cyclability(); +} +inline void TripLeg_IntersectingEdge::set_has_cyclability() { + _impl_._oneof_case_[4] = kCyclability; +} inline void TripLeg_IntersectingEdge::clear_cyclability() { - _impl_.cyclability_ = 0; + if (_internal_has_cyclability()) { + _impl_.has_cyclability_.cyclability_ = 0; + clear_has_has_cyclability(); + } } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::_internal_cyclability() const { - return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.cyclability_); + if (_internal_has_cyclability()) { + return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.has_cyclability_.cyclability_); + } + return static_cast< ::valhalla::TripLeg_Traversability >(0); } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::cyclability() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.cyclability) return _internal_cyclability(); } inline void TripLeg_IntersectingEdge::_internal_set_cyclability(::valhalla::TripLeg_Traversability value) { - - _impl_.cyclability_ = value; + if (!_internal_has_cyclability()) { + clear_has_cyclability(); + set_has_cyclability(); + } + _impl_.has_cyclability_.cyclability_ = value; } inline void TripLeg_IntersectingEdge::set_cyclability(::valhalla::TripLeg_Traversability value) { _internal_set_cyclability(value); @@ -5831,19 +8999,37 @@ inline void TripLeg_IntersectingEdge::set_cyclability(::valhalla::TripLeg_Traver } // .valhalla.TripLeg.Traversability walkability = 6; +inline bool TripLeg_IntersectingEdge::_internal_has_walkability() const { + return has_walkability_case() == kWalkability; +} +inline bool TripLeg_IntersectingEdge::has_walkability() const { + return _internal_has_walkability(); +} +inline void TripLeg_IntersectingEdge::set_has_walkability() { + _impl_._oneof_case_[5] = kWalkability; +} inline void TripLeg_IntersectingEdge::clear_walkability() { - _impl_.walkability_ = 0; + if (_internal_has_walkability()) { + _impl_.has_walkability_.walkability_ = 0; + clear_has_has_walkability(); + } } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::_internal_walkability() const { - return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.walkability_); + if (_internal_has_walkability()) { + return static_cast< ::valhalla::TripLeg_Traversability >(_impl_.has_walkability_.walkability_); + } + return static_cast< ::valhalla::TripLeg_Traversability >(0); } inline ::valhalla::TripLeg_Traversability TripLeg_IntersectingEdge::walkability() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.walkability) return _internal_walkability(); } inline void TripLeg_IntersectingEdge::_internal_set_walkability(::valhalla::TripLeg_Traversability value) { - - _impl_.walkability_ = value; + if (!_internal_has_walkability()) { + clear_has_walkability(); + set_has_walkability(); + } + _impl_.has_walkability_.walkability_ = value; } inline void TripLeg_IntersectingEdge::set_walkability(::valhalla::TripLeg_Traversability value) { _internal_set_walkability(value); @@ -5851,19 +9037,37 @@ inline void TripLeg_IntersectingEdge::set_walkability(::valhalla::TripLeg_Traver } // .valhalla.TripLeg.Use use = 7; +inline bool TripLeg_IntersectingEdge::_internal_has_use() const { + return has_use_case() == kUse; +} +inline bool TripLeg_IntersectingEdge::has_use() const { + return _internal_has_use(); +} +inline void TripLeg_IntersectingEdge::set_has_use() { + _impl_._oneof_case_[6] = kUse; +} inline void TripLeg_IntersectingEdge::clear_use() { - _impl_.use_ = 0; + if (_internal_has_use()) { + _impl_.has_use_.use_ = 0; + clear_has_has_use(); + } } inline ::valhalla::TripLeg_Use TripLeg_IntersectingEdge::_internal_use() const { - return static_cast< ::valhalla::TripLeg_Use >(_impl_.use_); + if (_internal_has_use()) { + return static_cast< ::valhalla::TripLeg_Use >(_impl_.has_use_.use_); + } + return static_cast< ::valhalla::TripLeg_Use >(0); } inline ::valhalla::TripLeg_Use TripLeg_IntersectingEdge::use() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.use) return _internal_use(); } inline void TripLeg_IntersectingEdge::_internal_set_use(::valhalla::TripLeg_Use value) { - - _impl_.use_ = value; + if (!_internal_has_use()) { + clear_has_use(); + set_has_use(); + } + _impl_.has_use_.use_ = value; } inline void TripLeg_IntersectingEdge::set_use(::valhalla::TripLeg_Use value) { _internal_set_use(value); @@ -5871,19 +9075,37 @@ inline void TripLeg_IntersectingEdge::set_use(::valhalla::TripLeg_Use value) { } // .valhalla.RoadClass road_class = 8; +inline bool TripLeg_IntersectingEdge::_internal_has_road_class() const { + return has_road_class_case() == kRoadClass; +} +inline bool TripLeg_IntersectingEdge::has_road_class() const { + return _internal_has_road_class(); +} +inline void TripLeg_IntersectingEdge::set_has_road_class() { + _impl_._oneof_case_[7] = kRoadClass; +} inline void TripLeg_IntersectingEdge::clear_road_class() { - _impl_.road_class_ = 0; + if (_internal_has_road_class()) { + _impl_.has_road_class_.road_class_ = 0; + clear_has_has_road_class(); + } } inline ::valhalla::RoadClass TripLeg_IntersectingEdge::_internal_road_class() const { - return static_cast< ::valhalla::RoadClass >(_impl_.road_class_); + if (_internal_has_road_class()) { + return static_cast< ::valhalla::RoadClass >(_impl_.has_road_class_.road_class_); + } + return static_cast< ::valhalla::RoadClass >(0); } inline ::valhalla::RoadClass TripLeg_IntersectingEdge::road_class() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.road_class) return _internal_road_class(); } inline void TripLeg_IntersectingEdge::_internal_set_road_class(::valhalla::RoadClass value) { - - _impl_.road_class_ = value; + if (!_internal_has_road_class()) { + clear_has_road_class(); + set_has_road_class(); + } + _impl_.has_road_class_.road_class_ = value; } inline void TripLeg_IntersectingEdge::set_road_class(::valhalla::RoadClass value) { _internal_set_road_class(value); @@ -5891,20 +9113,38 @@ inline void TripLeg_IntersectingEdge::set_road_class(::valhalla::RoadClass value } // uint32 lane_count = 9; +inline bool TripLeg_IntersectingEdge::_internal_has_lane_count() const { + return has_lane_count_case() == kLaneCount; +} +inline bool TripLeg_IntersectingEdge::has_lane_count() const { + return _internal_has_lane_count(); +} +inline void TripLeg_IntersectingEdge::set_has_lane_count() { + _impl_._oneof_case_[8] = kLaneCount; +} inline void TripLeg_IntersectingEdge::clear_lane_count() { - _impl_.lane_count_ = 0u; + if (_internal_has_lane_count()) { + _impl_.has_lane_count_.lane_count_ = 0u; + clear_has_has_lane_count(); + } } inline uint32_t TripLeg_IntersectingEdge::_internal_lane_count() const { - return _impl_.lane_count_; + if (_internal_has_lane_count()) { + return _impl_.has_lane_count_.lane_count_; + } + return 0u; +} +inline void TripLeg_IntersectingEdge::_internal_set_lane_count(uint32_t value) { + if (!_internal_has_lane_count()) { + clear_has_lane_count(); + set_has_lane_count(); + } + _impl_.has_lane_count_.lane_count_ = value; } inline uint32_t TripLeg_IntersectingEdge::lane_count() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.IntersectingEdge.lane_count) return _internal_lane_count(); } -inline void TripLeg_IntersectingEdge::_internal_set_lane_count(uint32_t value) { - - _impl_.lane_count_ = value; -} inline void TripLeg_IntersectingEdge::set_lane_count(uint32_t value) { _internal_set_lane_count(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.IntersectingEdge.lane_count) @@ -5995,50 +9235,185 @@ inline void TripLeg_IntersectingEdge::set_allocated_sign(::valhalla::TripSign* s // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.IntersectingEdge.sign) } +inline bool TripLeg_IntersectingEdge::has_has_begin_heading() const { + return has_begin_heading_case() != HAS_BEGIN_HEADING_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_begin_heading() { + _impl_._oneof_case_[0] = HAS_BEGIN_HEADING_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_prev_name_consistency() const { + return has_prev_name_consistency_case() != HAS_PREV_NAME_CONSISTENCY_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_prev_name_consistency() { + _impl_._oneof_case_[1] = HAS_PREV_NAME_CONSISTENCY_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_curr_name_consistency() const { + return has_curr_name_consistency_case() != HAS_CURR_NAME_CONSISTENCY_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_curr_name_consistency() { + _impl_._oneof_case_[2] = HAS_CURR_NAME_CONSISTENCY_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_driveability() const { + return has_driveability_case() != HAS_DRIVEABILITY_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_driveability() { + _impl_._oneof_case_[3] = HAS_DRIVEABILITY_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_cyclability() const { + return has_cyclability_case() != HAS_CYCLABILITY_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_cyclability() { + _impl_._oneof_case_[4] = HAS_CYCLABILITY_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_walkability() const { + return has_walkability_case() != HAS_WALKABILITY_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_walkability() { + _impl_._oneof_case_[5] = HAS_WALKABILITY_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_use() const { + return has_use_case() != HAS_USE_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_use() { + _impl_._oneof_case_[6] = HAS_USE_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_road_class() const { + return has_road_class_case() != HAS_ROAD_CLASS_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_road_class() { + _impl_._oneof_case_[7] = HAS_ROAD_CLASS_NOT_SET; +} +inline bool TripLeg_IntersectingEdge::has_has_lane_count() const { + return has_lane_count_case() != HAS_LANE_COUNT_NOT_SET; +} +inline void TripLeg_IntersectingEdge::clear_has_has_lane_count() { + _impl_._oneof_case_[8] = HAS_LANE_COUNT_NOT_SET; +} +inline TripLeg_IntersectingEdge::HasBeginHeadingCase TripLeg_IntersectingEdge::has_begin_heading_case() const { + return TripLeg_IntersectingEdge::HasBeginHeadingCase(_impl_._oneof_case_[0]); +} +inline TripLeg_IntersectingEdge::HasPrevNameConsistencyCase TripLeg_IntersectingEdge::has_prev_name_consistency_case() const { + return TripLeg_IntersectingEdge::HasPrevNameConsistencyCase(_impl_._oneof_case_[1]); +} +inline TripLeg_IntersectingEdge::HasCurrNameConsistencyCase TripLeg_IntersectingEdge::has_curr_name_consistency_case() const { + return TripLeg_IntersectingEdge::HasCurrNameConsistencyCase(_impl_._oneof_case_[2]); +} +inline TripLeg_IntersectingEdge::HasDriveabilityCase TripLeg_IntersectingEdge::has_driveability_case() const { + return TripLeg_IntersectingEdge::HasDriveabilityCase(_impl_._oneof_case_[3]); +} +inline TripLeg_IntersectingEdge::HasCyclabilityCase TripLeg_IntersectingEdge::has_cyclability_case() const { + return TripLeg_IntersectingEdge::HasCyclabilityCase(_impl_._oneof_case_[4]); +} +inline TripLeg_IntersectingEdge::HasWalkabilityCase TripLeg_IntersectingEdge::has_walkability_case() const { + return TripLeg_IntersectingEdge::HasWalkabilityCase(_impl_._oneof_case_[5]); +} +inline TripLeg_IntersectingEdge::HasUseCase TripLeg_IntersectingEdge::has_use_case() const { + return TripLeg_IntersectingEdge::HasUseCase(_impl_._oneof_case_[6]); +} +inline TripLeg_IntersectingEdge::HasRoadClassCase TripLeg_IntersectingEdge::has_road_class_case() const { + return TripLeg_IntersectingEdge::HasRoadClassCase(_impl_._oneof_case_[7]); +} +inline TripLeg_IntersectingEdge::HasLaneCountCase TripLeg_IntersectingEdge::has_lane_count_case() const { + return TripLeg_IntersectingEdge::HasLaneCountCase(_impl_._oneof_case_[8]); +} // ------------------------------------------------------------------- // TripLeg_Cost // double seconds = 1; +inline bool TripLeg_Cost::_internal_has_seconds() const { + return has_seconds_case() == kSeconds; +} +inline bool TripLeg_Cost::has_seconds() const { + return _internal_has_seconds(); +} +inline void TripLeg_Cost::set_has_seconds() { + _impl_._oneof_case_[0] = kSeconds; +} inline void TripLeg_Cost::clear_seconds() { - _impl_.seconds_ = 0; + if (_internal_has_seconds()) { + _impl_.has_seconds_.seconds_ = 0; + clear_has_has_seconds(); + } } inline double TripLeg_Cost::_internal_seconds() const { - return _impl_.seconds_; + if (_internal_has_seconds()) { + return _impl_.has_seconds_.seconds_; + } + return 0; +} +inline void TripLeg_Cost::_internal_set_seconds(double value) { + if (!_internal_has_seconds()) { + clear_has_seconds(); + set_has_seconds(); + } + _impl_.has_seconds_.seconds_ = value; } inline double TripLeg_Cost::seconds() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Cost.seconds) return _internal_seconds(); } -inline void TripLeg_Cost::_internal_set_seconds(double value) { - - _impl_.seconds_ = value; -} inline void TripLeg_Cost::set_seconds(double value) { _internal_set_seconds(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Cost.seconds) } // double cost = 2; +inline bool TripLeg_Cost::_internal_has_cost() const { + return has_cost_case() == kCost; +} +inline bool TripLeg_Cost::has_cost() const { + return _internal_has_cost(); +} +inline void TripLeg_Cost::set_has_cost() { + _impl_._oneof_case_[1] = kCost; +} inline void TripLeg_Cost::clear_cost() { - _impl_.cost_ = 0; + if (_internal_has_cost()) { + _impl_.has_cost_.cost_ = 0; + clear_has_has_cost(); + } } inline double TripLeg_Cost::_internal_cost() const { - return _impl_.cost_; + if (_internal_has_cost()) { + return _impl_.has_cost_.cost_; + } + return 0; +} +inline void TripLeg_Cost::_internal_set_cost(double value) { + if (!_internal_has_cost()) { + clear_has_cost(); + set_has_cost(); + } + _impl_.has_cost_.cost_ = value; } inline double TripLeg_Cost::cost() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Cost.cost) return _internal_cost(); } -inline void TripLeg_Cost::_internal_set_cost(double value) { - - _impl_.cost_ = value; -} inline void TripLeg_Cost::set_cost(double value) { _internal_set_cost(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Cost.cost) } +inline bool TripLeg_Cost::has_has_seconds() const { + return has_seconds_case() != HAS_SECONDS_NOT_SET; +} +inline void TripLeg_Cost::clear_has_has_seconds() { + _impl_._oneof_case_[0] = HAS_SECONDS_NOT_SET; +} +inline bool TripLeg_Cost::has_has_cost() const { + return has_cost_case() != HAS_COST_NOT_SET; +} +inline void TripLeg_Cost::clear_has_has_cost() { + _impl_._oneof_case_[1] = HAS_COST_NOT_SET; +} +inline TripLeg_Cost::HasSecondsCase TripLeg_Cost::has_seconds_case() const { + return TripLeg_Cost::HasSecondsCase(_impl_._oneof_case_[0]); +} +inline TripLeg_Cost::HasCostCase TripLeg_Cost::has_cost_case() const { + return TripLeg_Cost::HasCostCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // TripLeg_PathCost @@ -6358,39 +9733,75 @@ TripLeg_Node::intersecting_edge() const { } // uint32 admin_index = 3; +inline bool TripLeg_Node::_internal_has_admin_index() const { + return has_admin_index_case() == kAdminIndex; +} +inline bool TripLeg_Node::has_admin_index() const { + return _internal_has_admin_index(); +} +inline void TripLeg_Node::set_has_admin_index() { + _impl_._oneof_case_[0] = kAdminIndex; +} inline void TripLeg_Node::clear_admin_index() { - _impl_.admin_index_ = 0u; + if (_internal_has_admin_index()) { + _impl_.has_admin_index_.admin_index_ = 0u; + clear_has_has_admin_index(); + } } inline uint32_t TripLeg_Node::_internal_admin_index() const { - return _impl_.admin_index_; + if (_internal_has_admin_index()) { + return _impl_.has_admin_index_.admin_index_; + } + return 0u; +} +inline void TripLeg_Node::_internal_set_admin_index(uint32_t value) { + if (!_internal_has_admin_index()) { + clear_has_admin_index(); + set_has_admin_index(); + } + _impl_.has_admin_index_.admin_index_ = value; } inline uint32_t TripLeg_Node::admin_index() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Node.admin_index) return _internal_admin_index(); } -inline void TripLeg_Node::_internal_set_admin_index(uint32_t value) { - - _impl_.admin_index_ = value; -} inline void TripLeg_Node::set_admin_index(uint32_t value) { _internal_set_admin_index(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Node.admin_index) } // .valhalla.TripLeg.Node.Type type = 4; +inline bool TripLeg_Node::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool TripLeg_Node::has_type() const { + return _internal_has_type(); +} +inline void TripLeg_Node::set_has_type() { + _impl_._oneof_case_[1] = kType; +} inline void TripLeg_Node::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::TripLeg_Node_Type TripLeg_Node::_internal_type() const { - return static_cast< ::valhalla::TripLeg_Node_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::TripLeg_Node_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::TripLeg_Node_Type >(0); } inline ::valhalla::TripLeg_Node_Type TripLeg_Node::type() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Node.type) return _internal_type(); } inline void TripLeg_Node::_internal_set_type(::valhalla::TripLeg_Node_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void TripLeg_Node::set_type(::valhalla::TripLeg_Node_Type value) { _internal_set_type(value); @@ -6398,20 +9809,38 @@ inline void TripLeg_Node::set_type(::valhalla::TripLeg_Node_Type value) { } // bool fork = 5; +inline bool TripLeg_Node::_internal_has_fork() const { + return has_fork_case() == kFork; +} +inline bool TripLeg_Node::has_fork() const { + return _internal_has_fork(); +} +inline void TripLeg_Node::set_has_fork() { + _impl_._oneof_case_[2] = kFork; +} inline void TripLeg_Node::clear_fork() { - _impl_.fork_ = false; + if (_internal_has_fork()) { + _impl_.has_fork_.fork_ = false; + clear_has_has_fork(); + } } inline bool TripLeg_Node::_internal_fork() const { - return _impl_.fork_; + if (_internal_has_fork()) { + return _impl_.has_fork_.fork_; + } + return false; +} +inline void TripLeg_Node::_internal_set_fork(bool value) { + if (!_internal_has_fork()) { + clear_has_fork(); + set_has_fork(); + } + _impl_.has_fork_.fork_ = value; } inline bool TripLeg_Node::fork() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Node.fork) return _internal_fork(); } -inline void TripLeg_Node::_internal_set_fork(bool value) { - - _impl_.fork_ = value; -} inline void TripLeg_Node::set_fork(bool value) { _internal_set_fork(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Node.fork) @@ -6673,18 +10102,33 @@ inline void TripLeg_Node::set_allocated_transit_egress_info(::valhalla::TransitE } // string time_zone = 11; +inline bool TripLeg_Node::_internal_has_time_zone() const { + return has_time_zone_case() == kTimeZone; +} +inline bool TripLeg_Node::has_time_zone() const { + return _internal_has_time_zone(); +} +inline void TripLeg_Node::set_has_time_zone() { + _impl_._oneof_case_[3] = kTimeZone; +} inline void TripLeg_Node::clear_time_zone() { - _impl_.time_zone_.ClearToEmpty(); + if (_internal_has_time_zone()) { + _impl_.has_time_zone_.time_zone_.Destroy(); + clear_has_has_time_zone(); + } } inline const std::string& TripLeg_Node::time_zone() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Node.time_zone) return _internal_time_zone(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_Node::set_time_zone(ArgT0&& arg0, ArgT... args) { - - _impl_.time_zone_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_Node::set_time_zone(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_time_zone()) { + clear_has_time_zone(); + set_has_time_zone(); + _impl_.has_time_zone_.time_zone_.InitDefault(); + } + _impl_.has_time_zone_.time_zone_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Node.time_zone) } inline std::string* TripLeg_Node::mutable_time_zone() { @@ -6693,32 +10137,44 @@ inline std::string* TripLeg_Node::mutable_time_zone() { return _s; } inline const std::string& TripLeg_Node::_internal_time_zone() const { - return _impl_.time_zone_.Get(); + if (_internal_has_time_zone()) { + return _impl_.has_time_zone_.time_zone_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_Node::_internal_set_time_zone(const std::string& value) { - - _impl_.time_zone_.Set(value, GetArenaForAllocation()); + if (!_internal_has_time_zone()) { + clear_has_time_zone(); + set_has_time_zone(); + _impl_.has_time_zone_.time_zone_.InitDefault(); + } + _impl_.has_time_zone_.time_zone_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_Node::_internal_mutable_time_zone() { - - return _impl_.time_zone_.Mutable(GetArenaForAllocation()); + if (!_internal_has_time_zone()) { + clear_has_time_zone(); + set_has_time_zone(); + _impl_.has_time_zone_.time_zone_.InitDefault(); + } + return _impl_.has_time_zone_.time_zone_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_Node::release_time_zone() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.Node.time_zone) - return _impl_.time_zone_.Release(); + if (_internal_has_time_zone()) { + clear_has_has_time_zone(); + return _impl_.has_time_zone_.time_zone_.Release(); + } else { + return nullptr; + } } inline void TripLeg_Node::set_allocated_time_zone(std::string* time_zone) { - if (time_zone != nullptr) { - - } else { - + if (has_has_time_zone()) { + clear_has_time_zone(); } - _impl_.time_zone_.SetAllocated(time_zone, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.time_zone_.IsDefault()) { - _impl_.time_zone_.Set("", GetArenaForAllocation()); + if (time_zone != nullptr) { + set_has_time_zone(); + _impl_.has_time_zone_.time_zone_.InitAllocated(time_zone, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Node.time_zone) } @@ -6937,23 +10393,74 @@ inline void TripLeg_Node::set_allocated_bss_info(::valhalla::BikeShareStationInf // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Node.bss_info) } +inline bool TripLeg_Node::has_has_admin_index() const { + return has_admin_index_case() != HAS_ADMIN_INDEX_NOT_SET; +} +inline void TripLeg_Node::clear_has_has_admin_index() { + _impl_._oneof_case_[0] = HAS_ADMIN_INDEX_NOT_SET; +} +inline bool TripLeg_Node::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void TripLeg_Node::clear_has_has_type() { + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} +inline bool TripLeg_Node::has_has_fork() const { + return has_fork_case() != HAS_FORK_NOT_SET; +} +inline void TripLeg_Node::clear_has_has_fork() { + _impl_._oneof_case_[2] = HAS_FORK_NOT_SET; +} +inline bool TripLeg_Node::has_has_time_zone() const { + return has_time_zone_case() != HAS_TIME_ZONE_NOT_SET; +} +inline void TripLeg_Node::clear_has_has_time_zone() { + _impl_._oneof_case_[3] = HAS_TIME_ZONE_NOT_SET; +} +inline TripLeg_Node::HasAdminIndexCase TripLeg_Node::has_admin_index_case() const { + return TripLeg_Node::HasAdminIndexCase(_impl_._oneof_case_[0]); +} +inline TripLeg_Node::HasTypeCase TripLeg_Node::has_type_case() const { + return TripLeg_Node::HasTypeCase(_impl_._oneof_case_[1]); +} +inline TripLeg_Node::HasForkCase TripLeg_Node::has_fork_case() const { + return TripLeg_Node::HasForkCase(_impl_._oneof_case_[2]); +} +inline TripLeg_Node::HasTimeZoneCase TripLeg_Node::has_time_zone_case() const { + return TripLeg_Node::HasTimeZoneCase(_impl_._oneof_case_[3]); +} // ------------------------------------------------------------------- // TripLeg_Admin // string country_code = 1; +inline bool TripLeg_Admin::_internal_has_country_code() const { + return has_country_code_case() == kCountryCode; +} +inline bool TripLeg_Admin::has_country_code() const { + return _internal_has_country_code(); +} +inline void TripLeg_Admin::set_has_country_code() { + _impl_._oneof_case_[0] = kCountryCode; +} inline void TripLeg_Admin::clear_country_code() { - _impl_.country_code_.ClearToEmpty(); + if (_internal_has_country_code()) { + _impl_.has_country_code_.country_code_.Destroy(); + clear_has_has_country_code(); + } } inline const std::string& TripLeg_Admin::country_code() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Admin.country_code) return _internal_country_code(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_Admin::set_country_code(ArgT0&& arg0, ArgT... args) { - - _impl_.country_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_Admin::set_country_code(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_country_code()) { + clear_has_country_code(); + set_has_country_code(); + _impl_.has_country_code_.country_code_.InitDefault(); + } + _impl_.has_country_code_.country_code_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Admin.country_code) } inline std::string* TripLeg_Admin::mutable_country_code() { @@ -6962,48 +10469,75 @@ inline std::string* TripLeg_Admin::mutable_country_code() { return _s; } inline const std::string& TripLeg_Admin::_internal_country_code() const { - return _impl_.country_code_.Get(); + if (_internal_has_country_code()) { + return _impl_.has_country_code_.country_code_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_Admin::_internal_set_country_code(const std::string& value) { - - _impl_.country_code_.Set(value, GetArenaForAllocation()); + if (!_internal_has_country_code()) { + clear_has_country_code(); + set_has_country_code(); + _impl_.has_country_code_.country_code_.InitDefault(); + } + _impl_.has_country_code_.country_code_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_Admin::_internal_mutable_country_code() { - - return _impl_.country_code_.Mutable(GetArenaForAllocation()); + if (!_internal_has_country_code()) { + clear_has_country_code(); + set_has_country_code(); + _impl_.has_country_code_.country_code_.InitDefault(); + } + return _impl_.has_country_code_.country_code_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_Admin::release_country_code() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.Admin.country_code) - return _impl_.country_code_.Release(); + if (_internal_has_country_code()) { + clear_has_has_country_code(); + return _impl_.has_country_code_.country_code_.Release(); + } else { + return nullptr; + } } inline void TripLeg_Admin::set_allocated_country_code(std::string* country_code) { - if (country_code != nullptr) { - - } else { - + if (has_has_country_code()) { + clear_has_country_code(); } - _impl_.country_code_.SetAllocated(country_code, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.country_code_.IsDefault()) { - _impl_.country_code_.Set("", GetArenaForAllocation()); + if (country_code != nullptr) { + set_has_country_code(); + _impl_.has_country_code_.country_code_.InitAllocated(country_code, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Admin.country_code) } // string country_text = 2; +inline bool TripLeg_Admin::_internal_has_country_text() const { + return has_country_text_case() == kCountryText; +} +inline bool TripLeg_Admin::has_country_text() const { + return _internal_has_country_text(); +} +inline void TripLeg_Admin::set_has_country_text() { + _impl_._oneof_case_[1] = kCountryText; +} inline void TripLeg_Admin::clear_country_text() { - _impl_.country_text_.ClearToEmpty(); + if (_internal_has_country_text()) { + _impl_.has_country_text_.country_text_.Destroy(); + clear_has_has_country_text(); + } } inline const std::string& TripLeg_Admin::country_text() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Admin.country_text) return _internal_country_text(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_Admin::set_country_text(ArgT0&& arg0, ArgT... args) { - - _impl_.country_text_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_Admin::set_country_text(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_country_text()) { + clear_has_country_text(); + set_has_country_text(); + _impl_.has_country_text_.country_text_.InitDefault(); + } + _impl_.has_country_text_.country_text_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Admin.country_text) } inline std::string* TripLeg_Admin::mutable_country_text() { @@ -7012,48 +10546,75 @@ inline std::string* TripLeg_Admin::mutable_country_text() { return _s; } inline const std::string& TripLeg_Admin::_internal_country_text() const { - return _impl_.country_text_.Get(); + if (_internal_has_country_text()) { + return _impl_.has_country_text_.country_text_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_Admin::_internal_set_country_text(const std::string& value) { - - _impl_.country_text_.Set(value, GetArenaForAllocation()); + if (!_internal_has_country_text()) { + clear_has_country_text(); + set_has_country_text(); + _impl_.has_country_text_.country_text_.InitDefault(); + } + _impl_.has_country_text_.country_text_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_Admin::_internal_mutable_country_text() { - - return _impl_.country_text_.Mutable(GetArenaForAllocation()); + if (!_internal_has_country_text()) { + clear_has_country_text(); + set_has_country_text(); + _impl_.has_country_text_.country_text_.InitDefault(); + } + return _impl_.has_country_text_.country_text_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_Admin::release_country_text() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.Admin.country_text) - return _impl_.country_text_.Release(); + if (_internal_has_country_text()) { + clear_has_has_country_text(); + return _impl_.has_country_text_.country_text_.Release(); + } else { + return nullptr; + } } inline void TripLeg_Admin::set_allocated_country_text(std::string* country_text) { - if (country_text != nullptr) { - - } else { - + if (has_has_country_text()) { + clear_has_country_text(); } - _impl_.country_text_.SetAllocated(country_text, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.country_text_.IsDefault()) { - _impl_.country_text_.Set("", GetArenaForAllocation()); + if (country_text != nullptr) { + set_has_country_text(); + _impl_.has_country_text_.country_text_.InitAllocated(country_text, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Admin.country_text) } // string state_code = 3; +inline bool TripLeg_Admin::_internal_has_state_code() const { + return has_state_code_case() == kStateCode; +} +inline bool TripLeg_Admin::has_state_code() const { + return _internal_has_state_code(); +} +inline void TripLeg_Admin::set_has_state_code() { + _impl_._oneof_case_[2] = kStateCode; +} inline void TripLeg_Admin::clear_state_code() { - _impl_.state_code_.ClearToEmpty(); + if (_internal_has_state_code()) { + _impl_.has_state_code_.state_code_.Destroy(); + clear_has_has_state_code(); + } } inline const std::string& TripLeg_Admin::state_code() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Admin.state_code) return _internal_state_code(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_Admin::set_state_code(ArgT0&& arg0, ArgT... args) { - - _impl_.state_code_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_Admin::set_state_code(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_state_code()) { + clear_has_state_code(); + set_has_state_code(); + _impl_.has_state_code_.state_code_.InitDefault(); + } + _impl_.has_state_code_.state_code_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Admin.state_code) } inline std::string* TripLeg_Admin::mutable_state_code() { @@ -7062,48 +10623,75 @@ inline std::string* TripLeg_Admin::mutable_state_code() { return _s; } inline const std::string& TripLeg_Admin::_internal_state_code() const { - return _impl_.state_code_.Get(); + if (_internal_has_state_code()) { + return _impl_.has_state_code_.state_code_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_Admin::_internal_set_state_code(const std::string& value) { - - _impl_.state_code_.Set(value, GetArenaForAllocation()); + if (!_internal_has_state_code()) { + clear_has_state_code(); + set_has_state_code(); + _impl_.has_state_code_.state_code_.InitDefault(); + } + _impl_.has_state_code_.state_code_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_Admin::_internal_mutable_state_code() { - - return _impl_.state_code_.Mutable(GetArenaForAllocation()); + if (!_internal_has_state_code()) { + clear_has_state_code(); + set_has_state_code(); + _impl_.has_state_code_.state_code_.InitDefault(); + } + return _impl_.has_state_code_.state_code_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_Admin::release_state_code() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.Admin.state_code) - return _impl_.state_code_.Release(); + if (_internal_has_state_code()) { + clear_has_has_state_code(); + return _impl_.has_state_code_.state_code_.Release(); + } else { + return nullptr; + } } inline void TripLeg_Admin::set_allocated_state_code(std::string* state_code) { - if (state_code != nullptr) { - - } else { - + if (has_has_state_code()) { + clear_has_state_code(); } - _impl_.state_code_.SetAllocated(state_code, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.state_code_.IsDefault()) { - _impl_.state_code_.Set("", GetArenaForAllocation()); + if (state_code != nullptr) { + set_has_state_code(); + _impl_.has_state_code_.state_code_.InitAllocated(state_code, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Admin.state_code) } // string state_text = 4; +inline bool TripLeg_Admin::_internal_has_state_text() const { + return has_state_text_case() == kStateText; +} +inline bool TripLeg_Admin::has_state_text() const { + return _internal_has_state_text(); +} +inline void TripLeg_Admin::set_has_state_text() { + _impl_._oneof_case_[3] = kStateText; +} inline void TripLeg_Admin::clear_state_text() { - _impl_.state_text_.ClearToEmpty(); + if (_internal_has_state_text()) { + _impl_.has_state_text_.state_text_.Destroy(); + clear_has_has_state_text(); + } } inline const std::string& TripLeg_Admin::state_text() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Admin.state_text) return _internal_state_text(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg_Admin::set_state_text(ArgT0&& arg0, ArgT... args) { - - _impl_.state_text_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg_Admin::set_state_text(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_state_text()) { + clear_has_state_text(); + set_has_state_text(); + _impl_.has_state_text_.state_text_.InitDefault(); + } + _impl_.has_state_text_.state_text_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Admin.state_text) } inline std::string* TripLeg_Admin::mutable_state_text() { @@ -7112,35 +10700,83 @@ inline std::string* TripLeg_Admin::mutable_state_text() { return _s; } inline const std::string& TripLeg_Admin::_internal_state_text() const { - return _impl_.state_text_.Get(); + if (_internal_has_state_text()) { + return _impl_.has_state_text_.state_text_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg_Admin::_internal_set_state_text(const std::string& value) { - - _impl_.state_text_.Set(value, GetArenaForAllocation()); + if (!_internal_has_state_text()) { + clear_has_state_text(); + set_has_state_text(); + _impl_.has_state_text_.state_text_.InitDefault(); + } + _impl_.has_state_text_.state_text_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg_Admin::_internal_mutable_state_text() { - - return _impl_.state_text_.Mutable(GetArenaForAllocation()); + if (!_internal_has_state_text()) { + clear_has_state_text(); + set_has_state_text(); + _impl_.has_state_text_.state_text_.InitDefault(); + } + return _impl_.has_state_text_.state_text_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg_Admin::release_state_text() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.Admin.state_text) - return _impl_.state_text_.Release(); + if (_internal_has_state_text()) { + clear_has_has_state_text(); + return _impl_.has_state_text_.state_text_.Release(); + } else { + return nullptr; + } } inline void TripLeg_Admin::set_allocated_state_text(std::string* state_text) { - if (state_text != nullptr) { - - } else { - + if (has_has_state_text()) { + clear_has_state_text(); } - _impl_.state_text_.SetAllocated(state_text, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.state_text_.IsDefault()) { - _impl_.state_text_.Set("", GetArenaForAllocation()); + if (state_text != nullptr) { + set_has_state_text(); + _impl_.has_state_text_.state_text_.InitAllocated(state_text, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.Admin.state_text) } +inline bool TripLeg_Admin::has_has_country_code() const { + return has_country_code_case() != HAS_COUNTRY_CODE_NOT_SET; +} +inline void TripLeg_Admin::clear_has_has_country_code() { + _impl_._oneof_case_[0] = HAS_COUNTRY_CODE_NOT_SET; +} +inline bool TripLeg_Admin::has_has_country_text() const { + return has_country_text_case() != HAS_COUNTRY_TEXT_NOT_SET; +} +inline void TripLeg_Admin::clear_has_has_country_text() { + _impl_._oneof_case_[1] = HAS_COUNTRY_TEXT_NOT_SET; +} +inline bool TripLeg_Admin::has_has_state_code() const { + return has_state_code_case() != HAS_STATE_CODE_NOT_SET; +} +inline void TripLeg_Admin::clear_has_has_state_code() { + _impl_._oneof_case_[2] = HAS_STATE_CODE_NOT_SET; +} +inline bool TripLeg_Admin::has_has_state_text() const { + return has_state_text_case() != HAS_STATE_TEXT_NOT_SET; +} +inline void TripLeg_Admin::clear_has_has_state_text() { + _impl_._oneof_case_[3] = HAS_STATE_TEXT_NOT_SET; +} +inline TripLeg_Admin::HasCountryCodeCase TripLeg_Admin::has_country_code_case() const { + return TripLeg_Admin::HasCountryCodeCase(_impl_._oneof_case_[0]); +} +inline TripLeg_Admin::HasCountryTextCase TripLeg_Admin::has_country_text_case() const { + return TripLeg_Admin::HasCountryTextCase(_impl_._oneof_case_[1]); +} +inline TripLeg_Admin::HasStateCodeCase TripLeg_Admin::has_state_code_case() const { + return TripLeg_Admin::HasStateCodeCase(_impl_._oneof_case_[2]); +} +inline TripLeg_Admin::HasStateTextCase TripLeg_Admin::has_state_text_case() const { + return TripLeg_Admin::HasStateTextCase(_impl_._oneof_case_[3]); +} // ------------------------------------------------------------------- // TripLeg_ShapeAttributes @@ -7423,45 +11059,99 @@ inline void TripLeg_Incident::set_allocated_metadata(::valhalla::IncidentsTile_M } // uint32 begin_shape_index = 3; +inline bool TripLeg_Incident::_internal_has_begin_shape_index() const { + return has_begin_shape_index_case() == kBeginShapeIndex; +} +inline bool TripLeg_Incident::has_begin_shape_index() const { + return _internal_has_begin_shape_index(); +} +inline void TripLeg_Incident::set_has_begin_shape_index() { + _impl_._oneof_case_[0] = kBeginShapeIndex; +} inline void TripLeg_Incident::clear_begin_shape_index() { - _impl_.begin_shape_index_ = 0u; + if (_internal_has_begin_shape_index()) { + _impl_.has_begin_shape_index_.begin_shape_index_ = 0u; + clear_has_has_begin_shape_index(); + } } inline uint32_t TripLeg_Incident::_internal_begin_shape_index() const { - return _impl_.begin_shape_index_; + if (_internal_has_begin_shape_index()) { + return _impl_.has_begin_shape_index_.begin_shape_index_; + } + return 0u; +} +inline void TripLeg_Incident::_internal_set_begin_shape_index(uint32_t value) { + if (!_internal_has_begin_shape_index()) { + clear_has_begin_shape_index(); + set_has_begin_shape_index(); + } + _impl_.has_begin_shape_index_.begin_shape_index_ = value; } inline uint32_t TripLeg_Incident::begin_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Incident.begin_shape_index) return _internal_begin_shape_index(); } -inline void TripLeg_Incident::_internal_set_begin_shape_index(uint32_t value) { - - _impl_.begin_shape_index_ = value; -} inline void TripLeg_Incident::set_begin_shape_index(uint32_t value) { _internal_set_begin_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Incident.begin_shape_index) } // uint32 end_shape_index = 4; +inline bool TripLeg_Incident::_internal_has_end_shape_index() const { + return has_end_shape_index_case() == kEndShapeIndex; +} +inline bool TripLeg_Incident::has_end_shape_index() const { + return _internal_has_end_shape_index(); +} +inline void TripLeg_Incident::set_has_end_shape_index() { + _impl_._oneof_case_[1] = kEndShapeIndex; +} inline void TripLeg_Incident::clear_end_shape_index() { - _impl_.end_shape_index_ = 0u; + if (_internal_has_end_shape_index()) { + _impl_.has_end_shape_index_.end_shape_index_ = 0u; + clear_has_has_end_shape_index(); + } } inline uint32_t TripLeg_Incident::_internal_end_shape_index() const { - return _impl_.end_shape_index_; + if (_internal_has_end_shape_index()) { + return _impl_.has_end_shape_index_.end_shape_index_; + } + return 0u; +} +inline void TripLeg_Incident::_internal_set_end_shape_index(uint32_t value) { + if (!_internal_has_end_shape_index()) { + clear_has_end_shape_index(); + set_has_end_shape_index(); + } + _impl_.has_end_shape_index_.end_shape_index_ = value; } inline uint32_t TripLeg_Incident::end_shape_index() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.Incident.end_shape_index) return _internal_end_shape_index(); } -inline void TripLeg_Incident::_internal_set_end_shape_index(uint32_t value) { - - _impl_.end_shape_index_ = value; -} inline void TripLeg_Incident::set_end_shape_index(uint32_t value) { _internal_set_end_shape_index(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.Incident.end_shape_index) } +inline bool TripLeg_Incident::has_has_begin_shape_index() const { + return has_begin_shape_index_case() != HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline void TripLeg_Incident::clear_has_has_begin_shape_index() { + _impl_._oneof_case_[0] = HAS_BEGIN_SHAPE_INDEX_NOT_SET; +} +inline bool TripLeg_Incident::has_has_end_shape_index() const { + return has_end_shape_index_case() != HAS_END_SHAPE_INDEX_NOT_SET; +} +inline void TripLeg_Incident::clear_has_has_end_shape_index() { + _impl_._oneof_case_[1] = HAS_END_SHAPE_INDEX_NOT_SET; +} +inline TripLeg_Incident::HasBeginShapeIndexCase TripLeg_Incident::has_begin_shape_index_case() const { + return TripLeg_Incident::HasBeginShapeIndexCase(_impl_._oneof_case_[0]); +} +inline TripLeg_Incident::HasEndShapeIndexCase TripLeg_Incident::has_end_shape_index_case() const { + return TripLeg_Incident::HasEndShapeIndexCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // TripLeg_Closure @@ -7565,80 +11255,152 @@ inline TripLeg_Closure::HasEndShapeIndexCase TripLeg_Closure::has_end_shape_inde // TripLeg // uint64 osm_changeset = 1; +inline bool TripLeg::_internal_has_osm_changeset() const { + return has_osm_changeset_case() == kOsmChangeset; +} +inline bool TripLeg::has_osm_changeset() const { + return _internal_has_osm_changeset(); +} +inline void TripLeg::set_has_osm_changeset() { + _impl_._oneof_case_[0] = kOsmChangeset; +} inline void TripLeg::clear_osm_changeset() { - _impl_.osm_changeset_ = uint64_t{0u}; + if (_internal_has_osm_changeset()) { + _impl_.has_osm_changeset_.osm_changeset_ = uint64_t{0u}; + clear_has_has_osm_changeset(); + } } inline uint64_t TripLeg::_internal_osm_changeset() const { - return _impl_.osm_changeset_; + if (_internal_has_osm_changeset()) { + return _impl_.has_osm_changeset_.osm_changeset_; + } + return uint64_t{0u}; +} +inline void TripLeg::_internal_set_osm_changeset(uint64_t value) { + if (!_internal_has_osm_changeset()) { + clear_has_osm_changeset(); + set_has_osm_changeset(); + } + _impl_.has_osm_changeset_.osm_changeset_ = value; } inline uint64_t TripLeg::osm_changeset() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.osm_changeset) return _internal_osm_changeset(); } -inline void TripLeg::_internal_set_osm_changeset(uint64_t value) { - - _impl_.osm_changeset_ = value; -} inline void TripLeg::set_osm_changeset(uint64_t value) { _internal_set_osm_changeset(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.osm_changeset) } // uint64 trip_id = 2; +inline bool TripLeg::_internal_has_trip_id() const { + return has_trip_id_case() == kTripId; +} +inline bool TripLeg::has_trip_id() const { + return _internal_has_trip_id(); +} +inline void TripLeg::set_has_trip_id() { + _impl_._oneof_case_[1] = kTripId; +} inline void TripLeg::clear_trip_id() { - _impl_.trip_id_ = uint64_t{0u}; + if (_internal_has_trip_id()) { + _impl_.has_trip_id_.trip_id_ = uint64_t{0u}; + clear_has_has_trip_id(); + } } inline uint64_t TripLeg::_internal_trip_id() const { - return _impl_.trip_id_; + if (_internal_has_trip_id()) { + return _impl_.has_trip_id_.trip_id_; + } + return uint64_t{0u}; +} +inline void TripLeg::_internal_set_trip_id(uint64_t value) { + if (!_internal_has_trip_id()) { + clear_has_trip_id(); + set_has_trip_id(); + } + _impl_.has_trip_id_.trip_id_ = value; } inline uint64_t TripLeg::trip_id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.trip_id) return _internal_trip_id(); } -inline void TripLeg::_internal_set_trip_id(uint64_t value) { - - _impl_.trip_id_ = value; -} inline void TripLeg::set_trip_id(uint64_t value) { _internal_set_trip_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.trip_id) } // uint32 leg_id = 3; +inline bool TripLeg::_internal_has_leg_id() const { + return has_leg_id_case() == kLegId; +} +inline bool TripLeg::has_leg_id() const { + return _internal_has_leg_id(); +} +inline void TripLeg::set_has_leg_id() { + _impl_._oneof_case_[2] = kLegId; +} inline void TripLeg::clear_leg_id() { - _impl_.leg_id_ = 0u; + if (_internal_has_leg_id()) { + _impl_.has_leg_id_.leg_id_ = 0u; + clear_has_has_leg_id(); + } } inline uint32_t TripLeg::_internal_leg_id() const { - return _impl_.leg_id_; + if (_internal_has_leg_id()) { + return _impl_.has_leg_id_.leg_id_; + } + return 0u; +} +inline void TripLeg::_internal_set_leg_id(uint32_t value) { + if (!_internal_has_leg_id()) { + clear_has_leg_id(); + set_has_leg_id(); + } + _impl_.has_leg_id_.leg_id_ = value; } inline uint32_t TripLeg::leg_id() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.leg_id) return _internal_leg_id(); } -inline void TripLeg::_internal_set_leg_id(uint32_t value) { - - _impl_.leg_id_ = value; -} inline void TripLeg::set_leg_id(uint32_t value) { _internal_set_leg_id(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.leg_id) } // uint32 leg_count = 4; +inline bool TripLeg::_internal_has_leg_count() const { + return has_leg_count_case() == kLegCount; +} +inline bool TripLeg::has_leg_count() const { + return _internal_has_leg_count(); +} +inline void TripLeg::set_has_leg_count() { + _impl_._oneof_case_[3] = kLegCount; +} inline void TripLeg::clear_leg_count() { - _impl_.leg_count_ = 0u; + if (_internal_has_leg_count()) { + _impl_.has_leg_count_.leg_count_ = 0u; + clear_has_has_leg_count(); + } } inline uint32_t TripLeg::_internal_leg_count() const { - return _impl_.leg_count_; + if (_internal_has_leg_count()) { + return _impl_.has_leg_count_.leg_count_; + } + return 0u; +} +inline void TripLeg::_internal_set_leg_count(uint32_t value) { + if (!_internal_has_leg_count()) { + clear_has_leg_count(); + set_has_leg_count(); + } + _impl_.has_leg_count_.leg_count_ = value; } inline uint32_t TripLeg::leg_count() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.leg_count) return _internal_leg_count(); } -inline void TripLeg::_internal_set_leg_count(uint32_t value) { - - _impl_.leg_count_ = value; -} inline void TripLeg::set_leg_count(uint32_t value) { _internal_set_leg_count(value); // @@protoc_insertion_point(field_set:valhalla.TripLeg.leg_count) @@ -7762,18 +11524,33 @@ TripLeg::admin() const { } // string shape = 8; +inline bool TripLeg::_internal_has_shape() const { + return has_shape_case() == kShape; +} +inline bool TripLeg::has_shape() const { + return _internal_has_shape(); +} +inline void TripLeg::set_has_shape() { + _impl_._oneof_case_[4] = kShape; +} inline void TripLeg::clear_shape() { - _impl_.shape_.ClearToEmpty(); + if (_internal_has_shape()) { + _impl_.has_shape_.shape_.Destroy(); + clear_has_has_shape(); + } } inline const std::string& TripLeg::shape() const { // @@protoc_insertion_point(field_get:valhalla.TripLeg.shape) return _internal_shape(); } template -inline PROTOBUF_ALWAYS_INLINE -void TripLeg::set_shape(ArgT0&& arg0, ArgT... args) { - - _impl_.shape_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TripLeg::set_shape(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + _impl_.has_shape_.shape_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TripLeg.shape) } inline std::string* TripLeg::mutable_shape() { @@ -7782,32 +11559,44 @@ inline std::string* TripLeg::mutable_shape() { return _s; } inline const std::string& TripLeg::_internal_shape() const { - return _impl_.shape_.Get(); + if (_internal_has_shape()) { + return _impl_.has_shape_.shape_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TripLeg::_internal_set_shape(const std::string& value) { - - _impl_.shape_.Set(value, GetArenaForAllocation()); + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + _impl_.has_shape_.shape_.Set(value, GetArenaForAllocation()); } inline std::string* TripLeg::_internal_mutable_shape() { - - return _impl_.shape_.Mutable(GetArenaForAllocation()); + if (!_internal_has_shape()) { + clear_has_shape(); + set_has_shape(); + _impl_.has_shape_.shape_.InitDefault(); + } + return _impl_.has_shape_.shape_.Mutable( GetArenaForAllocation()); } inline std::string* TripLeg::release_shape() { // @@protoc_insertion_point(field_release:valhalla.TripLeg.shape) - return _impl_.shape_.Release(); + if (_internal_has_shape()) { + clear_has_has_shape(); + return _impl_.has_shape_.shape_.Release(); + } else { + return nullptr; + } } inline void TripLeg::set_allocated_shape(std::string* shape) { - if (shape != nullptr) { - - } else { - + if (has_has_shape()) { + clear_has_shape(); } - _impl_.shape_.SetAllocated(shape, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.shape_.IsDefault()) { - _impl_.shape_.Set("", GetArenaForAllocation()); + if (shape != nullptr) { + set_has_shape(); + _impl_.has_shape_.shape_.InitAllocated(shape, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TripLeg.shape) } @@ -8141,6 +11930,51 @@ TripLeg::closures() const { return _impl_.closures_; } +inline bool TripLeg::has_has_osm_changeset() const { + return has_osm_changeset_case() != HAS_OSM_CHANGESET_NOT_SET; +} +inline void TripLeg::clear_has_has_osm_changeset() { + _impl_._oneof_case_[0] = HAS_OSM_CHANGESET_NOT_SET; +} +inline bool TripLeg::has_has_trip_id() const { + return has_trip_id_case() != HAS_TRIP_ID_NOT_SET; +} +inline void TripLeg::clear_has_has_trip_id() { + _impl_._oneof_case_[1] = HAS_TRIP_ID_NOT_SET; +} +inline bool TripLeg::has_has_leg_id() const { + return has_leg_id_case() != HAS_LEG_ID_NOT_SET; +} +inline void TripLeg::clear_has_has_leg_id() { + _impl_._oneof_case_[2] = HAS_LEG_ID_NOT_SET; +} +inline bool TripLeg::has_has_leg_count() const { + return has_leg_count_case() != HAS_LEG_COUNT_NOT_SET; +} +inline void TripLeg::clear_has_has_leg_count() { + _impl_._oneof_case_[3] = HAS_LEG_COUNT_NOT_SET; +} +inline bool TripLeg::has_has_shape() const { + return has_shape_case() != HAS_SHAPE_NOT_SET; +} +inline void TripLeg::clear_has_has_shape() { + _impl_._oneof_case_[4] = HAS_SHAPE_NOT_SET; +} +inline TripLeg::HasOsmChangesetCase TripLeg::has_osm_changeset_case() const { + return TripLeg::HasOsmChangesetCase(_impl_._oneof_case_[0]); +} +inline TripLeg::HasTripIdCase TripLeg::has_trip_id_case() const { + return TripLeg::HasTripIdCase(_impl_._oneof_case_[1]); +} +inline TripLeg::HasLegIdCase TripLeg::has_leg_id_case() const { + return TripLeg::HasLegIdCase(_impl_._oneof_case_[2]); +} +inline TripLeg::HasLegCountCase TripLeg::has_leg_count_case() const { + return TripLeg::HasLegCountCase(_impl_._oneof_case_[3]); +} +inline TripLeg::HasShapeCase TripLeg::has_shape_case() const { + return TripLeg::HasShapeCase(_impl_._oneof_case_[4]); +} // ------------------------------------------------------------------- // TripRoute diff --git a/include/linux/valhalla/proto/common.pb.cc b/include/linux/valhalla/proto/tripcommon.pb.cc similarity index 59% rename from include/linux/valhalla/proto/common.pb.cc rename to include/linux/valhalla/proto/tripcommon.pb.cc index a554090..1754d07 100644 --- a/include/linux/valhalla/proto/common.pb.cc +++ b/include/linux/valhalla/proto/tripcommon.pb.cc @@ -1,7 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common.proto +// source: tripcommon.proto -#include "common.pb.h" +#include "tripcommon.pb.h" #include @@ -47,91 +47,86 @@ struct BoundingBoxDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoundingBoxDefaultTypeInternal _BoundingBox_default_instance_; -PROTOBUF_CONSTEXPR SearchFilter::SearchFilter( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.exclude_tunnel_)*/false - , /*decltype(_impl_.exclude_bridge_)*/false - , /*decltype(_impl_.exclude_ramp_)*/false - , /*decltype(_impl_.has_min_road_class_)*/{} - , /*decltype(_impl_.has_max_road_class_)*/{} - , /*decltype(_impl_.has_exclude_closures_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}} {} -struct SearchFilterDefaultTypeInternal { - PROTOBUF_CONSTEXPR SearchFilterDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~SearchFilterDefaultTypeInternal() {} - union { - SearchFilter _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchFilterDefaultTypeInternal _SearchFilter_default_instance_; -PROTOBUF_CONSTEXPR PathEdge::PathEdge( +PROTOBUF_CONSTEXPR Location_PathEdge::Location_PathEdge( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.names_)*/{} , /*decltype(_impl_.ll_)*/nullptr - , /*decltype(_impl_.graph_id_)*/uint64_t{0u} - , /*decltype(_impl_.percent_along_)*/0 - , /*decltype(_impl_.distance_)*/0 - , /*decltype(_impl_.side_of_street_)*/0 - , /*decltype(_impl_.begin_node_)*/false - , /*decltype(_impl_.end_node_)*/false - , /*decltype(_impl_.outbound_reach_)*/0 - , /*decltype(_impl_.inbound_reach_)*/0 - , /*decltype(_impl_.heading_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} -struct PathEdgeDefaultTypeInternal { - PROTOBUF_CONSTEXPR PathEdgeDefaultTypeInternal() + , /*decltype(_impl_.has_graph_id_)*/{} + , /*decltype(_impl_.has_percent_along_)*/{} + , /*decltype(_impl_.has_side_of_street_)*/{} + , /*decltype(_impl_.has_distance_)*/{} + , /*decltype(_impl_.has_minimum_reachability_)*/{} + , /*decltype(_impl_.has_begin_node_)*/{} + , /*decltype(_impl_.has_end_node_)*/{} + , /*decltype(_impl_.has_outbound_reach_)*/{} + , /*decltype(_impl_.has_inbound_reach_)*/{} + , /*decltype(_impl_.has_heading_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct Location_PathEdgeDefaultTypeInternal { + PROTOBUF_CONSTEXPR Location_PathEdgeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~PathEdgeDefaultTypeInternal() {} + ~Location_PathEdgeDefaultTypeInternal() {} union { - PathEdge _instance; + Location_PathEdge _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PathEdgeDefaultTypeInternal _PathEdge_default_instance_; -PROTOBUF_CONSTEXPR Correlation::Correlation( +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Location_PathEdgeDefaultTypeInternal _Location_PathEdge_default_instance_; +PROTOBUF_CONSTEXPR Location_SearchFilter::Location_SearchFilter( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.edges_)*/{} - , /*decltype(_impl_.filtered_edges_)*/{} - , /*decltype(_impl_.projected_ll_)*/nullptr - , /*decltype(_impl_.original_index_)*/0u - , /*decltype(_impl_.leg_shape_index_)*/0u - , /*decltype(_impl_.distance_from_leg_origin_)*/0 - , /*decltype(_impl_.route_index_)*/0u - , /*decltype(_impl_.waypoint_index_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} -struct CorrelationDefaultTypeInternal { - PROTOBUF_CONSTEXPR CorrelationDefaultTypeInternal() + /*decltype(_impl_.has_min_road_class_)*/{} + , /*decltype(_impl_.has_max_road_class_)*/{} + , /*decltype(_impl_.has_exclude_tunnel_)*/{} + , /*decltype(_impl_.has_exclude_bridge_)*/{} + , /*decltype(_impl_.has_exclude_ramp_)*/{} + , /*decltype(_impl_.has_exclude_closures_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct Location_SearchFilterDefaultTypeInternal { + PROTOBUF_CONSTEXPR Location_SearchFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} - ~CorrelationDefaultTypeInternal() {} + ~Location_SearchFilterDefaultTypeInternal() {} union { - Correlation _instance; + Location_SearchFilter _instance; }; }; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CorrelationDefaultTypeInternal _Correlation_default_instance_; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Location_SearchFilterDefaultTypeInternal _Location_SearchFilter_default_instance_; PROTOBUF_CONSTEXPR Location::Location( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.street_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.date_time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + /*decltype(_impl_.path_edges_)*/{} + , /*decltype(_impl_.filtered_edges_)*/{} , /*decltype(_impl_.ll_)*/nullptr + , /*decltype(_impl_.projected_ll_)*/nullptr , /*decltype(_impl_.display_ll_)*/nullptr , /*decltype(_impl_.search_filter_)*/nullptr - , /*decltype(_impl_.correlation_)*/nullptr - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_.side_of_street_)*/0 - , /*decltype(_impl_.skip_ranking_candidates_)*/false - , /*decltype(_impl_.preferred_side_)*/0 - , /*decltype(_impl_.waiting_secs_)*/0 + , /*decltype(_impl_.has_type_)*/{} , /*decltype(_impl_.has_heading_)*/{} + , /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_.has_street_)*/{} + , /*decltype(_impl_.has_city_)*/{} + , /*decltype(_impl_.has_state_)*/{} + , /*decltype(_impl_.has_postal_code_)*/{} + , /*decltype(_impl_.has_country_)*/{} + , /*decltype(_impl_.has_phone_)*/{} + , /*decltype(_impl_.has_url_)*/{} + , /*decltype(_impl_.has_date_time_)*/{} + , /*decltype(_impl_.has_side_of_street_)*/{} , /*decltype(_impl_.has_heading_tolerance_)*/{} , /*decltype(_impl_.has_node_snap_tolerance_)*/{} + , /*decltype(_impl_.has_way_id_)*/{} , /*decltype(_impl_.has_minimum_reachability_)*/{} , /*decltype(_impl_.has_radius_)*/{} , /*decltype(_impl_.has_accuracy_)*/{} , /*decltype(_impl_.has_time_)*/{} + , /*decltype(_impl_.has_skip_ranking_candidates_)*/{} + , /*decltype(_impl_.has_original_index_)*/{} + , /*decltype(_impl_.has_leg_shape_index_)*/{} + , /*decltype(_impl_.has_distance_from_leg_origin_)*/{} + , /*decltype(_impl_.has_preferred_side_)*/{} , /*decltype(_impl_.has_search_cutoff_)*/{} , /*decltype(_impl_.has_street_side_tolerance_)*/{} + , /*decltype(_impl_.has_route_index_)*/{} + , /*decltype(_impl_.has_waypoint_index_)*/{} , /*decltype(_impl_.has_street_side_max_distance_)*/{} , /*decltype(_impl_.has_preferred_layer_)*/{} , /*decltype(_impl_._cached_size_)*/{} @@ -147,10 +142,11 @@ struct LocationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocationDefaultTypeInternal _Location_default_instance_; PROTOBUF_CONSTEXPR TransitEgressInfo::TransitEgressInfo( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.ll_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.ll_)*/nullptr + , /*decltype(_impl_.has_onestop_id_)*/{} + , /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TransitEgressInfoDefaultTypeInternal { PROTOBUF_CONSTEXPR TransitEgressInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -162,10 +158,11 @@ struct TransitEgressInfoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransitEgressInfoDefaultTypeInternal _TransitEgressInfo_default_instance_; PROTOBUF_CONSTEXPR TransitStationInfo::TransitStationInfo( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.ll_)*/nullptr - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.ll_)*/nullptr + , /*decltype(_impl_.has_onestop_id_)*/{} + , /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TransitStationInfoDefaultTypeInternal { PROTOBUF_CONSTEXPR TransitStationInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -177,14 +174,15 @@ struct TransitStationInfoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransitStationInfoDefaultTypeInternal _TransitStationInfo_default_instance_; PROTOBUF_CONSTEXPR BikeShareStationInfo::BikeShareStationInfo( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.ref_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.network_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.operator__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.capacity_)*/0u - , /*decltype(_impl_.rent_cost_)*/0 - , /*decltype(_impl_.return_cost_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_.has_ref_)*/{} + , /*decltype(_impl_.has_capacity_)*/{} + , /*decltype(_impl_.has_network_)*/{} + , /*decltype(_impl_.has_operator__)*/{} + , /*decltype(_impl_.has_rent_cost_)*/{} + , /*decltype(_impl_.has_return_cost_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct BikeShareStationInfoDefaultTypeInternal { PROTOBUF_CONSTEXPR BikeShareStationInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -196,16 +194,17 @@ struct BikeShareStationInfoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BikeShareStationInfoDefaultTypeInternal _BikeShareStationInfo_default_instance_; PROTOBUF_CONSTEXPR TransitPlatformInfo::TransitPlatformInfo( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.arrival_date_time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.departure_date_time_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.station_onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.station_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.ll_)*/nullptr - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_.assumed_schedule_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.ll_)*/nullptr + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_.has_onestop_id_)*/{} + , /*decltype(_impl_.has_name_)*/{} + , /*decltype(_impl_.has_arrival_date_time_)*/{} + , /*decltype(_impl_.has_departure_date_time_)*/{} + , /*decltype(_impl_.has_assumed_schedule_)*/{} + , /*decltype(_impl_.has_station_onestop_id_)*/{} + , /*decltype(_impl_.has_station_name_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TransitPlatformInfoDefaultTypeInternal { PROTOBUF_CONSTEXPR TransitPlatformInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -218,19 +217,20 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR TransitRouteInfo::TransitRouteInfo( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.transit_stops_)*/{} - , /*decltype(_impl_.onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.short_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.long_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.headsign_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.operator_onestop_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.operator_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.operator_url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.block_id_)*/0u - , /*decltype(_impl_.trip_id_)*/0u - , /*decltype(_impl_.color_)*/0u - , /*decltype(_impl_.text_color_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + , /*decltype(_impl_.has_onestop_id_)*/{} + , /*decltype(_impl_.has_block_id_)*/{} + , /*decltype(_impl_.has_trip_id_)*/{} + , /*decltype(_impl_.has_short_name_)*/{} + , /*decltype(_impl_.has_long_name_)*/{} + , /*decltype(_impl_.has_headsign_)*/{} + , /*decltype(_impl_.has_color_)*/{} + , /*decltype(_impl_.has_text_color_)*/{} + , /*decltype(_impl_.has_description_)*/{} + , /*decltype(_impl_.has_operator_onestop_id_)*/{} + , /*decltype(_impl_.has_operator_name_)*/{} + , /*decltype(_impl_.has_operator_url_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TransitRouteInfoDefaultTypeInternal { PROTOBUF_CONSTEXPR TransitRouteInfoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -242,9 +242,10 @@ struct TransitRouteInfoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransitRouteInfoDefaultTypeInternal _TransitRouteInfo_default_instance_; PROTOBUF_CONSTEXPR Pronunciation::Pronunciation( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.alphabet_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_alphabet_)*/{} + , /*decltype(_impl_.has_value_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct PronunciationDefaultTypeInternal { PROTOBUF_CONSTEXPR PronunciationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -256,10 +257,11 @@ struct PronunciationDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PronunciationDefaultTypeInternal _Pronunciation_default_instance_; PROTOBUF_CONSTEXPR StreetName::StreetName( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.pronunciation_)*/nullptr - , /*decltype(_impl_.is_route_number_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.pronunciation_)*/nullptr + , /*decltype(_impl_.has_value_)*/{} + , /*decltype(_impl_.has_is_route_number_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct StreetNameDefaultTypeInternal { PROTOBUF_CONSTEXPR StreetNameDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -271,10 +273,11 @@ struct StreetNameDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StreetNameDefaultTypeInternal _StreetName_default_instance_; PROTOBUF_CONSTEXPR TurnLane::TurnLane( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.directions_mask_)*/0u - , /*decltype(_impl_.state_)*/0 - , /*decltype(_impl_.active_direction_)*/0u - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_directions_mask_)*/{} + , /*decltype(_impl_.has_state_)*/{} + , /*decltype(_impl_.has_active_direction_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TurnLaneDefaultTypeInternal { PROTOBUF_CONSTEXPR TurnLaneDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -286,9 +289,10 @@ struct TurnLaneDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TurnLaneDefaultTypeInternal _TurnLane_default_instance_; PROTOBUF_CONSTEXPR TaggedValue::TaggedValue( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.type_)*/0 - , /*decltype(_impl_._cached_size_)*/{}} {} + /*decltype(_impl_.has_value_)*/{} + , /*decltype(_impl_.has_type_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} struct TaggedValueDefaultTypeInternal { PROTOBUF_CONSTEXPR TaggedValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -368,69 +372,6 @@ constexpr Location_Type Location::Type_MIN; constexpr Location_Type Location::Type_MAX; constexpr int Location::Type_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -bool Location_PreferredSide_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Location_PreferredSide_strings[3] = {}; - -static const char Location_PreferredSide_names[] = - "either" - "opposite" - "same"; - -static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Location_PreferredSide_entries[] = { - { {Location_PreferredSide_names + 0, 6}, 0 }, - { {Location_PreferredSide_names + 6, 8}, 2 }, - { {Location_PreferredSide_names + 14, 4}, 1 }, -}; - -static const int Location_PreferredSide_entries_by_number[] = { - 0, // 0 -> either - 2, // 1 -> same - 1, // 2 -> opposite -}; - -const std::string& Location_PreferredSide_Name( - Location_PreferredSide value) { - static const bool dummy = - ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( - Location_PreferredSide_entries, - Location_PreferredSide_entries_by_number, - 3, Location_PreferredSide_strings); - (void) dummy; - int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( - Location_PreferredSide_entries, - Location_PreferredSide_entries_by_number, - 3, value); - return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : - Location_PreferredSide_strings[idx].get(); -} -bool Location_PreferredSide_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_PreferredSide* value) { - int int_value; - bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - Location_PreferredSide_entries, 3, name, &int_value); - if (success) { - *value = static_cast(int_value); - } - return success; -} -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -constexpr Location_PreferredSide Location::either; -constexpr Location_PreferredSide Location::same; -constexpr Location_PreferredSide Location::opposite; -constexpr Location_PreferredSide Location::PreferredSide_MIN; -constexpr Location_PreferredSide Location::PreferredSide_MAX; -constexpr int Location::PreferredSide_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) bool Location_SideOfStreet_IsValid(int value) { switch (value) { case 0: @@ -494,6 +435,69 @@ constexpr Location_SideOfStreet Location::SideOfStreet_MIN; constexpr Location_SideOfStreet Location::SideOfStreet_MAX; constexpr int Location::SideOfStreet_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool Location_PreferredSide_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Location_PreferredSide_strings[3] = {}; + +static const char Location_PreferredSide_names[] = + "either" + "opposite" + "same"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Location_PreferredSide_entries[] = { + { {Location_PreferredSide_names + 0, 6}, 0 }, + { {Location_PreferredSide_names + 6, 8}, 2 }, + { {Location_PreferredSide_names + 14, 4}, 1 }, +}; + +static const int Location_PreferredSide_entries_by_number[] = { + 0, // 0 -> either + 2, // 1 -> same + 1, // 2 -> opposite +}; + +const std::string& Location_PreferredSide_Name( + Location_PreferredSide value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Location_PreferredSide_entries, + Location_PreferredSide_entries_by_number, + 3, Location_PreferredSide_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Location_PreferredSide_entries, + Location_PreferredSide_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Location_PreferredSide_strings[idx].get(); +} +bool Location_PreferredSide_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_PreferredSide* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Location_PreferredSide_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr Location_PreferredSide Location::either; +constexpr Location_PreferredSide Location::same; +constexpr Location_PreferredSide Location::opposite; +constexpr Location_PreferredSide Location::PreferredSide_MIN; +constexpr Location_PreferredSide Location::PreferredSide_MAX; +constexpr int Location::PreferredSide_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) bool TransitPlatformInfo_Type_IsValid(int value) { switch (value) { case 0: @@ -689,8 +693,6 @@ bool TaggedValue_Type_IsValid(int value) { case 1: case 2: case 3: - case 4: - case 5: case 49: case 50: return true; @@ -699,14 +701,12 @@ bool TaggedValue_Type_IsValid(int value) { } } -static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TaggedValue_Type_strings[8] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TaggedValue_Type_strings[6] = {}; static const char TaggedValue_Type_names[] = "kBridge" "kBssInfo" "kLayer" - "kLevel" - "kLevelRef" "kNone" "kPronunciation" "kTunnel"; @@ -715,21 +715,17 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TaggedValue_Type_entri { {TaggedValue_Type_names + 0, 7}, 50 }, { {TaggedValue_Type_names + 7, 8}, 3 }, { {TaggedValue_Type_names + 15, 6}, 1 }, - { {TaggedValue_Type_names + 21, 6}, 4 }, - { {TaggedValue_Type_names + 27, 9}, 5 }, - { {TaggedValue_Type_names + 36, 5}, 0 }, - { {TaggedValue_Type_names + 41, 14}, 2 }, - { {TaggedValue_Type_names + 55, 7}, 49 }, + { {TaggedValue_Type_names + 21, 5}, 0 }, + { {TaggedValue_Type_names + 26, 14}, 2 }, + { {TaggedValue_Type_names + 40, 7}, 49 }, }; static const int TaggedValue_Type_entries_by_number[] = { - 5, // 0 -> kNone + 3, // 0 -> kNone 2, // 1 -> kLayer - 6, // 2 -> kPronunciation + 4, // 2 -> kPronunciation 1, // 3 -> kBssInfo - 3, // 4 -> kLevel - 4, // 5 -> kLevelRef - 7, // 49 -> kTunnel + 5, // 49 -> kTunnel 0, // 50 -> kBridge }; @@ -739,12 +735,12 @@ const std::string& TaggedValue_Type_Name( ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( TaggedValue_Type_entries, TaggedValue_Type_entries_by_number, - 8, TaggedValue_Type_strings); + 6, TaggedValue_Type_strings); (void) dummy; int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( TaggedValue_Type_entries, TaggedValue_Type_entries_by_number, - 8, value); + 6, value); return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : TaggedValue_Type_strings[idx].get(); } @@ -752,7 +748,7 @@ bool TaggedValue_Type_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TaggedValue_Type* value) { int int_value; bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( - TaggedValue_Type_entries, 8, name, &int_value); + TaggedValue_Type_entries, 6, name, &int_value); if (success) { *value = static_cast(int_value); } @@ -763,8 +759,6 @@ constexpr TaggedValue_Type TaggedValue::kNone; constexpr TaggedValue_Type TaggedValue::kLayer; constexpr TaggedValue_Type TaggedValue::kPronunciation; constexpr TaggedValue_Type TaggedValue::kBssInfo; -constexpr TaggedValue_Type TaggedValue::kLevel; -constexpr TaggedValue_Type TaggedValue::kLevelRef; constexpr TaggedValue_Type TaggedValue::kTunnel; constexpr TaggedValue_Type TaggedValue::kBridge; constexpr TaggedValue_Type TaggedValue::Type_MIN; @@ -1689,87 +1683,181 @@ std::string BoundingBox::GetTypeName() const { // =================================================================== -class SearchFilter::_Internal { +class Location_PathEdge::_Internal { public: + static const ::valhalla::LatLng& ll(const Location_PathEdge* msg); }; -SearchFilter::SearchFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena, +const ::valhalla::LatLng& +Location_PathEdge::_Internal::ll(const Location_PathEdge* msg) { + return *msg->_impl_.ll_; +} +Location_PathEdge::Location_PathEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.SearchFilter) + // @@protoc_insertion_point(arena_constructor:valhalla.Location.PathEdge) } -SearchFilter::SearchFilter(const SearchFilter& from) +Location_PathEdge::Location_PathEdge(const Location_PathEdge& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - SearchFilter* const _this = this; (void)_this; + Location_PathEdge* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.exclude_tunnel_){} - , decltype(_impl_.exclude_bridge_){} - , decltype(_impl_.exclude_ramp_){} - , decltype(_impl_.has_min_road_class_){} - , decltype(_impl_.has_max_road_class_){} - , decltype(_impl_.has_exclude_closures_){} + decltype(_impl_.names_){from._impl_.names_} + , decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_graph_id_){} + , decltype(_impl_.has_percent_along_){} + , decltype(_impl_.has_side_of_street_){} + , decltype(_impl_.has_distance_){} + , decltype(_impl_.has_minimum_reachability_){} + , decltype(_impl_.has_begin_node_){} + , decltype(_impl_.has_end_node_){} + , decltype(_impl_.has_outbound_reach_){} + , decltype(_impl_.has_inbound_reach_){} + , decltype(_impl_.has_heading_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&_impl_.exclude_tunnel_, &from._impl_.exclude_tunnel_, - static_cast(reinterpret_cast(&_impl_.exclude_ramp_) - - reinterpret_cast(&_impl_.exclude_tunnel_)) + sizeof(_impl_.exclude_ramp_)); - clear_has_has_min_road_class(); - switch (from.has_min_road_class_case()) { - case kMinRoadClass: { - _this->_internal_set_min_road_class(from._internal_min_road_class()); + if (from._internal_has_ll()) { + _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); + } + clear_has_has_graph_id(); + switch (from.has_graph_id_case()) { + case kGraphId: { + _this->_internal_set_graph_id(from._internal_graph_id()); break; } - case HAS_MIN_ROAD_CLASS_NOT_SET: { + case HAS_GRAPH_ID_NOT_SET: { break; } } - clear_has_has_max_road_class(); - switch (from.has_max_road_class_case()) { - case kMaxRoadClass: { - _this->_internal_set_max_road_class(from._internal_max_road_class()); + clear_has_has_percent_along(); + switch (from.has_percent_along_case()) { + case kPercentAlong: { + _this->_internal_set_percent_along(from._internal_percent_along()); break; } - case HAS_MAX_ROAD_CLASS_NOT_SET: { + case HAS_PERCENT_ALONG_NOT_SET: { break; } } - clear_has_has_exclude_closures(); - switch (from.has_exclude_closures_case()) { - case kExcludeClosures: { - _this->_internal_set_exclude_closures(from._internal_exclude_closures()); + clear_has_has_side_of_street(); + switch (from.has_side_of_street_case()) { + case kSideOfStreet: { + _this->_internal_set_side_of_street(from._internal_side_of_street()); break; } - case HAS_EXCLUDE_CLOSURES_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { + break; + } + } + clear_has_has_distance(); + switch (from.has_distance_case()) { + case kDistance: { + _this->_internal_set_distance(from._internal_distance()); + break; + } + case HAS_DISTANCE_NOT_SET: { + break; + } + } + clear_has_has_minimum_reachability(); + switch (from.has_minimum_reachability_case()) { + case kMinimumReachability: { + _this->_internal_set_minimum_reachability(from._internal_minimum_reachability()); + break; + } + case HAS_MINIMUM_REACHABILITY_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:valhalla.SearchFilter) + clear_has_has_begin_node(); + switch (from.has_begin_node_case()) { + case kBeginNode: { + _this->_internal_set_begin_node(from._internal_begin_node()); + break; + } + case HAS_BEGIN_NODE_NOT_SET: { + break; + } + } + clear_has_has_end_node(); + switch (from.has_end_node_case()) { + case kEndNode: { + _this->_internal_set_end_node(from._internal_end_node()); + break; + } + case HAS_END_NODE_NOT_SET: { + break; + } + } + clear_has_has_outbound_reach(); + switch (from.has_outbound_reach_case()) { + case kOutboundReach: { + _this->_internal_set_outbound_reach(from._internal_outbound_reach()); + break; + } + case HAS_OUTBOUND_REACH_NOT_SET: { + break; + } + } + clear_has_has_inbound_reach(); + switch (from.has_inbound_reach_case()) { + case kInboundReach: { + _this->_internal_set_inbound_reach(from._internal_inbound_reach()); + break; + } + case HAS_INBOUND_REACH_NOT_SET: { + break; + } + } + clear_has_has_heading(); + switch (from.has_heading_case()) { + case kHeading: { + _this->_internal_set_heading(from._internal_heading()); + break; + } + case HAS_HEADING_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.Location.PathEdge) } -inline void SearchFilter::SharedCtor( +inline void Location_PathEdge::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.exclude_tunnel_){false} - , decltype(_impl_.exclude_bridge_){false} - , decltype(_impl_.exclude_ramp_){false} - , decltype(_impl_.has_min_road_class_){} - , decltype(_impl_.has_max_road_class_){} - , decltype(_impl_.has_exclude_closures_){} + decltype(_impl_.names_){arena} + , decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_graph_id_){} + , decltype(_impl_.has_percent_along_){} + , decltype(_impl_.has_side_of_street_){} + , decltype(_impl_.has_distance_){} + , decltype(_impl_.has_minimum_reachability_){} + , decltype(_impl_.has_begin_node_){} + , decltype(_impl_.has_end_node_){} + , decltype(_impl_.has_outbound_reach_){} + , decltype(_impl_.has_inbound_reach_){} + , decltype(_impl_.has_heading_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; - clear_has_has_min_road_class(); - clear_has_has_max_road_class(); - clear_has_has_exclude_closures(); + clear_has_has_graph_id(); + clear_has_has_percent_along(); + clear_has_has_side_of_street(); + clear_has_has_distance(); + clear_has_has_minimum_reachability(); + clear_has_has_begin_node(); + clear_has_has_end_node(); + clear_has_has_outbound_reach(); + clear_has_has_inbound_reach(); + clear_has_has_heading(); } -SearchFilter::~SearchFilter() { - // @@protoc_insertion_point(destructor:valhalla.SearchFilter) +Location_PathEdge::~Location_PathEdge() { + // @@protoc_insertion_point(destructor:valhalla.Location.PathEdge) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; @@ -1777,137 +1865,321 @@ SearchFilter::~SearchFilter() { SharedDtor(); } -inline void SearchFilter::SharedDtor() { +inline void Location_PathEdge::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (has_has_min_road_class()) { - clear_has_min_road_class(); + _impl_.names_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.ll_; + if (has_has_graph_id()) { + clear_has_graph_id(); } - if (has_has_max_road_class()) { - clear_has_max_road_class(); + if (has_has_percent_along()) { + clear_has_percent_along(); } - if (has_has_exclude_closures()) { - clear_has_exclude_closures(); + if (has_has_side_of_street()) { + clear_has_side_of_street(); + } + if (has_has_distance()) { + clear_has_distance(); + } + if (has_has_minimum_reachability()) { + clear_has_minimum_reachability(); + } + if (has_has_begin_node()) { + clear_has_begin_node(); + } + if (has_has_end_node()) { + clear_has_end_node(); + } + if (has_has_outbound_reach()) { + clear_has_outbound_reach(); + } + if (has_has_inbound_reach()) { + clear_has_inbound_reach(); + } + if (has_has_heading()) { + clear_has_heading(); } } -void SearchFilter::SetCachedSize(int size) const { +void Location_PathEdge::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void SearchFilter::clear_has_min_road_class() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.SearchFilter) - switch (has_min_road_class_case()) { - case kMinRoadClass: { +void Location_PathEdge::clear_has_graph_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_graph_id_case()) { + case kGraphId: { // No need to clear break; } - case HAS_MIN_ROAD_CLASS_NOT_SET: { + case HAS_GRAPH_ID_NOT_SET: { break; } } - _impl_._oneof_case_[0] = HAS_MIN_ROAD_CLASS_NOT_SET; + _impl_._oneof_case_[0] = HAS_GRAPH_ID_NOT_SET; } -void SearchFilter::clear_has_max_road_class() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.SearchFilter) - switch (has_max_road_class_case()) { - case kMaxRoadClass: { +void Location_PathEdge::clear_has_percent_along() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_percent_along_case()) { + case kPercentAlong: { // No need to clear break; } - case HAS_MAX_ROAD_CLASS_NOT_SET: { + case HAS_PERCENT_ALONG_NOT_SET: { break; } } - _impl_._oneof_case_[1] = HAS_MAX_ROAD_CLASS_NOT_SET; + _impl_._oneof_case_[1] = HAS_PERCENT_ALONG_NOT_SET; } -void SearchFilter::clear_has_exclude_closures() { -// @@protoc_insertion_point(one_of_clear_start:valhalla.SearchFilter) - switch (has_exclude_closures_case()) { - case kExcludeClosures: { +void Location_PathEdge::clear_has_side_of_street() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_side_of_street_case()) { + case kSideOfStreet: { // No need to clear break; } - case HAS_EXCLUDE_CLOSURES_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_SIDE_OF_STREET_NOT_SET; +} + +void Location_PathEdge::clear_has_distance() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_distance_case()) { + case kDistance: { + // No need to clear + break; + } + case HAS_DISTANCE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_DISTANCE_NOT_SET; +} + +void Location_PathEdge::clear_has_minimum_reachability() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_minimum_reachability_case()) { + case kMinimumReachability: { + // No need to clear + break; + } + case HAS_MINIMUM_REACHABILITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_MINIMUM_REACHABILITY_NOT_SET; +} + +void Location_PathEdge::clear_has_begin_node() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_begin_node_case()) { + case kBeginNode: { + // No need to clear + break; + } + case HAS_BEGIN_NODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_BEGIN_NODE_NOT_SET; +} + +void Location_PathEdge::clear_has_end_node() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_end_node_case()) { + case kEndNode: { + // No need to clear + break; + } + case HAS_END_NODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_END_NODE_NOT_SET; +} + +void Location_PathEdge::clear_has_outbound_reach() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_outbound_reach_case()) { + case kOutboundReach: { + // No need to clear + break; + } + case HAS_OUTBOUND_REACH_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_OUTBOUND_REACH_NOT_SET; +} + +void Location_PathEdge::clear_has_inbound_reach() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_inbound_reach_case()) { + case kInboundReach: { + // No need to clear + break; + } + case HAS_INBOUND_REACH_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_INBOUND_REACH_NOT_SET; +} + +void Location_PathEdge::clear_has_heading() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.PathEdge) + switch (has_heading_case()) { + case kHeading: { + // No need to clear + break; + } + case HAS_HEADING_NOT_SET: { break; } } - _impl_._oneof_case_[2] = HAS_EXCLUDE_CLOSURES_NOT_SET; + _impl_._oneof_case_[9] = HAS_HEADING_NOT_SET; } -void SearchFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.SearchFilter) +void Location_PathEdge::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.Location.PathEdge) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.exclude_tunnel_, 0, static_cast( - reinterpret_cast(&_impl_.exclude_ramp_) - - reinterpret_cast(&_impl_.exclude_tunnel_)) + sizeof(_impl_.exclude_ramp_)); - clear_has_min_road_class(); - clear_has_max_road_class(); - clear_has_exclude_closures(); + _impl_.names_.Clear(); + if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { + delete _impl_.ll_; + } + _impl_.ll_ = nullptr; + clear_has_graph_id(); + clear_has_percent_along(); + clear_has_side_of_street(); + clear_has_distance(); + clear_has_minimum_reachability(); + clear_has_begin_node(); + clear_has_end_node(); + clear_has_outbound_reach(); + clear_has_inbound_reach(); + clear_has_heading(); _internal_metadata_.Clear(); } -const char* SearchFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +const char* Location_PathEdge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // .valhalla.RoadClass min_road_class = 1; + // uint64 graph_id = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_graph_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); - _internal_set_min_road_class(static_cast<::valhalla::RoadClass>(val)); } else goto handle_unusual; continue; - // .valhalla.RoadClass max_road_class = 2; + // double percent_along = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_max_road_class(static_cast<::valhalla::RoadClass>(val)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { + _internal_set_percent_along(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(double); } else goto handle_unusual; continue; - // bool exclude_tunnel = 3; + // .valhalla.LatLng ll = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.exclude_tunnel_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_ll(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // bool exclude_bridge = 4; + // .valhalla.Location.SideOfStreet side_of_street = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _impl_.exclude_bridge_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); + _internal_set_side_of_street(static_cast<::valhalla::Location_SideOfStreet>(val)); } else goto handle_unusual; continue; - // bool exclude_ramp = 5; + // double distance = 5; case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.exclude_ramp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) { + _internal_set_distance(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(double); } else goto handle_unusual; continue; - // bool exclude_closures = 6; + // int32 minimum_reachability = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _internal_set_exclude_closures(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + _internal_set_minimum_reachability(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool begin_node = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _internal_set_begin_node(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool end_node = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _internal_set_end_node(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated string names = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_names(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); + } else + goto handle_unusual; + continue; + // int32 outbound_reach = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _internal_set_outbound_reach(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 inbound_reach = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _internal_set_inbound_reach(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; + // float heading = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 109)) { + _internal_set_heading(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1931,110 +2203,219 @@ const char* SearchFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* #undef CHK_ } -uint8_t* SearchFilter::_InternalSerialize( +uint8_t* Location_PathEdge::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.SearchFilter) + // @@protoc_insertion_point(serialize_to_array_start:valhalla.Location.PathEdge) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // .valhalla.RoadClass min_road_class = 1; - if (_internal_has_min_road_class()) { + // uint64 graph_id = 1; + if (_internal_has_graph_id()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 1, this->_internal_min_road_class(), target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_graph_id(), target); } - // .valhalla.RoadClass max_road_class = 2; - if (_internal_has_max_road_class()) { + // double percent_along = 2; + if (_internal_has_percent_along()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_percent_along(), target); + } + + // .valhalla.LatLng ll = 3; + if (this->_internal_has_ll()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::ll(this), + _Internal::ll(this).GetCachedSize(), target, stream); + } + + // .valhalla.Location.SideOfStreet side_of_street = 4; + if (_internal_has_side_of_street()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 2, this->_internal_max_road_class(), target); + 4, this->_internal_side_of_street(), target); } - // bool exclude_tunnel = 3; - if (this->_internal_exclude_tunnel() != 0) { + // double distance = 5; + if (_internal_has_distance()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_exclude_tunnel(), target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_distance(), target); } - // bool exclude_bridge = 4; - if (this->_internal_exclude_bridge() != 0) { + // int32 minimum_reachability = 6; + if (_internal_has_minimum_reachability()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_exclude_bridge(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_minimum_reachability(), target); } - // bool exclude_ramp = 5; - if (this->_internal_exclude_ramp() != 0) { + // bool begin_node = 7; + if (_internal_has_begin_node()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_exclude_ramp(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_begin_node(), target); } - // bool exclude_closures = 6; - if (_internal_has_exclude_closures()) { + // bool end_node = 8; + if (_internal_has_end_node()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_exclude_closures(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_end_node(), target); + } + + // repeated string names = 10; + for (int i = 0, n = this->_internal_names_size(); i < n; i++) { + const auto& s = this->_internal_names(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.PathEdge.names"); + target = stream->WriteString(10, s, target); + } + + // int32 outbound_reach = 11; + if (_internal_has_outbound_reach()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_outbound_reach(), target); + } + + // int32 inbound_reach = 12; + if (_internal_has_inbound_reach()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_inbound_reach(), target); + } + + // float heading = 13; + if (_internal_has_heading()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(13, this->_internal_heading(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.SearchFilter) + // @@protoc_insertion_point(serialize_to_array_end:valhalla.Location.PathEdge) return target; } -size_t SearchFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.SearchFilter) +size_t Location_PathEdge::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:valhalla.Location.PathEdge) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bool exclude_tunnel = 3; - if (this->_internal_exclude_tunnel() != 0) { - total_size += 1 + 1; + // repeated string names = 10; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.names_.size()); + for (int i = 0, n = _impl_.names_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.names_.Get(i)); } - // bool exclude_bridge = 4; - if (this->_internal_exclude_bridge() != 0) { - total_size += 1 + 1; + // .valhalla.LatLng ll = 3; + if (this->_internal_has_ll()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.ll_); } - // bool exclude_ramp = 5; - if (this->_internal_exclude_ramp() != 0) { - total_size += 1 + 1; + switch (has_graph_id_case()) { + // uint64 graph_id = 1; + case kGraphId: { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_graph_id()); + break; + } + case HAS_GRAPH_ID_NOT_SET: { + break; + } } - - switch (has_min_road_class_case()) { - // .valhalla.RoadClass min_road_class = 1; - case kMinRoadClass: { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_min_road_class()); + switch (has_percent_along_case()) { + // double percent_along = 2; + case kPercentAlong: { + total_size += 1 + 8; break; } - case HAS_MIN_ROAD_CLASS_NOT_SET: { + case HAS_PERCENT_ALONG_NOT_SET: { break; } } - switch (has_max_road_class_case()) { - // .valhalla.RoadClass max_road_class = 2; - case kMaxRoadClass: { + switch (has_side_of_street_case()) { + // .valhalla.Location.SideOfStreet side_of_street = 4; + case kSideOfStreet: { total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_max_road_class()); + ::_pbi::WireFormatLite::EnumSize(this->_internal_side_of_street()); break; } - case HAS_MAX_ROAD_CLASS_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { break; } } - switch (has_exclude_closures_case()) { - // bool exclude_closures = 6; - case kExcludeClosures: { + switch (has_distance_case()) { + // double distance = 5; + case kDistance: { + total_size += 1 + 8; + break; + } + case HAS_DISTANCE_NOT_SET: { + break; + } + } + switch (has_minimum_reachability_case()) { + // int32 minimum_reachability = 6; + case kMinimumReachability: { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_minimum_reachability()); + break; + } + case HAS_MINIMUM_REACHABILITY_NOT_SET: { + break; + } + } + switch (has_begin_node_case()) { + // bool begin_node = 7; + case kBeginNode: { total_size += 1 + 1; break; } - case HAS_EXCLUDE_CLOSURES_NOT_SET: { + case HAS_BEGIN_NODE_NOT_SET: { + break; + } + } + switch (has_end_node_case()) { + // bool end_node = 8; + case kEndNode: { + total_size += 1 + 1; + break; + } + case HAS_END_NODE_NOT_SET: { + break; + } + } + switch (has_outbound_reach_case()) { + // int32 outbound_reach = 11; + case kOutboundReach: { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_outbound_reach()); + break; + } + case HAS_OUTBOUND_REACH_NOT_SET: { + break; + } + } + switch (has_inbound_reach_case()) { + // int32 inbound_reach = 12; + case kInboundReach: { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_inbound_reach()); + break; + } + case HAS_INBOUND_REACH_NOT_SET: { + break; + } + } + switch (has_heading_case()) { + // float heading = 13; + case kHeading: { + total_size += 1 + 4; + break; + } + case HAS_HEADING_NOT_SET: { break; } } @@ -2046,157 +2427,273 @@ size_t SearchFilter::ByteSizeLong() const { return total_size; } -void SearchFilter::CheckTypeAndMergeFrom( +void Location_PathEdge::CheckTypeAndMergeFrom( const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( + MergeFrom(*::_pbi::DownCast( &from)); } -void SearchFilter::MergeFrom(const SearchFilter& from) { - SearchFilter* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.SearchFilter) +void Location_PathEdge::MergeFrom(const Location_PathEdge& from) { + Location_PathEdge* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Location.PathEdge) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_exclude_tunnel() != 0) { - _this->_internal_set_exclude_tunnel(from._internal_exclude_tunnel()); + _this->_impl_.names_.MergeFrom(from._impl_.names_); + if (from._internal_has_ll()) { + _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( + from._internal_ll()); } - if (from._internal_exclude_bridge() != 0) { - _this->_internal_set_exclude_bridge(from._internal_exclude_bridge()); + switch (from.has_graph_id_case()) { + case kGraphId: { + _this->_internal_set_graph_id(from._internal_graph_id()); + break; + } + case HAS_GRAPH_ID_NOT_SET: { + break; + } } - if (from._internal_exclude_ramp() != 0) { - _this->_internal_set_exclude_ramp(from._internal_exclude_ramp()); + switch (from.has_percent_along_case()) { + case kPercentAlong: { + _this->_internal_set_percent_along(from._internal_percent_along()); + break; + } + case HAS_PERCENT_ALONG_NOT_SET: { + break; + } } - switch (from.has_min_road_class_case()) { - case kMinRoadClass: { - _this->_internal_set_min_road_class(from._internal_min_road_class()); + switch (from.has_side_of_street_case()) { + case kSideOfStreet: { + _this->_internal_set_side_of_street(from._internal_side_of_street()); break; } - case HAS_MIN_ROAD_CLASS_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { break; } } - switch (from.has_max_road_class_case()) { - case kMaxRoadClass: { - _this->_internal_set_max_road_class(from._internal_max_road_class()); + switch (from.has_distance_case()) { + case kDistance: { + _this->_internal_set_distance(from._internal_distance()); break; } - case HAS_MAX_ROAD_CLASS_NOT_SET: { + case HAS_DISTANCE_NOT_SET: { break; } } - switch (from.has_exclude_closures_case()) { - case kExcludeClosures: { - _this->_internal_set_exclude_closures(from._internal_exclude_closures()); + switch (from.has_minimum_reachability_case()) { + case kMinimumReachability: { + _this->_internal_set_minimum_reachability(from._internal_minimum_reachability()); break; } - case HAS_EXCLUDE_CLOSURES_NOT_SET: { + case HAS_MINIMUM_REACHABILITY_NOT_SET: { + break; + } + } + switch (from.has_begin_node_case()) { + case kBeginNode: { + _this->_internal_set_begin_node(from._internal_begin_node()); + break; + } + case HAS_BEGIN_NODE_NOT_SET: { + break; + } + } + switch (from.has_end_node_case()) { + case kEndNode: { + _this->_internal_set_end_node(from._internal_end_node()); + break; + } + case HAS_END_NODE_NOT_SET: { + break; + } + } + switch (from.has_outbound_reach_case()) { + case kOutboundReach: { + _this->_internal_set_outbound_reach(from._internal_outbound_reach()); + break; + } + case HAS_OUTBOUND_REACH_NOT_SET: { + break; + } + } + switch (from.has_inbound_reach_case()) { + case kInboundReach: { + _this->_internal_set_inbound_reach(from._internal_inbound_reach()); + break; + } + case HAS_INBOUND_REACH_NOT_SET: { + break; + } + } + switch (from.has_heading_case()) { + case kHeading: { + _this->_internal_set_heading(from._internal_heading()); + break; + } + case HAS_HEADING_NOT_SET: { break; } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } -void SearchFilter::CopyFrom(const SearchFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.SearchFilter) +void Location_PathEdge::CopyFrom(const Location_PathEdge& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Location.PathEdge) if (&from == this) return; Clear(); MergeFrom(from); } -bool SearchFilter::IsInitialized() const { +bool Location_PathEdge::IsInitialized() const { return true; } -void SearchFilter::InternalSwap(SearchFilter* other) { +void Location_PathEdge::InternalSwap(Location_PathEdge* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(SearchFilter, _impl_.exclude_ramp_) - + sizeof(SearchFilter::_impl_.exclude_ramp_) - - PROTOBUF_FIELD_OFFSET(SearchFilter, _impl_.exclude_tunnel_)>( - reinterpret_cast(&_impl_.exclude_tunnel_), - reinterpret_cast(&other->_impl_.exclude_tunnel_)); - swap(_impl_.has_min_road_class_, other->_impl_.has_min_road_class_); - swap(_impl_.has_max_road_class_, other->_impl_.has_max_road_class_); - swap(_impl_.has_exclude_closures_, other->_impl_.has_exclude_closures_); + _impl_.names_.InternalSwap(&other->_impl_.names_); + swap(_impl_.ll_, other->_impl_.ll_); + swap(_impl_.has_graph_id_, other->_impl_.has_graph_id_); + swap(_impl_.has_percent_along_, other->_impl_.has_percent_along_); + swap(_impl_.has_side_of_street_, other->_impl_.has_side_of_street_); + swap(_impl_.has_distance_, other->_impl_.has_distance_); + swap(_impl_.has_minimum_reachability_, other->_impl_.has_minimum_reachability_); + swap(_impl_.has_begin_node_, other->_impl_.has_begin_node_); + swap(_impl_.has_end_node_, other->_impl_.has_end_node_); + swap(_impl_.has_outbound_reach_, other->_impl_.has_outbound_reach_); + swap(_impl_.has_inbound_reach_, other->_impl_.has_inbound_reach_); + swap(_impl_.has_heading_, other->_impl_.has_heading_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); + swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); + swap(_impl_._oneof_case_[9], other->_impl_._oneof_case_[9]); } -std::string SearchFilter::GetTypeName() const { - return "valhalla.SearchFilter"; +std::string Location_PathEdge::GetTypeName() const { + return "valhalla.Location.PathEdge"; } // =================================================================== -class PathEdge::_Internal { +class Location_SearchFilter::_Internal { public: - static const ::valhalla::LatLng& ll(const PathEdge* msg); }; -const ::valhalla::LatLng& -PathEdge::_Internal::ll(const PathEdge* msg) { - return *msg->_impl_.ll_; -} -PathEdge::PathEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, +Location_SearchFilter::Location_SearchFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.PathEdge) + // @@protoc_insertion_point(arena_constructor:valhalla.Location.SearchFilter) } -PathEdge::PathEdge(const PathEdge& from) +Location_SearchFilter::Location_SearchFilter(const Location_SearchFilter& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - PathEdge* const _this = this; (void)_this; + Location_SearchFilter* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.names_){from._impl_.names_} - , decltype(_impl_.ll_){nullptr} - , decltype(_impl_.graph_id_){} - , decltype(_impl_.percent_along_){} - , decltype(_impl_.distance_){} - , decltype(_impl_.side_of_street_){} - , decltype(_impl_.begin_node_){} - , decltype(_impl_.end_node_){} - , decltype(_impl_.outbound_reach_){} - , decltype(_impl_.inbound_reach_){} - , decltype(_impl_.heading_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_min_road_class_){} + , decltype(_impl_.has_max_road_class_){} + , decltype(_impl_.has_exclude_tunnel_){} + , decltype(_impl_.has_exclude_bridge_){} + , decltype(_impl_.has_exclude_ramp_){} + , decltype(_impl_.has_exclude_closures_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - if (from._internal_has_ll()) { - _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); + clear_has_has_min_road_class(); + switch (from.has_min_road_class_case()) { + case kMinRoadClass: { + _this->_internal_set_min_road_class(from._internal_min_road_class()); + break; + } + case HAS_MIN_ROAD_CLASS_NOT_SET: { + break; + } + } + clear_has_has_max_road_class(); + switch (from.has_max_road_class_case()) { + case kMaxRoadClass: { + _this->_internal_set_max_road_class(from._internal_max_road_class()); + break; + } + case HAS_MAX_ROAD_CLASS_NOT_SET: { + break; + } + } + clear_has_has_exclude_tunnel(); + switch (from.has_exclude_tunnel_case()) { + case kExcludeTunnel: { + _this->_internal_set_exclude_tunnel(from._internal_exclude_tunnel()); + break; + } + case HAS_EXCLUDE_TUNNEL_NOT_SET: { + break; + } + } + clear_has_has_exclude_bridge(); + switch (from.has_exclude_bridge_case()) { + case kExcludeBridge: { + _this->_internal_set_exclude_bridge(from._internal_exclude_bridge()); + break; + } + case HAS_EXCLUDE_BRIDGE_NOT_SET: { + break; + } + } + clear_has_has_exclude_ramp(); + switch (from.has_exclude_ramp_case()) { + case kExcludeRamp: { + _this->_internal_set_exclude_ramp(from._internal_exclude_ramp()); + break; + } + case HAS_EXCLUDE_RAMP_NOT_SET: { + break; + } + } + clear_has_has_exclude_closures(); + switch (from.has_exclude_closures_case()) { + case kExcludeClosures: { + _this->_internal_set_exclude_closures(from._internal_exclude_closures()); + break; + } + case HAS_EXCLUDE_CLOSURES_NOT_SET: { + break; + } } - ::memcpy(&_impl_.graph_id_, &from._impl_.graph_id_, - static_cast(reinterpret_cast(&_impl_.heading_) - - reinterpret_cast(&_impl_.graph_id_)) + sizeof(_impl_.heading_)); - // @@protoc_insertion_point(copy_constructor:valhalla.PathEdge) + // @@protoc_insertion_point(copy_constructor:valhalla.Location.SearchFilter) } -inline void PathEdge::SharedCtor( +inline void Location_SearchFilter::SharedCtor( ::_pb::Arena* arena, bool is_message_owned) { (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.names_){arena} - , decltype(_impl_.ll_){nullptr} - , decltype(_impl_.graph_id_){uint64_t{0u}} - , decltype(_impl_.percent_along_){0} - , decltype(_impl_.distance_){0} - , decltype(_impl_.side_of_street_){0} - , decltype(_impl_.begin_node_){false} - , decltype(_impl_.end_node_){false} - , decltype(_impl_.outbound_reach_){0} - , decltype(_impl_.inbound_reach_){0} - , decltype(_impl_.heading_){0} + decltype(_impl_.has_min_road_class_){} + , decltype(_impl_.has_max_road_class_){} + , decltype(_impl_.has_exclude_tunnel_){} + , decltype(_impl_.has_exclude_bridge_){} + , decltype(_impl_.has_exclude_ramp_){} + , decltype(_impl_.has_exclude_closures_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_min_road_class(); + clear_has_has_max_road_class(); + clear_has_has_exclude_tunnel(); + clear_has_has_exclude_bridge(); + clear_has_has_exclude_ramp(); + clear_has_has_exclude_closures(); } -PathEdge::~PathEdge() { - // @@protoc_insertion_point(destructor:valhalla.PathEdge) +Location_SearchFilter::~Location_SearchFilter() { + // @@protoc_insertion_point(destructor:valhalla.Location.SearchFilter) if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; @@ -2204,135 +2701,188 @@ PathEdge::~PathEdge() { SharedDtor(); } -inline void PathEdge::SharedDtor() { +inline void Location_SearchFilter::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.names_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.ll_; + if (has_has_min_road_class()) { + clear_has_min_road_class(); + } + if (has_has_max_road_class()) { + clear_has_max_road_class(); + } + if (has_has_exclude_tunnel()) { + clear_has_exclude_tunnel(); + } + if (has_has_exclude_bridge()) { + clear_has_exclude_bridge(); + } + if (has_has_exclude_ramp()) { + clear_has_exclude_ramp(); + } + if (has_has_exclude_closures()) { + clear_has_exclude_closures(); + } } -void PathEdge::SetCachedSize(int size) const { +void Location_SearchFilter::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void PathEdge::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.PathEdge) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; +void Location_SearchFilter::clear_has_min_road_class() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_min_road_class_case()) { + case kMinRoadClass: { + // No need to clear + break; + } + case HAS_MIN_ROAD_CLASS_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_MIN_ROAD_CLASS_NOT_SET; +} - _impl_.names_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { - delete _impl_.ll_; +void Location_SearchFilter::clear_has_max_road_class() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_max_road_class_case()) { + case kMaxRoadClass: { + // No need to clear + break; + } + case HAS_MAX_ROAD_CLASS_NOT_SET: { + break; + } } - _impl_.ll_ = nullptr; - ::memset(&_impl_.graph_id_, 0, static_cast( - reinterpret_cast(&_impl_.heading_) - - reinterpret_cast(&_impl_.graph_id_)) + sizeof(_impl_.heading_)); - _internal_metadata_.Clear(); + _impl_._oneof_case_[1] = HAS_MAX_ROAD_CLASS_NOT_SET; } -const char* PathEdge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // uint64 graph_id = 1; +void Location_SearchFilter::clear_has_exclude_tunnel() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_exclude_tunnel_case()) { + case kExcludeTunnel: { + // No need to clear + break; + } + case HAS_EXCLUDE_TUNNEL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_EXCLUDE_TUNNEL_NOT_SET; +} + +void Location_SearchFilter::clear_has_exclude_bridge() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_exclude_bridge_case()) { + case kExcludeBridge: { + // No need to clear + break; + } + case HAS_EXCLUDE_BRIDGE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_EXCLUDE_BRIDGE_NOT_SET; +} + +void Location_SearchFilter::clear_has_exclude_ramp() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_exclude_ramp_case()) { + case kExcludeRamp: { + // No need to clear + break; + } + case HAS_EXCLUDE_RAMP_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_EXCLUDE_RAMP_NOT_SET; +} + +void Location_SearchFilter::clear_has_exclude_closures() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location.SearchFilter) + switch (has_exclude_closures_case()) { + case kExcludeClosures: { + // No need to clear + break; + } + case HAS_EXCLUDE_CLOSURES_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_EXCLUDE_CLOSURES_NOT_SET; +} + + +void Location_SearchFilter::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.Location.SearchFilter) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_has_min_road_class(); + clear_has_max_road_class(); + clear_has_exclude_tunnel(); + clear_has_exclude_bridge(); + clear_has_exclude_ramp(); + clear_has_exclude_closures(); + _internal_metadata_.Clear(); +} + +const char* Location_SearchFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .valhalla.RoadClass min_road_class = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.graph_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); + _internal_set_min_road_class(static_cast<::valhalla::RoadClass>(val)); } else goto handle_unusual; continue; - // double percent_along = 2; + // .valhalla.RoadClass max_road_class = 2; case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { - _impl_.percent_along_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_max_road_class(static_cast<::valhalla::RoadClass>(val)); } else goto handle_unusual; continue; - // .valhalla.LatLng ll = 3; + // bool exclude_tunnel = 3; case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_ll(), ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _internal_set_exclude_tunnel(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // .valhalla.Location.SideOfStreet side_of_street = 4; + // bool exclude_bridge = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_exclude_bridge(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); - _internal_set_side_of_street(static_cast<::valhalla::Location_SideOfStreet>(val)); } else goto handle_unusual; continue; - // double distance = 5; + // bool exclude_ramp = 5; case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 41)) { - _impl_.distance_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // bool begin_node = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.begin_node_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bool end_node = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.end_node_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // repeated string names = 10; - case 10: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_names(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, nullptr)); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); - } else - goto handle_unusual; - continue; - // int32 outbound_reach = 11; - case 11: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.outbound_reach_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _internal_set_exclude_ramp(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // int32 inbound_reach = 12; - case 12: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { - _impl_.inbound_reach_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + // bool exclude_closures = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _internal_set_exclude_closures(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // float heading = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 109)) { - _impl_.heading_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else - goto handle_unusual; - continue; default: goto handle_unusual; } // switch @@ -2356,796 +2906,444 @@ const char* PathEdge::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) #undef CHK_ } -uint8_t* PathEdge::_InternalSerialize( +uint8_t* Location_SearchFilter::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.PathEdge) + // @@protoc_insertion_point(serialize_to_array_start:valhalla.Location.SearchFilter) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // uint64 graph_id = 1; - if (this->_internal_graph_id() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_graph_id(), target); - } - - // double percent_along = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_percent_along = this->_internal_percent_along(); - uint64_t raw_percent_along; - memcpy(&raw_percent_along, &tmp_percent_along, sizeof(tmp_percent_along)); - if (raw_percent_along != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_percent_along(), target); - } - - // .valhalla.LatLng ll = 3; - if (this->_internal_has_ll()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(3, _Internal::ll(this), - _Internal::ll(this).GetCachedSize(), target, stream); - } - - // .valhalla.Location.SideOfStreet side_of_street = 4; - if (this->_internal_side_of_street() != 0) { + // .valhalla.RoadClass min_road_class = 1; + if (_internal_has_min_road_class()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 4, this->_internal_side_of_street(), target); - } - - // double distance = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance = this->_internal_distance(); - uint64_t raw_distance; - memcpy(&raw_distance, &tmp_distance, sizeof(tmp_distance)); - if (raw_distance != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_distance(), target); + 1, this->_internal_min_road_class(), target); } - // bool begin_node = 7; - if (this->_internal_begin_node() != 0) { + // .valhalla.RoadClass max_road_class = 2; + if (_internal_has_max_road_class()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_begin_node(), target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_max_road_class(), target); } - // bool end_node = 8; - if (this->_internal_end_node() != 0) { + // bool exclude_tunnel = 3; + if (_internal_has_exclude_tunnel()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_end_node(), target); - } - - // repeated string names = 10; - for (int i = 0, n = this->_internal_names_size(); i < n; i++) { - const auto& s = this->_internal_names(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "valhalla.PathEdge.names"); - target = stream->WriteString(10, s, target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_exclude_tunnel(), target); } - // int32 outbound_reach = 11; - if (this->_internal_outbound_reach() != 0) { + // bool exclude_bridge = 4; + if (_internal_has_exclude_bridge()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_outbound_reach(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_exclude_bridge(), target); } - // int32 inbound_reach = 12; - if (this->_internal_inbound_reach() != 0) { + // bool exclude_ramp = 5; + if (_internal_has_exclude_ramp()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_inbound_reach(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_exclude_ramp(), target); } - // float heading = 13; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_heading = this->_internal_heading(); - uint32_t raw_heading; - memcpy(&raw_heading, &tmp_heading, sizeof(tmp_heading)); - if (raw_heading != 0) { + // bool exclude_closures = 6; + if (_internal_has_exclude_closures()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray(13, this->_internal_heading(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_exclude_closures(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.PathEdge) + // @@protoc_insertion_point(serialize_to_array_end:valhalla.Location.SearchFilter) return target; } -size_t PathEdge::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.PathEdge) +size_t Location_SearchFilter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:valhalla.Location.SearchFilter) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated string names = 10; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.names_.size()); - for (int i = 0, n = _impl_.names_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - _impl_.names_.Get(i)); - } - - // .valhalla.LatLng ll = 3; - if (this->_internal_has_ll()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.ll_); + switch (has_min_road_class_case()) { + // .valhalla.RoadClass min_road_class = 1; + case kMinRoadClass: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_min_road_class()); + break; + } + case HAS_MIN_ROAD_CLASS_NOT_SET: { + break; + } } - - // uint64 graph_id = 1; - if (this->_internal_graph_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_graph_id()); + switch (has_max_road_class_case()) { + // .valhalla.RoadClass max_road_class = 2; + case kMaxRoadClass: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_max_road_class()); + break; + } + case HAS_MAX_ROAD_CLASS_NOT_SET: { + break; + } } - - // double percent_along = 2; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_percent_along = this->_internal_percent_along(); - uint64_t raw_percent_along; - memcpy(&raw_percent_along, &tmp_percent_along, sizeof(tmp_percent_along)); - if (raw_percent_along != 0) { - total_size += 1 + 8; + switch (has_exclude_tunnel_case()) { + // bool exclude_tunnel = 3; + case kExcludeTunnel: { + total_size += 1 + 1; + break; + } + case HAS_EXCLUDE_TUNNEL_NOT_SET: { + break; + } } - - // double distance = 5; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance = this->_internal_distance(); - uint64_t raw_distance; - memcpy(&raw_distance, &tmp_distance, sizeof(tmp_distance)); - if (raw_distance != 0) { - total_size += 1 + 8; + switch (has_exclude_bridge_case()) { + // bool exclude_bridge = 4; + case kExcludeBridge: { + total_size += 1 + 1; + break; + } + case HAS_EXCLUDE_BRIDGE_NOT_SET: { + break; + } } - - // .valhalla.Location.SideOfStreet side_of_street = 4; - if (this->_internal_side_of_street() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_side_of_street()); + switch (has_exclude_ramp_case()) { + // bool exclude_ramp = 5; + case kExcludeRamp: { + total_size += 1 + 1; + break; + } + case HAS_EXCLUDE_RAMP_NOT_SET: { + break; + } } - - // bool begin_node = 7; - if (this->_internal_begin_node() != 0) { - total_size += 1 + 1; + switch (has_exclude_closures_case()) { + // bool exclude_closures = 6; + case kExcludeClosures: { + total_size += 1 + 1; + break; + } + case HAS_EXCLUDE_CLOSURES_NOT_SET: { + break; + } } - - // bool end_node = 8; - if (this->_internal_end_node() != 0) { - total_size += 1 + 1; - } - - // int32 outbound_reach = 11; - if (this->_internal_outbound_reach() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_outbound_reach()); - } - - // int32 inbound_reach = 12; - if (this->_internal_inbound_reach() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_inbound_reach()); - } - - // float heading = 13; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_heading = this->_internal_heading(); - uint32_t raw_heading; - memcpy(&raw_heading, &tmp_heading, sizeof(tmp_heading)); - if (raw_heading != 0) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } int cached_size = ::_pbi::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void PathEdge::CheckTypeAndMergeFrom( +void Location_SearchFilter::CheckTypeAndMergeFrom( const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( + MergeFrom(*::_pbi::DownCast( &from)); } -void PathEdge::MergeFrom(const PathEdge& from) { - PathEdge* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.PathEdge) +void Location_SearchFilter::MergeFrom(const Location_SearchFilter& from) { + Location_SearchFilter* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Location.SearchFilter) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.names_.MergeFrom(from._impl_.names_); - if (from._internal_has_ll()) { - _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( - from._internal_ll()); - } - if (from._internal_graph_id() != 0) { - _this->_internal_set_graph_id(from._internal_graph_id()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_percent_along = from._internal_percent_along(); - uint64_t raw_percent_along; - memcpy(&raw_percent_along, &tmp_percent_along, sizeof(tmp_percent_along)); - if (raw_percent_along != 0) { - _this->_internal_set_percent_along(from._internal_percent_along()); - } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance = from._internal_distance(); - uint64_t raw_distance; - memcpy(&raw_distance, &tmp_distance, sizeof(tmp_distance)); - if (raw_distance != 0) { - _this->_internal_set_distance(from._internal_distance()); - } - if (from._internal_side_of_street() != 0) { - _this->_internal_set_side_of_street(from._internal_side_of_street()); + switch (from.has_min_road_class_case()) { + case kMinRoadClass: { + _this->_internal_set_min_road_class(from._internal_min_road_class()); + break; + } + case HAS_MIN_ROAD_CLASS_NOT_SET: { + break; + } } - if (from._internal_begin_node() != 0) { - _this->_internal_set_begin_node(from._internal_begin_node()); + switch (from.has_max_road_class_case()) { + case kMaxRoadClass: { + _this->_internal_set_max_road_class(from._internal_max_road_class()); + break; + } + case HAS_MAX_ROAD_CLASS_NOT_SET: { + break; + } } - if (from._internal_end_node() != 0) { - _this->_internal_set_end_node(from._internal_end_node()); + switch (from.has_exclude_tunnel_case()) { + case kExcludeTunnel: { + _this->_internal_set_exclude_tunnel(from._internal_exclude_tunnel()); + break; + } + case HAS_EXCLUDE_TUNNEL_NOT_SET: { + break; + } } - if (from._internal_outbound_reach() != 0) { - _this->_internal_set_outbound_reach(from._internal_outbound_reach()); + switch (from.has_exclude_bridge_case()) { + case kExcludeBridge: { + _this->_internal_set_exclude_bridge(from._internal_exclude_bridge()); + break; + } + case HAS_EXCLUDE_BRIDGE_NOT_SET: { + break; + } } - if (from._internal_inbound_reach() != 0) { - _this->_internal_set_inbound_reach(from._internal_inbound_reach()); + switch (from.has_exclude_ramp_case()) { + case kExcludeRamp: { + _this->_internal_set_exclude_ramp(from._internal_exclude_ramp()); + break; + } + case HAS_EXCLUDE_RAMP_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_heading = from._internal_heading(); - uint32_t raw_heading; - memcpy(&raw_heading, &tmp_heading, sizeof(tmp_heading)); - if (raw_heading != 0) { - _this->_internal_set_heading(from._internal_heading()); + switch (from.has_exclude_closures_case()) { + case kExcludeClosures: { + _this->_internal_set_exclude_closures(from._internal_exclude_closures()); + break; + } + case HAS_EXCLUDE_CLOSURES_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } -void PathEdge::CopyFrom(const PathEdge& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.PathEdge) +void Location_SearchFilter::CopyFrom(const Location_SearchFilter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Location.SearchFilter) if (&from == this) return; Clear(); MergeFrom(from); } -bool PathEdge::IsInitialized() const { +bool Location_SearchFilter::IsInitialized() const { return true; } -void PathEdge::InternalSwap(PathEdge* other) { +void Location_SearchFilter::InternalSwap(Location_SearchFilter* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.names_.InternalSwap(&other->_impl_.names_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(PathEdge, _impl_.heading_) - + sizeof(PathEdge::_impl_.heading_) - - PROTOBUF_FIELD_OFFSET(PathEdge, _impl_.ll_)>( - reinterpret_cast(&_impl_.ll_), - reinterpret_cast(&other->_impl_.ll_)); + swap(_impl_.has_min_road_class_, other->_impl_.has_min_road_class_); + swap(_impl_.has_max_road_class_, other->_impl_.has_max_road_class_); + swap(_impl_.has_exclude_tunnel_, other->_impl_.has_exclude_tunnel_); + swap(_impl_.has_exclude_bridge_, other->_impl_.has_exclude_bridge_); + swap(_impl_.has_exclude_ramp_, other->_impl_.has_exclude_ramp_); + swap(_impl_.has_exclude_closures_, other->_impl_.has_exclude_closures_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); } -std::string PathEdge::GetTypeName() const { - return "valhalla.PathEdge"; +std::string Location_SearchFilter::GetTypeName() const { + return "valhalla.Location.SearchFilter"; } // =================================================================== -class Correlation::_Internal { +class Location::_Internal { public: - static const ::valhalla::LatLng& projected_ll(const Correlation* msg); + static const ::valhalla::LatLng& ll(const Location* msg); + static const ::valhalla::LatLng& projected_ll(const Location* msg); + static const ::valhalla::LatLng& display_ll(const Location* msg); + static const ::valhalla::Location_SearchFilter& search_filter(const Location* msg); }; const ::valhalla::LatLng& -Correlation::_Internal::projected_ll(const Correlation* msg) { +Location::_Internal::ll(const Location* msg) { + return *msg->_impl_.ll_; +} +const ::valhalla::LatLng& +Location::_Internal::projected_ll(const Location* msg) { return *msg->_impl_.projected_ll_; } -Correlation::Correlation(::PROTOBUF_NAMESPACE_ID::Arena* arena, +const ::valhalla::LatLng& +Location::_Internal::display_ll(const Location* msg) { + return *msg->_impl_.display_ll_; +} +const ::valhalla::Location_SearchFilter& +Location::_Internal::search_filter(const Location* msg) { + return *msg->_impl_.search_filter_; +} +Location::Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.Correlation) + // @@protoc_insertion_point(arena_constructor:valhalla.Location) } -Correlation::Correlation(const Correlation& from) +Location::Location(const Location& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - Correlation* const _this = this; (void)_this; + Location* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.edges_){from._impl_.edges_} + decltype(_impl_.path_edges_){from._impl_.path_edges_} , decltype(_impl_.filtered_edges_){from._impl_.filtered_edges_} + , decltype(_impl_.ll_){nullptr} , decltype(_impl_.projected_ll_){nullptr} - , decltype(_impl_.original_index_){} - , decltype(_impl_.leg_shape_index_){} - , decltype(_impl_.distance_from_leg_origin_){} - , decltype(_impl_.route_index_){} - , decltype(_impl_.waypoint_index_){} - , /*decltype(_impl_._cached_size_)*/{}}; + , decltype(_impl_.display_ll_){nullptr} + , decltype(_impl_.search_filter_){nullptr} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_heading_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_street_){} + , decltype(_impl_.has_city_){} + , decltype(_impl_.has_state_){} + , decltype(_impl_.has_postal_code_){} + , decltype(_impl_.has_country_){} + , decltype(_impl_.has_phone_){} + , decltype(_impl_.has_url_){} + , decltype(_impl_.has_date_time_){} + , decltype(_impl_.has_side_of_street_){} + , decltype(_impl_.has_heading_tolerance_){} + , decltype(_impl_.has_node_snap_tolerance_){} + , decltype(_impl_.has_way_id_){} + , decltype(_impl_.has_minimum_reachability_){} + , decltype(_impl_.has_radius_){} + , decltype(_impl_.has_accuracy_){} + , decltype(_impl_.has_time_){} + , decltype(_impl_.has_skip_ranking_candidates_){} + , decltype(_impl_.has_original_index_){} + , decltype(_impl_.has_leg_shape_index_){} + , decltype(_impl_.has_distance_from_leg_origin_){} + , decltype(_impl_.has_preferred_side_){} + , decltype(_impl_.has_search_cutoff_){} + , decltype(_impl_.has_street_side_tolerance_){} + , decltype(_impl_.has_route_index_){} + , decltype(_impl_.has_waypoint_index_){} + , decltype(_impl_.has_street_side_max_distance_){} + , decltype(_impl_.has_preferred_layer_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_ll()) { + _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); + } if (from._internal_has_projected_ll()) { _this->_impl_.projected_ll_ = new ::valhalla::LatLng(*from._impl_.projected_ll_); } - ::memcpy(&_impl_.original_index_, &from._impl_.original_index_, - static_cast(reinterpret_cast(&_impl_.waypoint_index_) - - reinterpret_cast(&_impl_.original_index_)) + sizeof(_impl_.waypoint_index_)); - // @@protoc_insertion_point(copy_constructor:valhalla.Correlation) -} - -inline void Correlation::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.edges_){arena} - , decltype(_impl_.filtered_edges_){arena} - , decltype(_impl_.projected_ll_){nullptr} - , decltype(_impl_.original_index_){0u} - , decltype(_impl_.leg_shape_index_){0u} - , decltype(_impl_.distance_from_leg_origin_){0} - , decltype(_impl_.route_index_){0u} - , decltype(_impl_.waypoint_index_){0u} - , /*decltype(_impl_._cached_size_)*/{} - }; -} - -Correlation::~Correlation() { - // @@protoc_insertion_point(destructor:valhalla.Correlation) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { - (void)arena; - return; + if (from._internal_has_display_ll()) { + _this->_impl_.display_ll_ = new ::valhalla::LatLng(*from._impl_.display_ll_); } - SharedDtor(); -} - -inline void Correlation::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.edges_.~RepeatedPtrField(); - _impl_.filtered_edges_.~RepeatedPtrField(); - if (this != internal_default_instance()) delete _impl_.projected_ll_; -} - -void Correlation::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void Correlation::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.Correlation) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.edges_.Clear(); - _impl_.filtered_edges_.Clear(); - if (GetArenaForAllocation() == nullptr && _impl_.projected_ll_ != nullptr) { - delete _impl_.projected_ll_; + if (from._internal_has_search_filter()) { + _this->_impl_.search_filter_ = new ::valhalla::Location_SearchFilter(*from._impl_.search_filter_); } - _impl_.projected_ll_ = nullptr; - ::memset(&_impl_.original_index_, 0, static_cast( - reinterpret_cast(&_impl_.waypoint_index_) - - reinterpret_cast(&_impl_.original_index_)) + sizeof(_impl_.waypoint_index_)); - _internal_metadata_.Clear(); -} - -const char* Correlation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - while (!ctx->Done(&ptr)) { - uint32_t tag; - ptr = ::_pbi::ReadTag(ptr, &tag); - switch (tag >> 3) { - // repeated .valhalla.PathEdge edges = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_edges(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else - goto handle_unusual; - continue; - // repeated .valhalla.PathEdge filtered_edges = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_filtered_edges(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else - goto handle_unusual; - continue; - // uint32 original_index = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.original_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // .valhalla.LatLng projected_ll = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - ptr = ctx->ParseMessage(_internal_mutable_projected_ll(), ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 leg_shape_index = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _impl_.leg_shape_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // double distance_from_leg_origin = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 49)) { - _impl_.distance_from_leg_origin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(double); - } else - goto handle_unusual; - continue; - // uint32 route_index = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.route_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // uint32 waypoint_index = 8; - case 8: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.waypoint_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* Correlation::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:valhalla.Correlation) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .valhalla.PathEdge edges = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_edges_size()); i < n; i++) { - const auto& repfield = this->_internal_edges(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); } - - // repeated .valhalla.PathEdge filtered_edges = 2; - for (unsigned i = 0, - n = static_cast(this->_internal_filtered_edges_size()); i < n; i++) { - const auto& repfield = this->_internal_filtered_edges(i); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + clear_has_has_heading(); + switch (from.has_heading_case()) { + case kHeading: { + _this->_internal_set_heading(from._internal_heading()); + break; + } + case HAS_HEADING_NOT_SET: { + break; + } } - - // uint32 original_index = 3; - if (this->_internal_original_index() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_original_index(), target); - } - - // .valhalla.LatLng projected_ll = 4; - if (this->_internal_has_projected_ll()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(4, _Internal::projected_ll(this), - _Internal::projected_ll(this).GetCachedSize(), target, stream); - } - - // uint32 leg_shape_index = 5; - if (this->_internal_leg_shape_index() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_leg_shape_index(), target); - } - - // double distance_from_leg_origin = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance_from_leg_origin = this->_internal_distance_from_leg_origin(); - uint64_t raw_distance_from_leg_origin; - memcpy(&raw_distance_from_leg_origin, &tmp_distance_from_leg_origin, sizeof(tmp_distance_from_leg_origin)); - if (raw_distance_from_leg_origin != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_distance_from_leg_origin(), target); - } - - // uint32 route_index = 7; - if (this->_internal_route_index() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_route_index(), target); - } - - // uint32 waypoint_index = 8; - if (this->_internal_waypoint_index() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_waypoint_index(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), - static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); - } - // @@protoc_insertion_point(serialize_to_array_end:valhalla.Correlation) - return target; -} - -size_t Correlation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:valhalla.Correlation) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .valhalla.PathEdge edges = 1; - total_size += 1UL * this->_internal_edges_size(); - for (const auto& msg : this->_impl_.edges_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated .valhalla.PathEdge filtered_edges = 2; - total_size += 1UL * this->_internal_filtered_edges_size(); - for (const auto& msg : this->_impl_.filtered_edges_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // .valhalla.LatLng projected_ll = 4; - if (this->_internal_has_projected_ll()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.projected_ll_); - } - - // uint32 original_index = 3; - if (this->_internal_original_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_original_index()); - } - - // uint32 leg_shape_index = 5; - if (this->_internal_leg_shape_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_leg_shape_index()); - } - - // double distance_from_leg_origin = 6; - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance_from_leg_origin = this->_internal_distance_from_leg_origin(); - uint64_t raw_distance_from_leg_origin; - memcpy(&raw_distance_from_leg_origin, &tmp_distance_from_leg_origin, sizeof(tmp_distance_from_leg_origin)); - if (raw_distance_from_leg_origin != 0) { - total_size += 1 + 8; - } - - // uint32 route_index = 7; - if (this->_internal_route_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_route_index()); - } - - // uint32 waypoint_index = 8; - if (this->_internal_waypoint_index() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_waypoint_index()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); - } - int cached_size = ::_pbi::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Correlation::CheckTypeAndMergeFrom( - const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { - MergeFrom(*::_pbi::DownCast( - &from)); -} - -void Correlation::MergeFrom(const Correlation& from) { - Correlation* const _this = this; - // @@protoc_insertion_point(class_specific_merge_from_start:valhalla.Correlation) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - _this->_impl_.edges_.MergeFrom(from._impl_.edges_); - _this->_impl_.filtered_edges_.MergeFrom(from._impl_.filtered_edges_); - if (from._internal_has_projected_ll()) { - _this->_internal_mutable_projected_ll()->::valhalla::LatLng::MergeFrom( - from._internal_projected_ll()); - } - if (from._internal_original_index() != 0) { - _this->_internal_set_original_index(from._internal_original_index()); - } - if (from._internal_leg_shape_index() != 0) { - _this->_internal_set_leg_shape_index(from._internal_leg_shape_index()); + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } } - static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); - double tmp_distance_from_leg_origin = from._internal_distance_from_leg_origin(); - uint64_t raw_distance_from_leg_origin; - memcpy(&raw_distance_from_leg_origin, &tmp_distance_from_leg_origin, sizeof(tmp_distance_from_leg_origin)); - if (raw_distance_from_leg_origin != 0) { - _this->_internal_set_distance_from_leg_origin(from._internal_distance_from_leg_origin()); + clear_has_has_street(); + switch (from.has_street_case()) { + case kStreet: { + _this->_internal_set_street(from._internal_street()); + break; + } + case HAS_STREET_NOT_SET: { + break; + } } - if (from._internal_route_index() != 0) { - _this->_internal_set_route_index(from._internal_route_index()); + clear_has_has_city(); + switch (from.has_city_case()) { + case kCity: { + _this->_internal_set_city(from._internal_city()); + break; + } + case HAS_CITY_NOT_SET: { + break; + } } - if (from._internal_waypoint_index() != 0) { - _this->_internal_set_waypoint_index(from._internal_waypoint_index()); + clear_has_has_state(); + switch (from.has_state_case()) { + case kState: { + _this->_internal_set_state(from._internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } } - _this->_internal_metadata_.MergeFrom(from._internal_metadata_); -} - -void Correlation::CopyFrom(const Correlation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.Correlation) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Correlation::IsInitialized() const { - return true; -} - -void Correlation::InternalSwap(Correlation* other) { - using std::swap; - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.edges_.InternalSwap(&other->_impl_.edges_); - _impl_.filtered_edges_.InternalSwap(&other->_impl_.filtered_edges_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Correlation, _impl_.waypoint_index_) - + sizeof(Correlation::_impl_.waypoint_index_) - - PROTOBUF_FIELD_OFFSET(Correlation, _impl_.projected_ll_)>( - reinterpret_cast(&_impl_.projected_ll_), - reinterpret_cast(&other->_impl_.projected_ll_)); -} - -std::string Correlation::GetTypeName() const { - return "valhalla.Correlation"; -} - - -// =================================================================== - -class Location::_Internal { - public: - static const ::valhalla::LatLng& ll(const Location* msg); - static const ::valhalla::LatLng& display_ll(const Location* msg); - static const ::valhalla::SearchFilter& search_filter(const Location* msg); - static const ::valhalla::Correlation& correlation(const Location* msg); -}; - -const ::valhalla::LatLng& -Location::_Internal::ll(const Location* msg) { - return *msg->_impl_.ll_; -} -const ::valhalla::LatLng& -Location::_Internal::display_ll(const Location* msg) { - return *msg->_impl_.display_ll_; -} -const ::valhalla::SearchFilter& -Location::_Internal::search_filter(const Location* msg) { - return *msg->_impl_.search_filter_; -} -const ::valhalla::Correlation& -Location::_Internal::correlation(const Location* msg) { - return *msg->_impl_.correlation_; -} -Location::Location(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.Location) -} -Location::Location(const Location& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - Location* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.street_){} - , decltype(_impl_.date_time_){} - , decltype(_impl_.ll_){nullptr} - , decltype(_impl_.display_ll_){nullptr} - , decltype(_impl_.search_filter_){nullptr} - , decltype(_impl_.correlation_){nullptr} - , decltype(_impl_.type_){} - , decltype(_impl_.side_of_street_){} - , decltype(_impl_.skip_ranking_candidates_){} - , decltype(_impl_.preferred_side_){} - , decltype(_impl_.waiting_secs_){} - , decltype(_impl_.has_heading_){} - , decltype(_impl_.has_heading_tolerance_){} - , decltype(_impl_.has_node_snap_tolerance_){} - , decltype(_impl_.has_minimum_reachability_){} - , decltype(_impl_.has_radius_){} - , decltype(_impl_.has_accuracy_){} - , decltype(_impl_.has_time_){} - , decltype(_impl_.has_search_cutoff_){} - , decltype(_impl_.has_street_side_tolerance_){} - , decltype(_impl_.has_street_side_max_distance_){} - , decltype(_impl_.has_preferred_layer_){} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_._oneof_case_)*/{}}; - - _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.street_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.street_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_street().empty()) { - _this->_impl_.street_.Set(from._internal_street(), - _this->GetArenaForAllocation()); - } - _impl_.date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_date_time().empty()) { - _this->_impl_.date_time_.Set(from._internal_date_time(), - _this->GetArenaForAllocation()); + clear_has_has_postal_code(); + switch (from.has_postal_code_case()) { + case kPostalCode: { + _this->_internal_set_postal_code(from._internal_postal_code()); + break; + } + case HAS_POSTAL_CODE_NOT_SET: { + break; + } } - if (from._internal_has_ll()) { - _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); + clear_has_has_country(); + switch (from.has_country_case()) { + case kCountry: { + _this->_internal_set_country(from._internal_country()); + break; + } + case HAS_COUNTRY_NOT_SET: { + break; + } } - if (from._internal_has_display_ll()) { - _this->_impl_.display_ll_ = new ::valhalla::LatLng(*from._impl_.display_ll_); + clear_has_has_phone(); + switch (from.has_phone_case()) { + case kPhone: { + _this->_internal_set_phone(from._internal_phone()); + break; + } + case HAS_PHONE_NOT_SET: { + break; + } } - if (from._internal_has_search_filter()) { - _this->_impl_.search_filter_ = new ::valhalla::SearchFilter(*from._impl_.search_filter_); + clear_has_has_url(); + switch (from.has_url_case()) { + case kUrl: { + _this->_internal_set_url(from._internal_url()); + break; + } + case HAS_URL_NOT_SET: { + break; + } } - if (from._internal_has_correlation()) { - _this->_impl_.correlation_ = new ::valhalla::Correlation(*from._impl_.correlation_); + clear_has_has_date_time(); + switch (from.has_date_time_case()) { + case kDateTime: { + _this->_internal_set_date_time(from._internal_date_time()); + break; + } + case HAS_DATE_TIME_NOT_SET: { + break; + } } - ::memcpy(&_impl_.type_, &from._impl_.type_, - static_cast(reinterpret_cast(&_impl_.waiting_secs_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.waiting_secs_)); - clear_has_has_heading(); - switch (from.has_heading_case()) { - case kHeading: { - _this->_internal_set_heading(from._internal_heading()); + clear_has_has_side_of_street(); + switch (from.has_side_of_street_case()) { + case kSideOfStreet: { + _this->_internal_set_side_of_street(from._internal_side_of_street()); break; } - case HAS_HEADING_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { break; } } @@ -3169,6 +3367,16 @@ Location::Location(const Location& from) break; } } + clear_has_has_way_id(); + switch (from.has_way_id_case()) { + case kWayId: { + _this->_internal_set_way_id(from._internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } clear_has_has_minimum_reachability(); switch (from.has_minimum_reachability_case()) { case kMinimumReachability: { @@ -3209,6 +3417,56 @@ Location::Location(const Location& from) break; } } + clear_has_has_skip_ranking_candidates(); + switch (from.has_skip_ranking_candidates_case()) { + case kSkipRankingCandidates: { + _this->_internal_set_skip_ranking_candidates(from._internal_skip_ranking_candidates()); + break; + } + case HAS_SKIP_RANKING_CANDIDATES_NOT_SET: { + break; + } + } + clear_has_has_original_index(); + switch (from.has_original_index_case()) { + case kOriginalIndex: { + _this->_internal_set_original_index(from._internal_original_index()); + break; + } + case HAS_ORIGINAL_INDEX_NOT_SET: { + break; + } + } + clear_has_has_leg_shape_index(); + switch (from.has_leg_shape_index_case()) { + case kLegShapeIndex: { + _this->_internal_set_leg_shape_index(from._internal_leg_shape_index()); + break; + } + case HAS_LEG_SHAPE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_distance_from_leg_origin(); + switch (from.has_distance_from_leg_origin_case()) { + case kDistanceFromLegOrigin: { + _this->_internal_set_distance_from_leg_origin(from._internal_distance_from_leg_origin()); + break; + } + case HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET: { + break; + } + } + clear_has_has_preferred_side(); + switch (from.has_preferred_side_case()) { + case kPreferredSide: { + _this->_internal_set_preferred_side(from._internal_preferred_side()); + break; + } + case HAS_PREFERRED_SIDE_NOT_SET: { + break; + } + } clear_has_has_search_cutoff(); switch (from.has_search_cutoff_case()) { case kSearchCutoff: { @@ -3229,6 +3487,26 @@ Location::Location(const Location& from) break; } } + clear_has_has_route_index(); + switch (from.has_route_index_case()) { + case kRouteIndex: { + _this->_internal_set_route_index(from._internal_route_index()); + break; + } + case HAS_ROUTE_INDEX_NOT_SET: { + break; + } + } + clear_has_has_waypoint_index(); + switch (from.has_waypoint_index_case()) { + case kWaypointIndex: { + _this->_internal_set_waypoint_index(from._internal_waypoint_index()); + break; + } + case HAS_WAYPOINT_INDEX_NOT_SET: { + break; + } + } clear_has_has_street_side_max_distance(); switch (from.has_street_side_max_distance_case()) { case kStreetSideMaxDistance: { @@ -3257,53 +3535,73 @@ inline void Location::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.street_){} - , decltype(_impl_.date_time_){} + decltype(_impl_.path_edges_){arena} + , decltype(_impl_.filtered_edges_){arena} , decltype(_impl_.ll_){nullptr} + , decltype(_impl_.projected_ll_){nullptr} , decltype(_impl_.display_ll_){nullptr} , decltype(_impl_.search_filter_){nullptr} - , decltype(_impl_.correlation_){nullptr} - , decltype(_impl_.type_){0} - , decltype(_impl_.side_of_street_){0} - , decltype(_impl_.skip_ranking_candidates_){false} - , decltype(_impl_.preferred_side_){0} - , decltype(_impl_.waiting_secs_){0} + , decltype(_impl_.has_type_){} , decltype(_impl_.has_heading_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_street_){} + , decltype(_impl_.has_city_){} + , decltype(_impl_.has_state_){} + , decltype(_impl_.has_postal_code_){} + , decltype(_impl_.has_country_){} + , decltype(_impl_.has_phone_){} + , decltype(_impl_.has_url_){} + , decltype(_impl_.has_date_time_){} + , decltype(_impl_.has_side_of_street_){} , decltype(_impl_.has_heading_tolerance_){} , decltype(_impl_.has_node_snap_tolerance_){} + , decltype(_impl_.has_way_id_){} , decltype(_impl_.has_minimum_reachability_){} , decltype(_impl_.has_radius_){} , decltype(_impl_.has_accuracy_){} , decltype(_impl_.has_time_){} + , decltype(_impl_.has_skip_ranking_candidates_){} + , decltype(_impl_.has_original_index_){} + , decltype(_impl_.has_leg_shape_index_){} + , decltype(_impl_.has_distance_from_leg_origin_){} + , decltype(_impl_.has_preferred_side_){} , decltype(_impl_.has_search_cutoff_){} , decltype(_impl_.has_street_side_tolerance_){} + , decltype(_impl_.has_route_index_){} + , decltype(_impl_.has_waypoint_index_){} , decltype(_impl_.has_street_side_max_distance_){} , decltype(_impl_.has_preferred_layer_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.street_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.street_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_type(); clear_has_has_heading(); + clear_has_has_name(); + clear_has_has_street(); + clear_has_has_city(); + clear_has_has_state(); + clear_has_has_postal_code(); + clear_has_has_country(); + clear_has_has_phone(); + clear_has_has_url(); + clear_has_has_date_time(); + clear_has_has_side_of_street(); clear_has_has_heading_tolerance(); clear_has_has_node_snap_tolerance(); + clear_has_has_way_id(); clear_has_has_minimum_reachability(); clear_has_has_radius(); clear_has_has_accuracy(); clear_has_has_time(); + clear_has_has_skip_ranking_candidates(); + clear_has_has_original_index(); + clear_has_has_leg_shape_index(); + clear_has_has_distance_from_leg_origin(); + clear_has_has_preferred_side(); clear_has_has_search_cutoff(); clear_has_has_street_side_tolerance(); + clear_has_has_route_index(); + clear_has_has_waypoint_index(); clear_has_has_street_side_max_distance(); clear_has_has_preferred_layer(); } @@ -3319,22 +3617,57 @@ Location::~Location() { inline void Location::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.name_.Destroy(); - _impl_.street_.Destroy(); - _impl_.date_time_.Destroy(); + _impl_.path_edges_.~RepeatedPtrField(); + _impl_.filtered_edges_.~RepeatedPtrField(); if (this != internal_default_instance()) delete _impl_.ll_; + if (this != internal_default_instance()) delete _impl_.projected_ll_; if (this != internal_default_instance()) delete _impl_.display_ll_; if (this != internal_default_instance()) delete _impl_.search_filter_; - if (this != internal_default_instance()) delete _impl_.correlation_; + if (has_has_type()) { + clear_has_type(); + } if (has_has_heading()) { clear_has_heading(); } + if (has_has_name()) { + clear_has_name(); + } + if (has_has_street()) { + clear_has_street(); + } + if (has_has_city()) { + clear_has_city(); + } + if (has_has_state()) { + clear_has_state(); + } + if (has_has_postal_code()) { + clear_has_postal_code(); + } + if (has_has_country()) { + clear_has_country(); + } + if (has_has_phone()) { + clear_has_phone(); + } + if (has_has_url()) { + clear_has_url(); + } + if (has_has_date_time()) { + clear_has_date_time(); + } + if (has_has_side_of_street()) { + clear_has_side_of_street(); + } if (has_has_heading_tolerance()) { clear_has_heading_tolerance(); } if (has_has_node_snap_tolerance()) { clear_has_node_snap_tolerance(); } + if (has_has_way_id()) { + clear_has_way_id(); + } if (has_has_minimum_reachability()) { clear_has_minimum_reachability(); } @@ -3347,13 +3680,34 @@ inline void Location::SharedDtor() { if (has_has_time()) { clear_has_time(); } + if (has_has_skip_ranking_candidates()) { + clear_has_skip_ranking_candidates(); + } + if (has_has_original_index()) { + clear_has_original_index(); + } + if (has_has_leg_shape_index()) { + clear_has_leg_shape_index(); + } + if (has_has_distance_from_leg_origin()) { + clear_has_distance_from_leg_origin(); + } + if (has_has_preferred_side()) { + clear_has_preferred_side(); + } if (has_has_search_cutoff()) { clear_has_search_cutoff(); } if (has_has_street_side_tolerance()) { clear_has_street_side_tolerance(); } - if (has_has_street_side_max_distance()) { + if (has_has_route_index()) { + clear_has_route_index(); + } + if (has_has_waypoint_index()) { + clear_has_waypoint_index(); + } + if (has_has_street_side_max_distance()) { clear_has_street_side_max_distance(); } if (has_has_preferred_layer()) { @@ -3365,6 +3719,20 @@ void Location::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void Location::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} + void Location::clear_has_heading() { // @@protoc_insertion_point(one_of_clear_start:valhalla.Location) switch (has_heading_case()) { @@ -3376,7 +3744,147 @@ void Location::clear_has_heading() { break; } } - _impl_._oneof_case_[0] = HAS_HEADING_NOT_SET; + _impl_._oneof_case_[1] = HAS_HEADING_NOT_SET; +} + +void Location::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_NAME_NOT_SET; +} + +void Location::clear_has_street() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_street_case()) { + case kStreet: { + _impl_.has_street_.street_.Destroy(); + break; + } + case HAS_STREET_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_STREET_NOT_SET; +} + +void Location::clear_has_city() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_city_case()) { + case kCity: { + _impl_.has_city_.city_.Destroy(); + break; + } + case HAS_CITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_CITY_NOT_SET; +} + +void Location::clear_has_state() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_state_case()) { + case kState: { + _impl_.has_state_.state_.Destroy(); + break; + } + case HAS_STATE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_STATE_NOT_SET; +} + +void Location::clear_has_postal_code() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_postal_code_case()) { + case kPostalCode: { + _impl_.has_postal_code_.postal_code_.Destroy(); + break; + } + case HAS_POSTAL_CODE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_POSTAL_CODE_NOT_SET; +} + +void Location::clear_has_country() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_country_case()) { + case kCountry: { + _impl_.has_country_.country_.Destroy(); + break; + } + case HAS_COUNTRY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_COUNTRY_NOT_SET; +} + +void Location::clear_has_phone() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_phone_case()) { + case kPhone: { + _impl_.has_phone_.phone_.Destroy(); + break; + } + case HAS_PHONE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_PHONE_NOT_SET; +} + +void Location::clear_has_url() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_url_case()) { + case kUrl: { + _impl_.has_url_.url_.Destroy(); + break; + } + case HAS_URL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[9] = HAS_URL_NOT_SET; +} + +void Location::clear_has_date_time() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_date_time_case()) { + case kDateTime: { + _impl_.has_date_time_.date_time_.Destroy(); + break; + } + case HAS_DATE_TIME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[10] = HAS_DATE_TIME_NOT_SET; +} + +void Location::clear_has_side_of_street() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_side_of_street_case()) { + case kSideOfStreet: { + // No need to clear + break; + } + case HAS_SIDE_OF_STREET_NOT_SET: { + break; + } + } + _impl_._oneof_case_[11] = HAS_SIDE_OF_STREET_NOT_SET; } void Location::clear_has_heading_tolerance() { @@ -3390,7 +3898,7 @@ void Location::clear_has_heading_tolerance() { break; } } - _impl_._oneof_case_[1] = HAS_HEADING_TOLERANCE_NOT_SET; + _impl_._oneof_case_[12] = HAS_HEADING_TOLERANCE_NOT_SET; } void Location::clear_has_node_snap_tolerance() { @@ -3404,7 +3912,21 @@ void Location::clear_has_node_snap_tolerance() { break; } } - _impl_._oneof_case_[2] = HAS_NODE_SNAP_TOLERANCE_NOT_SET; + _impl_._oneof_case_[13] = HAS_NODE_SNAP_TOLERANCE_NOT_SET; +} + +void Location::clear_has_way_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_way_id_case()) { + case kWayId: { + // No need to clear + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[14] = HAS_WAY_ID_NOT_SET; } void Location::clear_has_minimum_reachability() { @@ -3418,7 +3940,7 @@ void Location::clear_has_minimum_reachability() { break; } } - _impl_._oneof_case_[3] = HAS_MINIMUM_REACHABILITY_NOT_SET; + _impl_._oneof_case_[15] = HAS_MINIMUM_REACHABILITY_NOT_SET; } void Location::clear_has_radius() { @@ -3432,7 +3954,7 @@ void Location::clear_has_radius() { break; } } - _impl_._oneof_case_[4] = HAS_RADIUS_NOT_SET; + _impl_._oneof_case_[16] = HAS_RADIUS_NOT_SET; } void Location::clear_has_accuracy() { @@ -3446,7 +3968,7 @@ void Location::clear_has_accuracy() { break; } } - _impl_._oneof_case_[5] = HAS_ACCURACY_NOT_SET; + _impl_._oneof_case_[17] = HAS_ACCURACY_NOT_SET; } void Location::clear_has_time() { @@ -3460,7 +3982,77 @@ void Location::clear_has_time() { break; } } - _impl_._oneof_case_[6] = HAS_TIME_NOT_SET; + _impl_._oneof_case_[18] = HAS_TIME_NOT_SET; +} + +void Location::clear_has_skip_ranking_candidates() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_skip_ranking_candidates_case()) { + case kSkipRankingCandidates: { + // No need to clear + break; + } + case HAS_SKIP_RANKING_CANDIDATES_NOT_SET: { + break; + } + } + _impl_._oneof_case_[19] = HAS_SKIP_RANKING_CANDIDATES_NOT_SET; +} + +void Location::clear_has_original_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_original_index_case()) { + case kOriginalIndex: { + // No need to clear + break; + } + case HAS_ORIGINAL_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[20] = HAS_ORIGINAL_INDEX_NOT_SET; +} + +void Location::clear_has_leg_shape_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_leg_shape_index_case()) { + case kLegShapeIndex: { + // No need to clear + break; + } + case HAS_LEG_SHAPE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[21] = HAS_LEG_SHAPE_INDEX_NOT_SET; +} + +void Location::clear_has_distance_from_leg_origin() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_distance_from_leg_origin_case()) { + case kDistanceFromLegOrigin: { + // No need to clear + break; + } + case HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET: { + break; + } + } + _impl_._oneof_case_[22] = HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET; +} + +void Location::clear_has_preferred_side() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_preferred_side_case()) { + case kPreferredSide: { + // No need to clear + break; + } + case HAS_PREFERRED_SIDE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[23] = HAS_PREFERRED_SIDE_NOT_SET; } void Location::clear_has_search_cutoff() { @@ -3474,7 +4066,7 @@ void Location::clear_has_search_cutoff() { break; } } - _impl_._oneof_case_[7] = HAS_SEARCH_CUTOFF_NOT_SET; + _impl_._oneof_case_[24] = HAS_SEARCH_CUTOFF_NOT_SET; } void Location::clear_has_street_side_tolerance() { @@ -3488,7 +4080,35 @@ void Location::clear_has_street_side_tolerance() { break; } } - _impl_._oneof_case_[8] = HAS_STREET_SIDE_TOLERANCE_NOT_SET; + _impl_._oneof_case_[25] = HAS_STREET_SIDE_TOLERANCE_NOT_SET; +} + +void Location::clear_has_route_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_route_index_case()) { + case kRouteIndex: { + // No need to clear + break; + } + case HAS_ROUTE_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[26] = HAS_ROUTE_INDEX_NOT_SET; +} + +void Location::clear_has_waypoint_index() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Location) + switch (has_waypoint_index_case()) { + case kWaypointIndex: { + // No need to clear + break; + } + case HAS_WAYPOINT_INDEX_NOT_SET: { + break; + } + } + _impl_._oneof_case_[27] = HAS_WAYPOINT_INDEX_NOT_SET; } void Location::clear_has_street_side_max_distance() { @@ -3502,7 +4122,7 @@ void Location::clear_has_street_side_max_distance() { break; } } - _impl_._oneof_case_[9] = HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET; + _impl_._oneof_case_[28] = HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET; } void Location::clear_has_preferred_layer() { @@ -3516,7 +4136,7 @@ void Location::clear_has_preferred_layer() { break; } } - _impl_._oneof_case_[10] = HAS_PREFERRED_LAYER_NOT_SET; + _impl_._oneof_case_[29] = HAS_PREFERRED_LAYER_NOT_SET; } @@ -3526,13 +4146,16 @@ void Location::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.name_.ClearToEmpty(); - _impl_.street_.ClearToEmpty(); - _impl_.date_time_.ClearToEmpty(); + _impl_.path_edges_.Clear(); + _impl_.filtered_edges_.Clear(); if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { delete _impl_.ll_; } _impl_.ll_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.projected_ll_ != nullptr) { + delete _impl_.projected_ll_; + } + _impl_.projected_ll_ = nullptr; if (GetArenaForAllocation() == nullptr && _impl_.display_ll_ != nullptr) { delete _impl_.display_ll_; } @@ -3541,22 +4164,34 @@ void Location::Clear() { delete _impl_.search_filter_; } _impl_.search_filter_ = nullptr; - if (GetArenaForAllocation() == nullptr && _impl_.correlation_ != nullptr) { - delete _impl_.correlation_; - } - _impl_.correlation_ = nullptr; - ::memset(&_impl_.type_, 0, static_cast( - reinterpret_cast(&_impl_.waiting_secs_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.waiting_secs_)); + clear_has_type(); clear_has_heading(); + clear_has_name(); + clear_has_street(); + clear_has_city(); + clear_has_state(); + clear_has_postal_code(); + clear_has_country(); + clear_has_phone(); + clear_has_url(); + clear_has_date_time(); + clear_has_side_of_street(); clear_has_heading_tolerance(); clear_has_node_snap_tolerance(); + clear_has_way_id(); clear_has_minimum_reachability(); clear_has_radius(); clear_has_accuracy(); clear_has_time(); + clear_has_skip_ranking_candidates(); + clear_has_original_index(); + clear_has_leg_shape_index(); + clear_has_distance_from_leg_origin(); + clear_has_preferred_side(); clear_has_search_cutoff(); clear_has_street_side_tolerance(); + clear_has_route_index(); + clear_has_waypoint_index(); clear_has_street_side_max_distance(); clear_has_preferred_layer(); _internal_metadata_.Clear(); @@ -3613,6 +4248,66 @@ const char* Location::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; + // string city = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_city(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string state = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string postal_code = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_postal_code(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string country = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + auto str = _internal_mutable_country(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string phone = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + auto str = _internal_mutable_phone(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; + // string url = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + auto str = _internal_mutable_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, nullptr)); + } else + goto handle_unusual; + continue; // string date_time = 12; case 12: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { @@ -3648,6 +4343,14 @@ const char* Location::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; + // uint64 way_id = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { + _internal_set_way_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; // uint32 minimum_reachability = 17; case 17: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { @@ -3683,92 +4386,150 @@ const char* Location::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // bool skip_ranking_candidates = 21; case 21: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 168)) { - _impl_.skip_ranking_candidates_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_skip_ranking_candidates(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // .valhalla.Location.PreferredSide preferred_side = 22; + // repeated .valhalla.Location.PathEdge path_edges = 22; case 22: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - _internal_set_preferred_side(static_cast<::valhalla::Location_PreferredSide>(val)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 178)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_path_edges(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<178>(ptr)); } else goto handle_unusual; continue; - // .valhalla.LatLng display_ll = 23; + // repeated .valhalla.Location.PathEdge filtered_edges = 23; case 23: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 186)) { - ptr = ctx->ParseMessage(_internal_mutable_display_ll(), ptr); - CHK_(ptr); + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_filtered_edges(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<186>(ptr)); } else goto handle_unusual; continue; - // uint32 search_cutoff = 24; + // uint32 original_index = 24; case 24: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 192)) { - _internal_set_search_cutoff(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + _internal_set_original_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // uint32 street_side_tolerance = 25; + // .valhalla.LatLng projected_ll = 25; case 25: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 200)) { - _internal_set_street_side_tolerance(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 202)) { + ptr = ctx->ParseMessage(_internal_mutable_projected_ll(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // .valhalla.SearchFilter search_filter = 26; + // .valhalla.Location.PreferredSide preferred_side = 26; case 26: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 210)) { - ptr = ctx->ParseMessage(_internal_mutable_search_filter(), ptr); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 208)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); + _internal_set_preferred_side(static_cast<::valhalla::Location_PreferredSide>(val)); } else goto handle_unusual; continue; - // uint32 street_side_max_distance = 27; + // .valhalla.LatLng display_ll = 27; case 27: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 216)) { - _internal_set_street_side_max_distance(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 218)) { + ptr = ctx->ParseMessage(_internal_mutable_display_ll(), ptr); CHK_(ptr); } else goto handle_unusual; continue; - // int32 preferred_layer = 28; + // uint32 search_cutoff = 28; case 28: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 224)) { - _internal_set_preferred_layer(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + _internal_set_search_cutoff(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - // float waiting_secs = 29; + // uint32 street_side_tolerance = 29; case 29: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 237)) { - _impl_.waiting_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 232)) { + _internal_set_street_side_tolerance(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); } else goto handle_unusual; continue; - // .valhalla.Correlation correlation = 90; - case 90: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 210)) { - ptr = ctx->ParseMessage(_internal_mutable_correlation(), ptr); + // uint32 route_index = 30; + case 30: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 240)) { + _internal_set_route_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; + // uint32 waypoint_index = 31; + case 31: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 248)) { + _internal_set_waypoint_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .valhalla.Location.SearchFilter search_filter = 32; + case 32: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 2)) { + ptr = ctx->ParseMessage(_internal_mutable_search_filter(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 street_side_max_distance = 33; + case 33: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _internal_set_street_side_max_distance(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int32 preferred_layer = 34; + case 34: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _internal_set_preferred_layer(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 leg_shape_index = 35; + case 35: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _internal_set_leg_shape_index(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // double distance_from_leg_origin = 36; + case 36: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 33)) { + _internal_set_distance_from_leg_origin(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(double); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; } ptr = UnknownFieldParse( tag, @@ -3798,7 +4559,7 @@ uint8_t* Location::_InternalSerialize( } // .valhalla.Location.Type type = 2; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 2, this->_internal_type(), target); @@ -3811,7 +4572,7 @@ uint8_t* Location::_InternalSerialize( } // string name = 4; - if (!this->_internal_name().empty()) { + if (_internal_has_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -3821,7 +4582,7 @@ uint8_t* Location::_InternalSerialize( } // string street = 5; - if (!this->_internal_street().empty()) { + if (_internal_has_street()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_street().data(), static_cast(this->_internal_street().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -3830,8 +4591,68 @@ uint8_t* Location::_InternalSerialize( 5, this->_internal_street(), target); } + // string city = 6; + if (_internal_has_city()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_city().data(), static_cast(this->_internal_city().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.city"); + target = stream->WriteStringMaybeAliased( + 6, this->_internal_city(), target); + } + + // string state = 7; + if (_internal_has_state()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_state().data(), static_cast(this->_internal_state().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.state"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_state(), target); + } + + // string postal_code = 8; + if (_internal_has_postal_code()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_postal_code().data(), static_cast(this->_internal_postal_code().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.postal_code"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_postal_code(), target); + } + + // string country = 9; + if (_internal_has_country()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_country().data(), static_cast(this->_internal_country().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.country"); + target = stream->WriteStringMaybeAliased( + 9, this->_internal_country(), target); + } + + // string phone = 10; + if (_internal_has_phone()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_phone().data(), static_cast(this->_internal_phone().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.phone"); + target = stream->WriteStringMaybeAliased( + 10, this->_internal_phone(), target); + } + + // string url = 11; + if (_internal_has_url()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_url().data(), static_cast(this->_internal_url().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "valhalla.Location.url"); + target = stream->WriteStringMaybeAliased( + 11, this->_internal_url(), target); + } + // string date_time = 12; - if (!this->_internal_date_time().empty()) { + if (_internal_has_date_time()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_date_time().data(), static_cast(this->_internal_date_time().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -3841,7 +4662,7 @@ uint8_t* Location::_InternalSerialize( } // .valhalla.Location.SideOfStreet side_of_street = 13; - if (this->_internal_side_of_street() != 0) { + if (_internal_has_side_of_street()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 13, this->_internal_side_of_street(), target); @@ -3859,6 +4680,12 @@ uint8_t* Location::_InternalSerialize( target = ::_pbi::WireFormatLite::WriteUInt32ToArray(15, this->_internal_node_snap_tolerance(), target); } + // uint64 way_id = 16; + if (_internal_has_way_id()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(16, this->_internal_way_id(), target); + } + // uint32 minimum_reachability = 17; if (_internal_has_minimum_reachability()) { target = stream->EnsureSpace(target); @@ -3884,71 +4711,107 @@ uint8_t* Location::_InternalSerialize( } // bool skip_ranking_candidates = 21; - if (this->_internal_skip_ranking_candidates() != 0) { + if (_internal_has_skip_ranking_candidates()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(21, this->_internal_skip_ranking_candidates(), target); } - // .valhalla.Location.PreferredSide preferred_side = 22; - if (this->_internal_preferred_side() != 0) { + // repeated .valhalla.Location.PathEdge path_edges = 22; + for (unsigned i = 0, + n = static_cast(this->_internal_path_edges_size()); i < n; i++) { + const auto& repfield = this->_internal_path_edges(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(22, repfield, repfield.GetCachedSize(), target, stream); + } + + // repeated .valhalla.Location.PathEdge filtered_edges = 23; + for (unsigned i = 0, + n = static_cast(this->_internal_filtered_edges_size()); i < n; i++) { + const auto& repfield = this->_internal_filtered_edges(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(23, repfield, repfield.GetCachedSize(), target, stream); + } + + // uint32 original_index = 24; + if (_internal_has_original_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(24, this->_internal_original_index(), target); + } + + // .valhalla.LatLng projected_ll = 25; + if (this->_internal_has_projected_ll()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(25, _Internal::projected_ll(this), + _Internal::projected_ll(this).GetCachedSize(), target, stream); + } + + // .valhalla.Location.PreferredSide preferred_side = 26; + if (_internal_has_preferred_side()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( - 22, this->_internal_preferred_side(), target); + 26, this->_internal_preferred_side(), target); } - // .valhalla.LatLng display_ll = 23; + // .valhalla.LatLng display_ll = 27; if (this->_internal_has_display_ll()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(23, _Internal::display_ll(this), + InternalWriteMessage(27, _Internal::display_ll(this), _Internal::display_ll(this).GetCachedSize(), target, stream); } - // uint32 search_cutoff = 24; + // uint32 search_cutoff = 28; if (_internal_has_search_cutoff()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(24, this->_internal_search_cutoff(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(28, this->_internal_search_cutoff(), target); } - // uint32 street_side_tolerance = 25; + // uint32 street_side_tolerance = 29; if (_internal_has_street_side_tolerance()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(25, this->_internal_street_side_tolerance(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(29, this->_internal_street_side_tolerance(), target); + } + + // uint32 route_index = 30; + if (_internal_has_route_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(30, this->_internal_route_index(), target); } - // .valhalla.SearchFilter search_filter = 26; + // uint32 waypoint_index = 31; + if (_internal_has_waypoint_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(31, this->_internal_waypoint_index(), target); + } + + // .valhalla.Location.SearchFilter search_filter = 32; if (this->_internal_has_search_filter()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(26, _Internal::search_filter(this), + InternalWriteMessage(32, _Internal::search_filter(this), _Internal::search_filter(this).GetCachedSize(), target, stream); } - // uint32 street_side_max_distance = 27; + // uint32 street_side_max_distance = 33; if (_internal_has_street_side_max_distance()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt32ToArray(27, this->_internal_street_side_max_distance(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(33, this->_internal_street_side_max_distance(), target); } - // int32 preferred_layer = 28; + // int32 preferred_layer = 34; if (_internal_has_preferred_layer()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteInt32ToArray(28, this->_internal_preferred_layer(), target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(34, this->_internal_preferred_layer(), target); } - // float waiting_secs = 29; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_waiting_secs = this->_internal_waiting_secs(); - uint32_t raw_waiting_secs; - memcpy(&raw_waiting_secs, &tmp_waiting_secs, sizeof(tmp_waiting_secs)); - if (raw_waiting_secs != 0) { + // uint32 leg_shape_index = 35; + if (_internal_has_leg_shape_index()) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray(29, this->_internal_waiting_secs(), target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(35, this->_internal_leg_shape_index(), target); } - // .valhalla.Correlation correlation = 90; - if (this->_internal_has_correlation()) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(90, _Internal::correlation(this), - _Internal::correlation(this).GetCachedSize(), target, stream); + // double distance_from_leg_origin = 36; + if (_internal_has_distance_from_leg_origin()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray(36, this->_internal_distance_from_leg_origin(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -3967,25 +4830,18 @@ size_t Location::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string name = 4; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // string street = 5; - if (!this->_internal_street().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_street()); + // repeated .valhalla.Location.PathEdge path_edges = 22; + total_size += 2UL * this->_internal_path_edges_size(); + for (const auto& msg : this->_impl_.path_edges_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string date_time = 12; - if (!this->_internal_date_time().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_date_time()); + // repeated .valhalla.Location.PathEdge filtered_edges = 23; + total_size += 2UL * this->_internal_filtered_edges_size(); + for (const auto& msg : this->_impl_.filtered_edges_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // .valhalla.LatLng ll = 1; @@ -3995,59 +4851,38 @@ size_t Location::ByteSizeLong() const { *_impl_.ll_); } - // .valhalla.LatLng display_ll = 23; - if (this->_internal_has_display_ll()) { + // .valhalla.LatLng projected_ll = 25; + if (this->_internal_has_projected_ll()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.display_ll_); + *_impl_.projected_ll_); } - // .valhalla.SearchFilter search_filter = 26; - if (this->_internal_has_search_filter()) { + // .valhalla.LatLng display_ll = 27; + if (this->_internal_has_display_ll()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.search_filter_); + *_impl_.display_ll_); } - // .valhalla.Correlation correlation = 90; - if (this->_internal_has_correlation()) { + // .valhalla.Location.SearchFilter search_filter = 32; + if (this->_internal_has_search_filter()) { total_size += 2 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.correlation_); - } - - // .valhalla.Location.Type type = 2; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); - } - - // .valhalla.Location.SideOfStreet side_of_street = 13; - if (this->_internal_side_of_street() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_side_of_street()); - } - - // bool skip_ranking_candidates = 21; - if (this->_internal_skip_ranking_candidates() != 0) { - total_size += 2 + 1; - } - - // .valhalla.Location.PreferredSide preferred_side = 22; - if (this->_internal_preferred_side() != 0) { - total_size += 2 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_preferred_side()); + *_impl_.search_filter_); } - // float waiting_secs = 29; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_waiting_secs = this->_internal_waiting_secs(); - uint32_t raw_waiting_secs; - memcpy(&raw_waiting_secs, &tmp_waiting_secs, sizeof(tmp_waiting_secs)); - if (raw_waiting_secs != 0) { - total_size += 2 + 4; + switch (has_type_case()) { + // .valhalla.Location.Type type = 2; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - switch (has_heading_case()) { // uint32 heading = 3; case kHeading: { @@ -4058,6 +4893,125 @@ size_t Location::ByteSizeLong() const { break; } } + switch (has_name_case()) { + // string name = 4; + case kName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + switch (has_street_case()) { + // string street = 5; + case kStreet: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_street()); + break; + } + case HAS_STREET_NOT_SET: { + break; + } + } + switch (has_city_case()) { + // string city = 6; + case kCity: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_city()); + break; + } + case HAS_CITY_NOT_SET: { + break; + } + } + switch (has_state_case()) { + // string state = 7; + case kState: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } + } + switch (has_postal_code_case()) { + // string postal_code = 8; + case kPostalCode: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_postal_code()); + break; + } + case HAS_POSTAL_CODE_NOT_SET: { + break; + } + } + switch (has_country_case()) { + // string country = 9; + case kCountry: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country()); + break; + } + case HAS_COUNTRY_NOT_SET: { + break; + } + } + switch (has_phone_case()) { + // string phone = 10; + case kPhone: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_phone()); + break; + } + case HAS_PHONE_NOT_SET: { + break; + } + } + switch (has_url_case()) { + // string url = 11; + case kUrl: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_url()); + break; + } + case HAS_URL_NOT_SET: { + break; + } + } + switch (has_date_time_case()) { + // string date_time = 12; + case kDateTime: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_date_time()); + break; + } + case HAS_DATE_TIME_NOT_SET: { + break; + } + } + switch (has_side_of_street_case()) { + // .valhalla.Location.SideOfStreet side_of_street = 13; + case kSideOfStreet: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_side_of_street()); + break; + } + case HAS_SIDE_OF_STREET_NOT_SET: { + break; + } + } switch (has_heading_tolerance_case()) { // uint32 heading_tolerance = 14; case kHeadingTolerance: { @@ -4078,6 +5032,18 @@ size_t Location::ByteSizeLong() const { break; } } + switch (has_way_id_case()) { + // uint64 way_id = 16; + case kWayId: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt64Size( + this->_internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } switch (has_minimum_reachability_case()) { // uint32 minimum_reachability = 17; case kMinimumReachability: { @@ -4124,8 +5090,63 @@ size_t Location::ByteSizeLong() const { break; } } + switch (has_skip_ranking_candidates_case()) { + // bool skip_ranking_candidates = 21; + case kSkipRankingCandidates: { + total_size += 2 + 1; + break; + } + case HAS_SKIP_RANKING_CANDIDATES_NOT_SET: { + break; + } + } + switch (has_original_index_case()) { + // uint32 original_index = 24; + case kOriginalIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_original_index()); + break; + } + case HAS_ORIGINAL_INDEX_NOT_SET: { + break; + } + } + switch (has_leg_shape_index_case()) { + // uint32 leg_shape_index = 35; + case kLegShapeIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_leg_shape_index()); + break; + } + case HAS_LEG_SHAPE_INDEX_NOT_SET: { + break; + } + } + switch (has_distance_from_leg_origin_case()) { + // double distance_from_leg_origin = 36; + case kDistanceFromLegOrigin: { + total_size += 2 + 8; + break; + } + case HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET: { + break; + } + } + switch (has_preferred_side_case()) { + // .valhalla.Location.PreferredSide preferred_side = 26; + case kPreferredSide: { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_preferred_side()); + break; + } + case HAS_PREFERRED_SIDE_NOT_SET: { + break; + } + } switch (has_search_cutoff_case()) { - // uint32 search_cutoff = 24; + // uint32 search_cutoff = 28; case kSearchCutoff: { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( @@ -4137,7 +5158,7 @@ size_t Location::ByteSizeLong() const { } } switch (has_street_side_tolerance_case()) { - // uint32 street_side_tolerance = 25; + // uint32 street_side_tolerance = 29; case kStreetSideTolerance: { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( @@ -4148,8 +5169,32 @@ size_t Location::ByteSizeLong() const { break; } } + switch (has_route_index_case()) { + // uint32 route_index = 30; + case kRouteIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_route_index()); + break; + } + case HAS_ROUTE_INDEX_NOT_SET: { + break; + } + } + switch (has_waypoint_index_case()) { + // uint32 waypoint_index = 31; + case kWaypointIndex: { + total_size += 2 + + ::_pbi::WireFormatLite::UInt32Size( + this->_internal_waypoint_index()); + break; + } + case HAS_WAYPOINT_INDEX_NOT_SET: { + break; + } + } switch (has_street_side_max_distance_case()) { - // uint32 street_side_max_distance = 27; + // uint32 street_side_max_distance = 33; case kStreetSideMaxDistance: { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( @@ -4161,7 +5206,7 @@ size_t Location::ByteSizeLong() const { } } switch (has_preferred_layer_case()) { - // int32 preferred_layer = 28; + // int32 preferred_layer = 34; case kPreferredLayer: { total_size += 2 + ::_pbi::WireFormatLite::Int32Size( @@ -4193,56 +5238,129 @@ void Location::MergeFrom(const Location& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_street().empty()) { - _this->_internal_set_street(from._internal_street()); - } - if (!from._internal_date_time().empty()) { - _this->_internal_set_date_time(from._internal_date_time()); - } + _this->_impl_.path_edges_.MergeFrom(from._impl_.path_edges_); + _this->_impl_.filtered_edges_.MergeFrom(from._impl_.filtered_edges_); if (from._internal_has_ll()) { _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( from._internal_ll()); } - if (from._internal_has_display_ll()) { + if (from._internal_has_projected_ll()) { + _this->_internal_mutable_projected_ll()->::valhalla::LatLng::MergeFrom( + from._internal_projected_ll()); + } + if (from._internal_has_display_ll()) { _this->_internal_mutable_display_ll()->::valhalla::LatLng::MergeFrom( from._internal_display_ll()); } if (from._internal_has_search_filter()) { - _this->_internal_mutable_search_filter()->::valhalla::SearchFilter::MergeFrom( + _this->_internal_mutable_search_filter()->::valhalla::Location_SearchFilter::MergeFrom( from._internal_search_filter()); } - if (from._internal_has_correlation()) { - _this->_internal_mutable_correlation()->::valhalla::Correlation::MergeFrom( - from._internal_correlation()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + switch (from.has_heading_case()) { + case kHeading: { + _this->_internal_set_heading(from._internal_heading()); + break; + } + case HAS_HEADING_NOT_SET: { + break; + } + } + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + switch (from.has_street_case()) { + case kStreet: { + _this->_internal_set_street(from._internal_street()); + break; + } + case HAS_STREET_NOT_SET: { + break; + } + } + switch (from.has_city_case()) { + case kCity: { + _this->_internal_set_city(from._internal_city()); + break; + } + case HAS_CITY_NOT_SET: { + break; + } + } + switch (from.has_state_case()) { + case kState: { + _this->_internal_set_state(from._internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_postal_code_case()) { + case kPostalCode: { + _this->_internal_set_postal_code(from._internal_postal_code()); + break; + } + case HAS_POSTAL_CODE_NOT_SET: { + break; + } } - if (from._internal_side_of_street() != 0) { - _this->_internal_set_side_of_street(from._internal_side_of_street()); + switch (from.has_country_case()) { + case kCountry: { + _this->_internal_set_country(from._internal_country()); + break; + } + case HAS_COUNTRY_NOT_SET: { + break; + } } - if (from._internal_skip_ranking_candidates() != 0) { - _this->_internal_set_skip_ranking_candidates(from._internal_skip_ranking_candidates()); + switch (from.has_phone_case()) { + case kPhone: { + _this->_internal_set_phone(from._internal_phone()); + break; + } + case HAS_PHONE_NOT_SET: { + break; + } } - if (from._internal_preferred_side() != 0) { - _this->_internal_set_preferred_side(from._internal_preferred_side()); + switch (from.has_url_case()) { + case kUrl: { + _this->_internal_set_url(from._internal_url()); + break; + } + case HAS_URL_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_waiting_secs = from._internal_waiting_secs(); - uint32_t raw_waiting_secs; - memcpy(&raw_waiting_secs, &tmp_waiting_secs, sizeof(tmp_waiting_secs)); - if (raw_waiting_secs != 0) { - _this->_internal_set_waiting_secs(from._internal_waiting_secs()); + switch (from.has_date_time_case()) { + case kDateTime: { + _this->_internal_set_date_time(from._internal_date_time()); + break; + } + case HAS_DATE_TIME_NOT_SET: { + break; + } } - switch (from.has_heading_case()) { - case kHeading: { - _this->_internal_set_heading(from._internal_heading()); + switch (from.has_side_of_street_case()) { + case kSideOfStreet: { + _this->_internal_set_side_of_street(from._internal_side_of_street()); break; } - case HAS_HEADING_NOT_SET: { + case HAS_SIDE_OF_STREET_NOT_SET: { break; } } @@ -4264,6 +5382,15 @@ void Location::MergeFrom(const Location& from) { break; } } + switch (from.has_way_id_case()) { + case kWayId: { + _this->_internal_set_way_id(from._internal_way_id()); + break; + } + case HAS_WAY_ID_NOT_SET: { + break; + } + } switch (from.has_minimum_reachability_case()) { case kMinimumReachability: { _this->_internal_set_minimum_reachability(from._internal_minimum_reachability()); @@ -4300,6 +5427,51 @@ void Location::MergeFrom(const Location& from) { break; } } + switch (from.has_skip_ranking_candidates_case()) { + case kSkipRankingCandidates: { + _this->_internal_set_skip_ranking_candidates(from._internal_skip_ranking_candidates()); + break; + } + case HAS_SKIP_RANKING_CANDIDATES_NOT_SET: { + break; + } + } + switch (from.has_original_index_case()) { + case kOriginalIndex: { + _this->_internal_set_original_index(from._internal_original_index()); + break; + } + case HAS_ORIGINAL_INDEX_NOT_SET: { + break; + } + } + switch (from.has_leg_shape_index_case()) { + case kLegShapeIndex: { + _this->_internal_set_leg_shape_index(from._internal_leg_shape_index()); + break; + } + case HAS_LEG_SHAPE_INDEX_NOT_SET: { + break; + } + } + switch (from.has_distance_from_leg_origin_case()) { + case kDistanceFromLegOrigin: { + _this->_internal_set_distance_from_leg_origin(from._internal_distance_from_leg_origin()); + break; + } + case HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET: { + break; + } + } + switch (from.has_preferred_side_case()) { + case kPreferredSide: { + _this->_internal_set_preferred_side(from._internal_preferred_side()); + break; + } + case HAS_PREFERRED_SIDE_NOT_SET: { + break; + } + } switch (from.has_search_cutoff_case()) { case kSearchCutoff: { _this->_internal_set_search_cutoff(from._internal_search_cutoff()); @@ -4318,6 +5490,24 @@ void Location::MergeFrom(const Location& from) { break; } } + switch (from.has_route_index_case()) { + case kRouteIndex: { + _this->_internal_set_route_index(from._internal_route_index()); + break; + } + case HAS_ROUTE_INDEX_NOT_SET: { + break; + } + } + switch (from.has_waypoint_index_case()) { + case kWaypointIndex: { + _this->_internal_set_waypoint_index(from._internal_waypoint_index()); + break; + } + case HAS_WAYPOINT_INDEX_NOT_SET: { + break; + } + } switch (from.has_street_side_max_distance_case()) { case kStreetSideMaxDistance: { _this->_internal_set_street_side_max_distance(from._internal_street_side_max_distance()); @@ -4352,36 +5542,43 @@ bool Location::IsInitialized() const { void Location::InternalSwap(Location* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.street_, lhs_arena, - &other->_impl_.street_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.date_time_, lhs_arena, - &other->_impl_.date_time_, rhs_arena - ); + _impl_.path_edges_.InternalSwap(&other->_impl_.path_edges_); + _impl_.filtered_edges_.InternalSwap(&other->_impl_.filtered_edges_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Location, _impl_.waiting_secs_) - + sizeof(Location::_impl_.waiting_secs_) + PROTOBUF_FIELD_OFFSET(Location, _impl_.search_filter_) + + sizeof(Location::_impl_.search_filter_) - PROTOBUF_FIELD_OFFSET(Location, _impl_.ll_)>( reinterpret_cast(&_impl_.ll_), reinterpret_cast(&other->_impl_.ll_)); + swap(_impl_.has_type_, other->_impl_.has_type_); swap(_impl_.has_heading_, other->_impl_.has_heading_); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_.has_street_, other->_impl_.has_street_); + swap(_impl_.has_city_, other->_impl_.has_city_); + swap(_impl_.has_state_, other->_impl_.has_state_); + swap(_impl_.has_postal_code_, other->_impl_.has_postal_code_); + swap(_impl_.has_country_, other->_impl_.has_country_); + swap(_impl_.has_phone_, other->_impl_.has_phone_); + swap(_impl_.has_url_, other->_impl_.has_url_); + swap(_impl_.has_date_time_, other->_impl_.has_date_time_); + swap(_impl_.has_side_of_street_, other->_impl_.has_side_of_street_); swap(_impl_.has_heading_tolerance_, other->_impl_.has_heading_tolerance_); swap(_impl_.has_node_snap_tolerance_, other->_impl_.has_node_snap_tolerance_); + swap(_impl_.has_way_id_, other->_impl_.has_way_id_); swap(_impl_.has_minimum_reachability_, other->_impl_.has_minimum_reachability_); swap(_impl_.has_radius_, other->_impl_.has_radius_); swap(_impl_.has_accuracy_, other->_impl_.has_accuracy_); swap(_impl_.has_time_, other->_impl_.has_time_); + swap(_impl_.has_skip_ranking_candidates_, other->_impl_.has_skip_ranking_candidates_); + swap(_impl_.has_original_index_, other->_impl_.has_original_index_); + swap(_impl_.has_leg_shape_index_, other->_impl_.has_leg_shape_index_); + swap(_impl_.has_distance_from_leg_origin_, other->_impl_.has_distance_from_leg_origin_); + swap(_impl_.has_preferred_side_, other->_impl_.has_preferred_side_); swap(_impl_.has_search_cutoff_, other->_impl_.has_search_cutoff_); swap(_impl_.has_street_side_tolerance_, other->_impl_.has_street_side_tolerance_); + swap(_impl_.has_route_index_, other->_impl_.has_route_index_); + swap(_impl_.has_waypoint_index_, other->_impl_.has_waypoint_index_); swap(_impl_.has_street_side_max_distance_, other->_impl_.has_street_side_max_distance_); swap(_impl_.has_preferred_layer_, other->_impl_.has_preferred_layer_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); @@ -4395,6 +5592,25 @@ void Location::InternalSwap(Location* other) { swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); swap(_impl_._oneof_case_[9], other->_impl_._oneof_case_[9]); swap(_impl_._oneof_case_[10], other->_impl_._oneof_case_[10]); + swap(_impl_._oneof_case_[11], other->_impl_._oneof_case_[11]); + swap(_impl_._oneof_case_[12], other->_impl_._oneof_case_[12]); + swap(_impl_._oneof_case_[13], other->_impl_._oneof_case_[13]); + swap(_impl_._oneof_case_[14], other->_impl_._oneof_case_[14]); + swap(_impl_._oneof_case_[15], other->_impl_._oneof_case_[15]); + swap(_impl_._oneof_case_[16], other->_impl_._oneof_case_[16]); + swap(_impl_._oneof_case_[17], other->_impl_._oneof_case_[17]); + swap(_impl_._oneof_case_[18], other->_impl_._oneof_case_[18]); + swap(_impl_._oneof_case_[19], other->_impl_._oneof_case_[19]); + swap(_impl_._oneof_case_[20], other->_impl_._oneof_case_[20]); + swap(_impl_._oneof_case_[21], other->_impl_._oneof_case_[21]); + swap(_impl_._oneof_case_[22], other->_impl_._oneof_case_[22]); + swap(_impl_._oneof_case_[23], other->_impl_._oneof_case_[23]); + swap(_impl_._oneof_case_[24], other->_impl_._oneof_case_[24]); + swap(_impl_._oneof_case_[25], other->_impl_._oneof_case_[25]); + swap(_impl_._oneof_case_[26], other->_impl_._oneof_case_[26]); + swap(_impl_._oneof_case_[27], other->_impl_._oneof_case_[27]); + swap(_impl_._oneof_case_[28], other->_impl_._oneof_case_[28]); + swap(_impl_._oneof_case_[29], other->_impl_._oneof_case_[29]); } std::string Location::GetTypeName() const { @@ -4423,31 +5639,36 @@ TransitEgressInfo::TransitEgressInfo(const TransitEgressInfo& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TransitEgressInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.ll_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_onestop_id().empty()) { - _this->_impl_.onestop_id_.Set(from._internal_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } if (from._internal_has_ll()) { _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); } + clear_has_has_onestop_id(); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TransitEgressInfo) } @@ -4456,19 +5677,14 @@ inline void TransitEgressInfo::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.ll_){nullptr} + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_onestop_id(); + clear_has_has_name(); } TransitEgressInfo::~TransitEgressInfo() { @@ -4482,27 +5698,60 @@ TransitEgressInfo::~TransitEgressInfo() { inline void TransitEgressInfo::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.onestop_id_.Destroy(); - _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.ll_; + if (has_has_onestop_id()) { + clear_has_onestop_id(); + } + if (has_has_name()) { + clear_has_name(); + } } void TransitEgressInfo::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TransitEgressInfo::clear_has_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitEgressInfo) + switch (has_onestop_id_case()) { + case kOnestopId: { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} + +void TransitEgressInfo::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitEgressInfo) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; +} + + void TransitEgressInfo::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TransitEgressInfo) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.onestop_id_.ClearToEmpty(); - _impl_.name_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { delete _impl_.ll_; } _impl_.ll_ = nullptr; + clear_has_onestop_id(); + clear_has_name(); _internal_metadata_.Clear(); } @@ -4570,7 +5819,7 @@ uint8_t* TransitEgressInfo::_InternalSerialize( (void) cached_has_bits; // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { + if (_internal_has_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_onestop_id().data(), static_cast(this->_internal_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -4580,7 +5829,7 @@ uint8_t* TransitEgressInfo::_InternalSerialize( } // string name = 2; - if (!this->_internal_name().empty()) { + if (_internal_has_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -4612,20 +5861,6 @@ size_t TransitEgressInfo::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_onestop_id()); - } - - // string name = 2; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // .valhalla.LatLng ll = 3; if (this->_internal_has_ll()) { total_size += 1 + @@ -4633,6 +5868,30 @@ size_t TransitEgressInfo::ByteSizeLong() const { *_impl_.ll_); } + switch (has_onestop_id_case()) { + // string onestop_id = 1; + case kOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + switch (has_name_case()) { + // string name = 2; + case kName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -4654,16 +5913,28 @@ void TransitEgressInfo::MergeFrom(const TransitEgressInfo& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_onestop_id().empty()) { - _this->_internal_set_onestop_id(from._internal_onestop_id()); - } - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } if (from._internal_has_ll()) { _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( from._internal_ll()); } + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -4680,18 +5951,12 @@ bool TransitEgressInfo::IsInitialized() const { void TransitEgressInfo::InternalSwap(TransitEgressInfo* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.onestop_id_, lhs_arena, - &other->_impl_.onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); swap(_impl_.ll_, other->_impl_.ll_); + swap(_impl_.has_onestop_id_, other->_impl_.has_onestop_id_); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string TransitEgressInfo::GetTypeName() const { @@ -4720,31 +5985,36 @@ TransitStationInfo::TransitStationInfo(const TransitStationInfo& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TransitStationInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.ll_){nullptr} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_onestop_id().empty()) { - _this->_impl_.onestop_id_.Set(from._internal_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } if (from._internal_has_ll()) { _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); } + clear_has_has_onestop_id(); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TransitStationInfo) } @@ -4753,19 +6023,14 @@ inline void TransitStationInfo::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.ll_){nullptr} + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_onestop_id(); + clear_has_has_name(); } TransitStationInfo::~TransitStationInfo() { @@ -4779,27 +6044,60 @@ TransitStationInfo::~TransitStationInfo() { inline void TransitStationInfo::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.onestop_id_.Destroy(); - _impl_.name_.Destroy(); if (this != internal_default_instance()) delete _impl_.ll_; + if (has_has_onestop_id()) { + clear_has_onestop_id(); + } + if (has_has_name()) { + clear_has_name(); + } } void TransitStationInfo::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TransitStationInfo::clear_has_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitStationInfo) + switch (has_onestop_id_case()) { + case kOnestopId: { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} + +void TransitStationInfo::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitStationInfo) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; +} + + void TransitStationInfo::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TransitStationInfo) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.onestop_id_.ClearToEmpty(); - _impl_.name_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { delete _impl_.ll_; } _impl_.ll_ = nullptr; + clear_has_onestop_id(); + clear_has_name(); _internal_metadata_.Clear(); } @@ -4867,7 +6165,7 @@ uint8_t* TransitStationInfo::_InternalSerialize( (void) cached_has_bits; // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { + if (_internal_has_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_onestop_id().data(), static_cast(this->_internal_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -4877,7 +6175,7 @@ uint8_t* TransitStationInfo::_InternalSerialize( } // string name = 2; - if (!this->_internal_name().empty()) { + if (_internal_has_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -4909,20 +6207,6 @@ size_t TransitStationInfo::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_onestop_id()); - } - - // string name = 2; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - // .valhalla.LatLng ll = 3; if (this->_internal_has_ll()) { total_size += 1 + @@ -4930,6 +6214,30 @@ size_t TransitStationInfo::ByteSizeLong() const { *_impl_.ll_); } + switch (has_onestop_id_case()) { + // string onestop_id = 1; + case kOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + switch (has_name_case()) { + // string name = 2; + case kName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -4951,16 +6259,28 @@ void TransitStationInfo::MergeFrom(const TransitStationInfo& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_onestop_id().empty()) { - _this->_internal_set_onestop_id(from._internal_onestop_id()); - } - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } if (from._internal_has_ll()) { _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( from._internal_ll()); } + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -4977,18 +6297,12 @@ bool TransitStationInfo::IsInitialized() const { void TransitStationInfo::InternalSwap(TransitStationInfo* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.onestop_id_, lhs_arena, - &other->_impl_.onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); swap(_impl_.ll_, other->_impl_.ll_); + swap(_impl_.has_onestop_id_, other->_impl_.has_onestop_id_); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string TransitStationInfo::GetTypeName() const { @@ -5012,89 +6326,117 @@ BikeShareStationInfo::BikeShareStationInfo(const BikeShareStationInfo& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { BikeShareStationInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.ref_){} - , decltype(_impl_.network_){} - , decltype(_impl_.operator__){} - , decltype(_impl_.capacity_){} - , decltype(_impl_.rent_cost_){} - , decltype(_impl_.return_cost_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.ref_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.ref_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_ref().empty()) { - _this->_impl_.ref_.Set(from._internal_ref(), - _this->GetArenaForAllocation()); - } - _impl_.network_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.network_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_network().empty()) { - _this->_impl_.network_.Set(from._internal_network(), - _this->GetArenaForAllocation()); - } - _impl_.operator__.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator__.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_operator_().empty()) { - _this->_impl_.operator__.Set(from._internal_operator_(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.capacity_, &from._impl_.capacity_, - static_cast(reinterpret_cast(&_impl_.return_cost_) - - reinterpret_cast(&_impl_.capacity_)) + sizeof(_impl_.return_cost_)); - // @@protoc_insertion_point(copy_constructor:valhalla.BikeShareStationInfo) -} - -inline void BikeShareStationInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.ref_){} - , decltype(_impl_.network_){} - , decltype(_impl_.operator__){} - , decltype(_impl_.capacity_){0u} - , decltype(_impl_.rent_cost_){0} - , decltype(_impl_.return_cost_){0} + decltype(_impl_.has_name_){} + , decltype(_impl_.has_ref_){} + , decltype(_impl_.has_capacity_){} + , decltype(_impl_.has_network_){} + , decltype(_impl_.has_operator__){} + , decltype(_impl_.has_rent_cost_){} + , decltype(_impl_.has_return_cost_){} , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.ref_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.ref_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.network_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.network_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator__.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator__.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} + , /*decltype(_impl_._oneof_case_)*/{}}; -BikeShareStationInfo::~BikeShareStationInfo() { - // @@protoc_insertion_point(destructor:valhalla.BikeShareStationInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + clear_has_has_ref(); + switch (from.has_ref_case()) { + case kRef: { + _this->_internal_set_ref(from._internal_ref()); + break; + } + case HAS_REF_NOT_SET: { + break; + } + } + clear_has_has_capacity(); + switch (from.has_capacity_case()) { + case kCapacity: { + _this->_internal_set_capacity(from._internal_capacity()); + break; + } + case HAS_CAPACITY_NOT_SET: { + break; + } + } + clear_has_has_network(); + switch (from.has_network_case()) { + case kNetwork: { + _this->_internal_set_network(from._internal_network()); + break; + } + case HAS_NETWORK_NOT_SET: { + break; + } + } + clear_has_has_operator_(); + switch (from.has_operator__case()) { + case kOperator: { + _this->_internal_set_operator_(from._internal_operator_()); + break; + } + case HAS_OPERATOR__NOT_SET: { + break; + } + } + clear_has_has_rent_cost(); + switch (from.has_rent_cost_case()) { + case kRentCost: { + _this->_internal_set_rent_cost(from._internal_rent_cost()); + break; + } + case HAS_RENT_COST_NOT_SET: { + break; + } + } + clear_has_has_return_cost(); + switch (from.has_return_cost_case()) { + case kReturnCost: { + _this->_internal_set_return_cost(from._internal_return_cost()); + break; + } + case HAS_RETURN_COST_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.BikeShareStationInfo) +} + +inline void BikeShareStationInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.has_name_){} + , decltype(_impl_.has_ref_){} + , decltype(_impl_.has_capacity_){} + , decltype(_impl_.has_network_){} + , decltype(_impl_.has_operator__){} + , decltype(_impl_.has_rent_cost_){} + , decltype(_impl_.has_return_cost_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_has_name(); + clear_has_has_ref(); + clear_has_has_capacity(); + clear_has_has_network(); + clear_has_has_operator_(); + clear_has_has_rent_cost(); + clear_has_has_return_cost(); +} + +BikeShareStationInfo::~BikeShareStationInfo() { + // @@protoc_insertion_point(destructor:valhalla.BikeShareStationInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena()) { (void)arena; return; } @@ -5103,29 +6445,145 @@ BikeShareStationInfo::~BikeShareStationInfo() { inline void BikeShareStationInfo::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.name_.Destroy(); - _impl_.ref_.Destroy(); - _impl_.network_.Destroy(); - _impl_.operator__.Destroy(); + if (has_has_name()) { + clear_has_name(); + } + if (has_has_ref()) { + clear_has_ref(); + } + if (has_has_capacity()) { + clear_has_capacity(); + } + if (has_has_network()) { + clear_has_network(); + } + if (has_has_operator_()) { + clear_has_operator_(); + } + if (has_has_rent_cost()) { + clear_has_rent_cost(); + } + if (has_has_return_cost()) { + clear_has_return_cost(); + } } void BikeShareStationInfo::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void BikeShareStationInfo::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_NAME_NOT_SET; +} + +void BikeShareStationInfo::clear_has_ref() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_ref_case()) { + case kRef: { + _impl_.has_ref_.ref_.Destroy(); + break; + } + case HAS_REF_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_REF_NOT_SET; +} + +void BikeShareStationInfo::clear_has_capacity() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_capacity_case()) { + case kCapacity: { + // No need to clear + break; + } + case HAS_CAPACITY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_CAPACITY_NOT_SET; +} + +void BikeShareStationInfo::clear_has_network() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_network_case()) { + case kNetwork: { + _impl_.has_network_.network_.Destroy(); + break; + } + case HAS_NETWORK_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_NETWORK_NOT_SET; +} + +void BikeShareStationInfo::clear_has_operator_() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_operator__case()) { + case kOperator: { + _impl_.has_operator__.operator__.Destroy(); + break; + } + case HAS_OPERATOR__NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_OPERATOR__NOT_SET; +} + +void BikeShareStationInfo::clear_has_rent_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_rent_cost_case()) { + case kRentCost: { + // No need to clear + break; + } + case HAS_RENT_COST_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_RENT_COST_NOT_SET; +} + +void BikeShareStationInfo::clear_has_return_cost() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.BikeShareStationInfo) + switch (has_return_cost_case()) { + case kReturnCost: { + // No need to clear + break; + } + case HAS_RETURN_COST_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_RETURN_COST_NOT_SET; +} + + void BikeShareStationInfo::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.BikeShareStationInfo) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.name_.ClearToEmpty(); - _impl_.ref_.ClearToEmpty(); - _impl_.network_.ClearToEmpty(); - _impl_.operator__.ClearToEmpty(); - ::memset(&_impl_.capacity_, 0, static_cast( - reinterpret_cast(&_impl_.return_cost_) - - reinterpret_cast(&_impl_.capacity_)) + sizeof(_impl_.return_cost_)); + clear_has_name(); + clear_has_ref(); + clear_has_capacity(); + clear_has_network(); + clear_has_operator_(); + clear_has_rent_cost(); + clear_has_return_cost(); _internal_metadata_.Clear(); } @@ -5158,7 +6616,7 @@ const char* BikeShareStationInfo::_InternalParse(const char* ptr, ::_pbi::ParseC // uint32 capacity = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_capacity(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -5186,7 +6644,7 @@ const char* BikeShareStationInfo::_InternalParse(const char* ptr, ::_pbi::ParseC // float rent_cost = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 53)) { - _impl_.rent_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_rent_cost(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -5194,7 +6652,7 @@ const char* BikeShareStationInfo::_InternalParse(const char* ptr, ::_pbi::ParseC // float return_cost = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 61)) { - _impl_.return_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + _internal_set_return_cost(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(float); } else goto handle_unusual; @@ -5229,7 +6687,7 @@ uint8_t* BikeShareStationInfo::_InternalSerialize( (void) cached_has_bits; // string name = 1; - if (!this->_internal_name().empty()) { + if (_internal_has_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5239,7 +6697,7 @@ uint8_t* BikeShareStationInfo::_InternalSerialize( } // string ref = 2; - if (!this->_internal_ref().empty()) { + if (_internal_has_ref()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_ref().data(), static_cast(this->_internal_ref().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5249,13 +6707,13 @@ uint8_t* BikeShareStationInfo::_InternalSerialize( } // uint32 capacity = 3; - if (this->_internal_capacity() != 0) { + if (_internal_has_capacity()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_capacity(), target); } // string network = 4; - if (!this->_internal_network().empty()) { + if (_internal_has_network()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_network().data(), static_cast(this->_internal_network().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5265,7 +6723,7 @@ uint8_t* BikeShareStationInfo::_InternalSerialize( } // string operator = 5; - if (!this->_internal_operator_().empty()) { + if (_internal_has_operator_()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_operator_().data(), static_cast(this->_internal_operator_().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5275,21 +6733,13 @@ uint8_t* BikeShareStationInfo::_InternalSerialize( } // float rent_cost = 6; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_rent_cost = this->_internal_rent_cost(); - uint32_t raw_rent_cost; - memcpy(&raw_rent_cost, &tmp_rent_cost, sizeof(tmp_rent_cost)); - if (raw_rent_cost != 0) { + if (_internal_has_rent_cost()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_rent_cost(), target); } // float return_cost = 7; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_return_cost = this->_internal_return_cost(); - uint32_t raw_return_cost; - memcpy(&raw_return_cost, &tmp_return_cost, sizeof(tmp_return_cost)); - if (raw_return_cost != 0) { + if (_internal_has_return_cost()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_return_cost(), target); } @@ -5310,57 +6760,84 @@ size_t BikeShareStationInfo::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); + switch (has_name_case()) { + // string name = 1; + case kName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } } - - // string ref = 2; - if (!this->_internal_ref().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_ref()); + switch (has_ref_case()) { + // string ref = 2; + case kRef: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_ref()); + break; + } + case HAS_REF_NOT_SET: { + break; + } } - - // string network = 4; - if (!this->_internal_network().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_network()); + switch (has_capacity_case()) { + // uint32 capacity = 3; + case kCapacity: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_capacity()); + break; + } + case HAS_CAPACITY_NOT_SET: { + break; + } } - - // string operator = 5; - if (!this->_internal_operator_().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_operator_()); + switch (has_network_case()) { + // string network = 4; + case kNetwork: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_network()); + break; + } + case HAS_NETWORK_NOT_SET: { + break; + } } - - // uint32 capacity = 3; - if (this->_internal_capacity() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_capacity()); + switch (has_operator__case()) { + // string operator = 5; + case kOperator: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_operator_()); + break; + } + case HAS_OPERATOR__NOT_SET: { + break; + } } - - // float rent_cost = 6; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_rent_cost = this->_internal_rent_cost(); - uint32_t raw_rent_cost; - memcpy(&raw_rent_cost, &tmp_rent_cost, sizeof(tmp_rent_cost)); - if (raw_rent_cost != 0) { - total_size += 1 + 4; + switch (has_rent_cost_case()) { + // float rent_cost = 6; + case kRentCost: { + total_size += 1 + 4; + break; + } + case HAS_RENT_COST_NOT_SET: { + break; + } } - - // float return_cost = 7; - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_return_cost = this->_internal_return_cost(); - uint32_t raw_return_cost; - memcpy(&raw_return_cost, &tmp_return_cost, sizeof(tmp_return_cost)); - if (raw_return_cost != 0) { - total_size += 1 + 4; + switch (has_return_cost_case()) { + // float return_cost = 7; + case kReturnCost: { + total_size += 1 + 4; + break; + } + case HAS_RETURN_COST_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -5382,34 +6859,68 @@ void BikeShareStationInfo::MergeFrom(const BikeShareStationInfo& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } } - if (!from._internal_ref().empty()) { - _this->_internal_set_ref(from._internal_ref()); + switch (from.has_ref_case()) { + case kRef: { + _this->_internal_set_ref(from._internal_ref()); + break; + } + case HAS_REF_NOT_SET: { + break; + } } - if (!from._internal_network().empty()) { - _this->_internal_set_network(from._internal_network()); + switch (from.has_capacity_case()) { + case kCapacity: { + _this->_internal_set_capacity(from._internal_capacity()); + break; + } + case HAS_CAPACITY_NOT_SET: { + break; + } } - if (!from._internal_operator_().empty()) { - _this->_internal_set_operator_(from._internal_operator_()); + switch (from.has_network_case()) { + case kNetwork: { + _this->_internal_set_network(from._internal_network()); + break; + } + case HAS_NETWORK_NOT_SET: { + break; + } } - if (from._internal_capacity() != 0) { - _this->_internal_set_capacity(from._internal_capacity()); + switch (from.has_operator__case()) { + case kOperator: { + _this->_internal_set_operator_(from._internal_operator_()); + break; + } + case HAS_OPERATOR__NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_rent_cost = from._internal_rent_cost(); - uint32_t raw_rent_cost; - memcpy(&raw_rent_cost, &tmp_rent_cost, sizeof(tmp_rent_cost)); - if (raw_rent_cost != 0) { - _this->_internal_set_rent_cost(from._internal_rent_cost()); + switch (from.has_rent_cost_case()) { + case kRentCost: { + _this->_internal_set_rent_cost(from._internal_rent_cost()); + break; + } + case HAS_RENT_COST_NOT_SET: { + break; + } } - static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); - float tmp_return_cost = from._internal_return_cost(); - uint32_t raw_return_cost; - memcpy(&raw_return_cost, &tmp_return_cost, sizeof(tmp_return_cost)); - if (raw_return_cost != 0) { - _this->_internal_set_return_cost(from._internal_return_cost()); + switch (from.has_return_cost_case()) { + case kReturnCost: { + _this->_internal_set_return_cost(from._internal_return_cost()); + break; + } + case HAS_RETURN_COST_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -5427,31 +6938,21 @@ bool BikeShareStationInfo::IsInitialized() const { void BikeShareStationInfo::InternalSwap(BikeShareStationInfo* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.ref_, lhs_arena, - &other->_impl_.ref_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.network_, lhs_arena, - &other->_impl_.network_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.operator__, lhs_arena, - &other->_impl_.operator__, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(BikeShareStationInfo, _impl_.return_cost_) - + sizeof(BikeShareStationInfo::_impl_.return_cost_) - - PROTOBUF_FIELD_OFFSET(BikeShareStationInfo, _impl_.capacity_)>( - reinterpret_cast(&_impl_.capacity_), - reinterpret_cast(&other->_impl_.capacity_)); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_.has_ref_, other->_impl_.has_ref_); + swap(_impl_.has_capacity_, other->_impl_.has_capacity_); + swap(_impl_.has_network_, other->_impl_.has_network_); + swap(_impl_.has_operator__, other->_impl_.has_operator__); + swap(_impl_.has_rent_cost_, other->_impl_.has_rent_cost_); + swap(_impl_.has_return_cost_, other->_impl_.has_return_cost_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); } std::string BikeShareStationInfo::GetTypeName() const { @@ -5480,72 +6981,102 @@ TransitPlatformInfo::TransitPlatformInfo(const TransitPlatformInfo& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TransitPlatformInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.arrival_date_time_){} - , decltype(_impl_.departure_date_time_){} - , decltype(_impl_.station_onestop_id_){} - , decltype(_impl_.station_name_){} - , decltype(_impl_.ll_){nullptr} - , decltype(_impl_.type_){} - , decltype(_impl_.assumed_schedule_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_arrival_date_time_){} + , decltype(_impl_.has_departure_date_time_){} + , decltype(_impl_.has_assumed_schedule_){} + , decltype(_impl_.has_station_onestop_id_){} + , decltype(_impl_.has_station_name_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_onestop_id().empty()) { - _this->_impl_.onestop_id_.Set(from._internal_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.arrival_date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrival_date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_arrival_date_time().empty()) { - _this->_impl_.arrival_date_time_.Set(from._internal_arrival_date_time(), - _this->GetArenaForAllocation()); - } - _impl_.departure_date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.departure_date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_departure_date_time().empty()) { - _this->_impl_.departure_date_time_.Set(from._internal_departure_date_time(), - _this->GetArenaForAllocation()); - } - _impl_.station_onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_station_onestop_id().empty()) { - _this->_impl_.station_onestop_id_.Set(from._internal_station_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.station_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_station_name().empty()) { - _this->_impl_.station_name_.Set(from._internal_station_name(), - _this->GetArenaForAllocation()); - } if (from._internal_has_ll()) { _this->_impl_.ll_ = new ::valhalla::LatLng(*from._impl_.ll_); } - ::memcpy(&_impl_.type_, &from._impl_.type_, - static_cast(reinterpret_cast(&_impl_.assumed_schedule_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.assumed_schedule_)); + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + clear_has_has_onestop_id(); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_name(); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + clear_has_has_arrival_date_time(); + switch (from.has_arrival_date_time_case()) { + case kArrivalDateTime: { + _this->_internal_set_arrival_date_time(from._internal_arrival_date_time()); + break; + } + case HAS_ARRIVAL_DATE_TIME_NOT_SET: { + break; + } + } + clear_has_has_departure_date_time(); + switch (from.has_departure_date_time_case()) { + case kDepartureDateTime: { + _this->_internal_set_departure_date_time(from._internal_departure_date_time()); + break; + } + case HAS_DEPARTURE_DATE_TIME_NOT_SET: { + break; + } + } + clear_has_has_assumed_schedule(); + switch (from.has_assumed_schedule_case()) { + case kAssumedSchedule: { + _this->_internal_set_assumed_schedule(from._internal_assumed_schedule()); + break; + } + case HAS_ASSUMED_SCHEDULE_NOT_SET: { + break; + } + } + clear_has_has_station_onestop_id(); + switch (from.has_station_onestop_id_case()) { + case kStationOnestopId: { + _this->_internal_set_station_onestop_id(from._internal_station_onestop_id()); + break; + } + case HAS_STATION_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_station_name(); + switch (from.has_station_name_case()) { + case kStationName: { + _this->_internal_set_station_name(from._internal_station_name()); + break; + } + case HAS_STATION_NAME_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TransitPlatformInfo) } @@ -5554,41 +7085,26 @@ inline void TransitPlatformInfo::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.onestop_id_){} - , decltype(_impl_.name_){} - , decltype(_impl_.arrival_date_time_){} - , decltype(_impl_.departure_date_time_){} - , decltype(_impl_.station_onestop_id_){} - , decltype(_impl_.station_name_){} - , decltype(_impl_.ll_){nullptr} - , decltype(_impl_.type_){0} - , decltype(_impl_.assumed_schedule_){false} + decltype(_impl_.ll_){nullptr} + , decltype(_impl_.has_type_){} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_name_){} + , decltype(_impl_.has_arrival_date_time_){} + , decltype(_impl_.has_departure_date_time_){} + , decltype(_impl_.has_assumed_schedule_){} + , decltype(_impl_.has_station_onestop_id_){} + , decltype(_impl_.has_station_name_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrival_date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.arrival_date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.departure_date_time_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.departure_date_time_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.station_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_type(); + clear_has_has_onestop_id(); + clear_has_has_name(); + clear_has_has_arrival_date_time(); + clear_has_has_departure_date_time(); + clear_has_has_assumed_schedule(); + clear_has_has_station_onestop_id(); + clear_has_has_station_name(); } TransitPlatformInfo::~TransitPlatformInfo() { @@ -5602,38 +7118,168 @@ TransitPlatformInfo::~TransitPlatformInfo() { inline void TransitPlatformInfo::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.onestop_id_.Destroy(); - _impl_.name_.Destroy(); - _impl_.arrival_date_time_.Destroy(); - _impl_.departure_date_time_.Destroy(); - _impl_.station_onestop_id_.Destroy(); - _impl_.station_name_.Destroy(); if (this != internal_default_instance()) delete _impl_.ll_; + if (has_has_type()) { + clear_has_type(); + } + if (has_has_onestop_id()) { + clear_has_onestop_id(); + } + if (has_has_name()) { + clear_has_name(); + } + if (has_has_arrival_date_time()) { + clear_has_arrival_date_time(); + } + if (has_has_departure_date_time()) { + clear_has_departure_date_time(); + } + if (has_has_assumed_schedule()) { + clear_has_assumed_schedule(); + } + if (has_has_station_onestop_id()) { + clear_has_station_onestop_id(); + } + if (has_has_station_name()) { + clear_has_station_name(); + } } void TransitPlatformInfo::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -void TransitPlatformInfo::Clear() { -// @@protoc_insertion_point(message_clear_start:valhalla.TransitPlatformInfo) - uint32_t cached_has_bits = 0; +void TransitPlatformInfo::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} + +void TransitPlatformInfo::clear_has_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_onestop_id_case()) { + case kOnestopId: { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_ONESTOP_ID_NOT_SET; +} + +void TransitPlatformInfo::clear_has_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_name_case()) { + case kName: { + _impl_.has_name_.name_.Destroy(); + break; + } + case HAS_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_NAME_NOT_SET; +} + +void TransitPlatformInfo::clear_has_arrival_date_time() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_arrival_date_time_case()) { + case kArrivalDateTime: { + _impl_.has_arrival_date_time_.arrival_date_time_.Destroy(); + break; + } + case HAS_ARRIVAL_DATE_TIME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_ARRIVAL_DATE_TIME_NOT_SET; +} + +void TransitPlatformInfo::clear_has_departure_date_time() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_departure_date_time_case()) { + case kDepartureDateTime: { + _impl_.has_departure_date_time_.departure_date_time_.Destroy(); + break; + } + case HAS_DEPARTURE_DATE_TIME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_DEPARTURE_DATE_TIME_NOT_SET; +} + +void TransitPlatformInfo::clear_has_assumed_schedule() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_assumed_schedule_case()) { + case kAssumedSchedule: { + // No need to clear + break; + } + case HAS_ASSUMED_SCHEDULE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_ASSUMED_SCHEDULE_NOT_SET; +} + +void TransitPlatformInfo::clear_has_station_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_station_onestop_id_case()) { + case kStationOnestopId: { + _impl_.has_station_onestop_id_.station_onestop_id_.Destroy(); + break; + } + case HAS_STATION_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_STATION_ONESTOP_ID_NOT_SET; +} + +void TransitPlatformInfo::clear_has_station_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitPlatformInfo) + switch (has_station_name_case()) { + case kStationName: { + _impl_.has_station_name_.station_name_.Destroy(); + break; + } + case HAS_STATION_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_STATION_NAME_NOT_SET; +} + + +void TransitPlatformInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:valhalla.TransitPlatformInfo) + uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.onestop_id_.ClearToEmpty(); - _impl_.name_.ClearToEmpty(); - _impl_.arrival_date_time_.ClearToEmpty(); - _impl_.departure_date_time_.ClearToEmpty(); - _impl_.station_onestop_id_.ClearToEmpty(); - _impl_.station_name_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { delete _impl_.ll_; } _impl_.ll_ = nullptr; - ::memset(&_impl_.type_, 0, static_cast( - reinterpret_cast(&_impl_.assumed_schedule_) - - reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.assumed_schedule_)); + clear_has_type(); + clear_has_onestop_id(); + clear_has_name(); + clear_has_arrival_date_time(); + clear_has_departure_date_time(); + clear_has_assumed_schedule(); + clear_has_station_onestop_id(); + clear_has_station_name(); _internal_metadata_.Clear(); } @@ -5695,7 +7341,7 @@ const char* TransitPlatformInfo::_InternalParse(const char* ptr, ::_pbi::ParseCo // bool assumed_schedule = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _impl_.assumed_schedule_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_assumed_schedule(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -5758,14 +7404,14 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( (void) cached_has_bits; // .valhalla.TransitPlatformInfo.Type type = 1; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 1, this->_internal_type(), target); } // string onestop_id = 2; - if (!this->_internal_onestop_id().empty()) { + if (_internal_has_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_onestop_id().data(), static_cast(this->_internal_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5775,7 +7421,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // string name = 3; - if (!this->_internal_name().empty()) { + if (_internal_has_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_name().data(), static_cast(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5785,7 +7431,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // string arrival_date_time = 4; - if (!this->_internal_arrival_date_time().empty()) { + if (_internal_has_arrival_date_time()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_arrival_date_time().data(), static_cast(this->_internal_arrival_date_time().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5795,7 +7441,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // string departure_date_time = 5; - if (!this->_internal_departure_date_time().empty()) { + if (_internal_has_departure_date_time()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_departure_date_time().data(), static_cast(this->_internal_departure_date_time().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5805,7 +7451,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // bool assumed_schedule = 6; - if (this->_internal_assumed_schedule() != 0) { + if (_internal_has_assumed_schedule()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_assumed_schedule(), target); } @@ -5818,7 +7464,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // string station_onestop_id = 8; - if (!this->_internal_station_onestop_id().empty()) { + if (_internal_has_station_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_station_onestop_id().data(), static_cast(this->_internal_station_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5828,7 +7474,7 @@ uint8_t* TransitPlatformInfo::_InternalSerialize( } // string station_name = 9; - if (!this->_internal_station_name().empty()) { + if (_internal_has_station_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_station_name().data(), static_cast(this->_internal_station_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -5853,66 +7499,106 @@ size_t TransitPlatformInfo::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string onestop_id = 2; - if (!this->_internal_onestop_id().empty()) { + // .valhalla.LatLng ll = 7; + if (this->_internal_has_ll()) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_onestop_id()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.ll_); } - // string name = 3; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); + switch (has_type_case()) { + // .valhalla.TransitPlatformInfo.Type type = 1; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - - // string arrival_date_time = 4; - if (!this->_internal_arrival_date_time().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_arrival_date_time()); + switch (has_onestop_id_case()) { + // string onestop_id = 2; + case kOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } } - - // string departure_date_time = 5; - if (!this->_internal_departure_date_time().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_departure_date_time()); + switch (has_name_case()) { + // string name = 3; + case kName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } } - - // string station_onestop_id = 8; - if (!this->_internal_station_onestop_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_station_onestop_id()); + switch (has_arrival_date_time_case()) { + // string arrival_date_time = 4; + case kArrivalDateTime: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_arrival_date_time()); + break; + } + case HAS_ARRIVAL_DATE_TIME_NOT_SET: { + break; + } } - - // string station_name = 9; - if (!this->_internal_station_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_station_name()); + switch (has_departure_date_time_case()) { + // string departure_date_time = 5; + case kDepartureDateTime: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_departure_date_time()); + break; + } + case HAS_DEPARTURE_DATE_TIME_NOT_SET: { + break; + } } - - // .valhalla.LatLng ll = 7; - if (this->_internal_has_ll()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.ll_); + switch (has_assumed_schedule_case()) { + // bool assumed_schedule = 6; + case kAssumedSchedule: { + total_size += 1 + 1; + break; + } + case HAS_ASSUMED_SCHEDULE_NOT_SET: { + break; + } } - - // .valhalla.TransitPlatformInfo.Type type = 1; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_station_onestop_id_case()) { + // string station_onestop_id = 8; + case kStationOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_station_onestop_id()); + break; + } + case HAS_STATION_ONESTOP_ID_NOT_SET: { + break; + } } - - // bool assumed_schedule = 6; - if (this->_internal_assumed_schedule() != 0) { - total_size += 1 + 1; + switch (has_station_name_case()) { + // string station_name = 9; + case kStationName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_station_name()); + break; + } + case HAS_STATION_NAME_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -5934,271 +7620,536 @@ void TransitPlatformInfo::MergeFrom(const TransitPlatformInfo& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_onestop_id().empty()) { - _this->_internal_set_onestop_id(from._internal_onestop_id()); + if (from._internal_has_ll()) { + _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( + from._internal_ll()); } - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (!from._internal_arrival_date_time().empty()) { - _this->_internal_set_arrival_date_time(from._internal_arrival_date_time()); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } } - if (!from._internal_departure_date_time().empty()) { - _this->_internal_set_departure_date_time(from._internal_departure_date_time()); + switch (from.has_name_case()) { + case kName: { + _this->_internal_set_name(from._internal_name()); + break; + } + case HAS_NAME_NOT_SET: { + break; + } } - if (!from._internal_station_onestop_id().empty()) { - _this->_internal_set_station_onestop_id(from._internal_station_onestop_id()); + switch (from.has_arrival_date_time_case()) { + case kArrivalDateTime: { + _this->_internal_set_arrival_date_time(from._internal_arrival_date_time()); + break; + } + case HAS_ARRIVAL_DATE_TIME_NOT_SET: { + break; + } } - if (!from._internal_station_name().empty()) { - _this->_internal_set_station_name(from._internal_station_name()); + switch (from.has_departure_date_time_case()) { + case kDepartureDateTime: { + _this->_internal_set_departure_date_time(from._internal_departure_date_time()); + break; + } + case HAS_DEPARTURE_DATE_TIME_NOT_SET: { + break; + } } - if (from._internal_has_ll()) { - _this->_internal_mutable_ll()->::valhalla::LatLng::MergeFrom( - from._internal_ll()); + switch (from.has_assumed_schedule_case()) { + case kAssumedSchedule: { + _this->_internal_set_assumed_schedule(from._internal_assumed_schedule()); + break; + } + case HAS_ASSUMED_SCHEDULE_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_station_onestop_id_case()) { + case kStationOnestopId: { + _this->_internal_set_station_onestop_id(from._internal_station_onestop_id()); + break; + } + case HAS_STATION_ONESTOP_ID_NOT_SET: { + break; + } } - if (from._internal_assumed_schedule() != 0) { - _this->_internal_set_assumed_schedule(from._internal_assumed_schedule()); + switch (from.has_station_name_case()) { + case kStationName: { + _this->_internal_set_station_name(from._internal_station_name()); + break; + } + case HAS_STATION_NAME_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } -void TransitPlatformInfo::CopyFrom(const TransitPlatformInfo& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.TransitPlatformInfo) - if (&from == this) return; - Clear(); - MergeFrom(from); +void TransitPlatformInfo::CopyFrom(const TransitPlatformInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:valhalla.TransitPlatformInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TransitPlatformInfo::IsInitialized() const { + return true; +} + +void TransitPlatformInfo::InternalSwap(TransitPlatformInfo* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.ll_, other->_impl_.ll_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_.has_onestop_id_, other->_impl_.has_onestop_id_); + swap(_impl_.has_name_, other->_impl_.has_name_); + swap(_impl_.has_arrival_date_time_, other->_impl_.has_arrival_date_time_); + swap(_impl_.has_departure_date_time_, other->_impl_.has_departure_date_time_); + swap(_impl_.has_assumed_schedule_, other->_impl_.has_assumed_schedule_); + swap(_impl_.has_station_onestop_id_, other->_impl_.has_station_onestop_id_); + swap(_impl_.has_station_name_, other->_impl_.has_station_name_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); +} + +std::string TransitPlatformInfo::GetTypeName() const { + return "valhalla.TransitPlatformInfo"; +} + + +// =================================================================== + +class TransitRouteInfo::_Internal { + public: +}; + +TransitRouteInfo::TransitRouteInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:valhalla.TransitRouteInfo) +} +TransitRouteInfo::TransitRouteInfo(const TransitRouteInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + TransitRouteInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.transit_stops_){from._impl_.transit_stops_} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_block_id_){} + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_short_name_){} + , decltype(_impl_.has_long_name_){} + , decltype(_impl_.has_headsign_){} + , decltype(_impl_.has_color_){} + , decltype(_impl_.has_text_color_){} + , decltype(_impl_.has_description_){} + , decltype(_impl_.has_operator_onestop_id_){} + , decltype(_impl_.has_operator_name_){} + , decltype(_impl_.has_operator_url_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; + + _internal_metadata_.MergeFrom(from._internal_metadata_); + clear_has_has_onestop_id(); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_block_id(); + switch (from.has_block_id_case()) { + case kBlockId: { + _this->_internal_set_block_id(from._internal_block_id()); + break; + } + case HAS_BLOCK_ID_NOT_SET: { + break; + } + } + clear_has_has_trip_id(); + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + clear_has_has_short_name(); + switch (from.has_short_name_case()) { + case kShortName: { + _this->_internal_set_short_name(from._internal_short_name()); + break; + } + case HAS_SHORT_NAME_NOT_SET: { + break; + } + } + clear_has_has_long_name(); + switch (from.has_long_name_case()) { + case kLongName: { + _this->_internal_set_long_name(from._internal_long_name()); + break; + } + case HAS_LONG_NAME_NOT_SET: { + break; + } + } + clear_has_has_headsign(); + switch (from.has_headsign_case()) { + case kHeadsign: { + _this->_internal_set_headsign(from._internal_headsign()); + break; + } + case HAS_HEADSIGN_NOT_SET: { + break; + } + } + clear_has_has_color(); + switch (from.has_color_case()) { + case kColor: { + _this->_internal_set_color(from._internal_color()); + break; + } + case HAS_COLOR_NOT_SET: { + break; + } + } + clear_has_has_text_color(); + switch (from.has_text_color_case()) { + case kTextColor: { + _this->_internal_set_text_color(from._internal_text_color()); + break; + } + case HAS_TEXT_COLOR_NOT_SET: { + break; + } + } + clear_has_has_description(); + switch (from.has_description_case()) { + case kDescription: { + _this->_internal_set_description(from._internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } + } + clear_has_has_operator_onestop_id(); + switch (from.has_operator_onestop_id_case()) { + case kOperatorOnestopId: { + _this->_internal_set_operator_onestop_id(from._internal_operator_onestop_id()); + break; + } + case HAS_OPERATOR_ONESTOP_ID_NOT_SET: { + break; + } + } + clear_has_has_operator_name(); + switch (from.has_operator_name_case()) { + case kOperatorName: { + _this->_internal_set_operator_name(from._internal_operator_name()); + break; + } + case HAS_OPERATOR_NAME_NOT_SET: { + break; + } + } + clear_has_has_operator_url(); + switch (from.has_operator_url_case()) { + case kOperatorUrl: { + _this->_internal_set_operator_url(from._internal_operator_url()); + break; + } + case HAS_OPERATOR_URL_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:valhalla.TransitRouteInfo) +} + +inline void TransitRouteInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.transit_stops_){arena} + , decltype(_impl_.has_onestop_id_){} + , decltype(_impl_.has_block_id_){} + , decltype(_impl_.has_trip_id_){} + , decltype(_impl_.has_short_name_){} + , decltype(_impl_.has_long_name_){} + , decltype(_impl_.has_headsign_){} + , decltype(_impl_.has_color_){} + , decltype(_impl_.has_text_color_){} + , decltype(_impl_.has_description_){} + , decltype(_impl_.has_operator_onestop_id_){} + , decltype(_impl_.has_operator_name_){} + , decltype(_impl_.has_operator_url_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_has_onestop_id(); + clear_has_has_block_id(); + clear_has_has_trip_id(); + clear_has_has_short_name(); + clear_has_has_long_name(); + clear_has_has_headsign(); + clear_has_has_color(); + clear_has_has_text_color(); + clear_has_has_description(); + clear_has_has_operator_onestop_id(); + clear_has_has_operator_name(); + clear_has_has_operator_url(); +} + +TransitRouteInfo::~TransitRouteInfo() { + // @@protoc_insertion_point(destructor:valhalla.TransitRouteInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void TransitRouteInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.transit_stops_.~RepeatedPtrField(); + if (has_has_onestop_id()) { + clear_has_onestop_id(); + } + if (has_has_block_id()) { + clear_has_block_id(); + } + if (has_has_trip_id()) { + clear_has_trip_id(); + } + if (has_has_short_name()) { + clear_has_short_name(); + } + if (has_has_long_name()) { + clear_has_long_name(); + } + if (has_has_headsign()) { + clear_has_headsign(); + } + if (has_has_color()) { + clear_has_color(); + } + if (has_has_text_color()) { + clear_has_text_color(); + } + if (has_has_description()) { + clear_has_description(); + } + if (has_has_operator_onestop_id()) { + clear_has_operator_onestop_id(); + } + if (has_has_operator_name()) { + clear_has_operator_name(); + } + if (has_has_operator_url()) { + clear_has_operator_url(); + } +} + +void TransitRouteInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void TransitRouteInfo::clear_has_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_onestop_id_case()) { + case kOnestopId: { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} + +void TransitRouteInfo::clear_has_block_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_block_id_case()) { + case kBlockId: { + // No need to clear + break; + } + case HAS_BLOCK_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_BLOCK_ID_NOT_SET; +} + +void TransitRouteInfo::clear_has_trip_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_trip_id_case()) { + case kTripId: { + // No need to clear + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_TRIP_ID_NOT_SET; +} + +void TransitRouteInfo::clear_has_short_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_short_name_case()) { + case kShortName: { + _impl_.has_short_name_.short_name_.Destroy(); + break; + } + case HAS_SHORT_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[3] = HAS_SHORT_NAME_NOT_SET; } -bool TransitPlatformInfo::IsInitialized() const { - return true; +void TransitRouteInfo::clear_has_long_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_long_name_case()) { + case kLongName: { + _impl_.has_long_name_.long_name_.Destroy(); + break; + } + case HAS_LONG_NAME_NOT_SET: { + break; + } + } + _impl_._oneof_case_[4] = HAS_LONG_NAME_NOT_SET; } -void TransitPlatformInfo::InternalSwap(TransitPlatformInfo* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.onestop_id_, lhs_arena, - &other->_impl_.onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.arrival_date_time_, lhs_arena, - &other->_impl_.arrival_date_time_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.departure_date_time_, lhs_arena, - &other->_impl_.departure_date_time_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.station_onestop_id_, lhs_arena, - &other->_impl_.station_onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.station_name_, lhs_arena, - &other->_impl_.station_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TransitPlatformInfo, _impl_.assumed_schedule_) - + sizeof(TransitPlatformInfo::_impl_.assumed_schedule_) - - PROTOBUF_FIELD_OFFSET(TransitPlatformInfo, _impl_.ll_)>( - reinterpret_cast(&_impl_.ll_), - reinterpret_cast(&other->_impl_.ll_)); +void TransitRouteInfo::clear_has_headsign() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_headsign_case()) { + case kHeadsign: { + _impl_.has_headsign_.headsign_.Destroy(); + break; + } + case HAS_HEADSIGN_NOT_SET: { + break; + } + } + _impl_._oneof_case_[5] = HAS_HEADSIGN_NOT_SET; } -std::string TransitPlatformInfo::GetTypeName() const { - return "valhalla.TransitPlatformInfo"; +void TransitRouteInfo::clear_has_color() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_color_case()) { + case kColor: { + // No need to clear + break; + } + case HAS_COLOR_NOT_SET: { + break; + } + } + _impl_._oneof_case_[6] = HAS_COLOR_NOT_SET; } - -// =================================================================== - -class TransitRouteInfo::_Internal { - public: -}; - -TransitRouteInfo::TransitRouteInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { - SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:valhalla.TransitRouteInfo) +void TransitRouteInfo::clear_has_text_color() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_text_color_case()) { + case kTextColor: { + // No need to clear + break; + } + case HAS_TEXT_COLOR_NOT_SET: { + break; + } + } + _impl_._oneof_case_[7] = HAS_TEXT_COLOR_NOT_SET; } -TransitRouteInfo::TransitRouteInfo(const TransitRouteInfo& from) - : ::PROTOBUF_NAMESPACE_ID::MessageLite() { - TransitRouteInfo* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.transit_stops_){from._impl_.transit_stops_} - , decltype(_impl_.onestop_id_){} - , decltype(_impl_.short_name_){} - , decltype(_impl_.long_name_){} - , decltype(_impl_.headsign_){} - , decltype(_impl_.description_){} - , decltype(_impl_.operator_onestop_id_){} - , decltype(_impl_.operator_name_){} - , decltype(_impl_.operator_url_){} - , decltype(_impl_.block_id_){} - , decltype(_impl_.trip_id_){} - , decltype(_impl_.color_){} - , decltype(_impl_.text_color_){} - , /*decltype(_impl_._cached_size_)*/{}}; - _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_onestop_id().empty()) { - _this->_impl_.onestop_id_.Set(from._internal_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.short_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.short_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_short_name().empty()) { - _this->_impl_.short_name_.Set(from._internal_short_name(), - _this->GetArenaForAllocation()); - } - _impl_.long_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.long_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_long_name().empty()) { - _this->_impl_.long_name_.Set(from._internal_long_name(), - _this->GetArenaForAllocation()); - } - _impl_.headsign_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.headsign_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_headsign().empty()) { - _this->_impl_.headsign_.Set(from._internal_headsign(), - _this->GetArenaForAllocation()); - } - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_description().empty()) { - _this->_impl_.description_.Set(from._internal_description(), - _this->GetArenaForAllocation()); - } - _impl_.operator_onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_operator_onestop_id().empty()) { - _this->_impl_.operator_onestop_id_.Set(from._internal_operator_onestop_id(), - _this->GetArenaForAllocation()); - } - _impl_.operator_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_operator_name().empty()) { - _this->_impl_.operator_name_.Set(from._internal_operator_name(), - _this->GetArenaForAllocation()); - } - _impl_.operator_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_operator_url().empty()) { - _this->_impl_.operator_url_.Set(from._internal_operator_url(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.block_id_, &from._impl_.block_id_, - static_cast(reinterpret_cast(&_impl_.text_color_) - - reinterpret_cast(&_impl_.block_id_)) + sizeof(_impl_.text_color_)); - // @@protoc_insertion_point(copy_constructor:valhalla.TransitRouteInfo) +void TransitRouteInfo::clear_has_description() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_description_case()) { + case kDescription: { + _impl_.has_description_.description_.Destroy(); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[8] = HAS_DESCRIPTION_NOT_SET; } -inline void TransitRouteInfo::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.transit_stops_){arena} - , decltype(_impl_.onestop_id_){} - , decltype(_impl_.short_name_){} - , decltype(_impl_.long_name_){} - , decltype(_impl_.headsign_){} - , decltype(_impl_.description_){} - , decltype(_impl_.operator_onestop_id_){} - , decltype(_impl_.operator_name_){} - , decltype(_impl_.operator_url_){} - , decltype(_impl_.block_id_){0u} - , decltype(_impl_.trip_id_){0u} - , decltype(_impl_.color_){0u} - , decltype(_impl_.text_color_){0u} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.short_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.short_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.long_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.long_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.headsign_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.headsign_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.description_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_onestop_id_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_onestop_id_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_url_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.operator_url_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +void TransitRouteInfo::clear_has_operator_onestop_id() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_operator_onestop_id_case()) { + case kOperatorOnestopId: { + _impl_.has_operator_onestop_id_.operator_onestop_id_.Destroy(); + break; + } + case HAS_OPERATOR_ONESTOP_ID_NOT_SET: { + break; + } + } + _impl_._oneof_case_[9] = HAS_OPERATOR_ONESTOP_ID_NOT_SET; } -TransitRouteInfo::~TransitRouteInfo() { - // @@protoc_insertion_point(destructor:valhalla.TransitRouteInfo) - if (auto *arena = _internal_metadata_.DeleteReturnArena()) { - (void)arena; - return; +void TransitRouteInfo::clear_has_operator_name() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_operator_name_case()) { + case kOperatorName: { + _impl_.has_operator_name_.operator_name_.Destroy(); + break; + } + case HAS_OPERATOR_NAME_NOT_SET: { + break; + } } - SharedDtor(); + _impl_._oneof_case_[10] = HAS_OPERATOR_NAME_NOT_SET; } -inline void TransitRouteInfo::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.transit_stops_.~RepeatedPtrField(); - _impl_.onestop_id_.Destroy(); - _impl_.short_name_.Destroy(); - _impl_.long_name_.Destroy(); - _impl_.headsign_.Destroy(); - _impl_.description_.Destroy(); - _impl_.operator_onestop_id_.Destroy(); - _impl_.operator_name_.Destroy(); - _impl_.operator_url_.Destroy(); +void TransitRouteInfo::clear_has_operator_url() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TransitRouteInfo) + switch (has_operator_url_case()) { + case kOperatorUrl: { + _impl_.has_operator_url_.operator_url_.Destroy(); + break; + } + case HAS_OPERATOR_URL_NOT_SET: { + break; + } + } + _impl_._oneof_case_[11] = HAS_OPERATOR_URL_NOT_SET; } -void TransitRouteInfo::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} void TransitRouteInfo::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TransitRouteInfo) @@ -6207,17 +8158,18 @@ void TransitRouteInfo::Clear() { (void) cached_has_bits; _impl_.transit_stops_.Clear(); - _impl_.onestop_id_.ClearToEmpty(); - _impl_.short_name_.ClearToEmpty(); - _impl_.long_name_.ClearToEmpty(); - _impl_.headsign_.ClearToEmpty(); - _impl_.description_.ClearToEmpty(); - _impl_.operator_onestop_id_.ClearToEmpty(); - _impl_.operator_name_.ClearToEmpty(); - _impl_.operator_url_.ClearToEmpty(); - ::memset(&_impl_.block_id_, 0, static_cast( - reinterpret_cast(&_impl_.text_color_) - - reinterpret_cast(&_impl_.block_id_)) + sizeof(_impl_.text_color_)); + clear_has_onestop_id(); + clear_has_block_id(); + clear_has_trip_id(); + clear_has_short_name(); + clear_has_long_name(); + clear_has_headsign(); + clear_has_color(); + clear_has_text_color(); + clear_has_description(); + clear_has_operator_onestop_id(); + clear_has_operator_name(); + clear_has_operator_url(); _internal_metadata_.Clear(); } @@ -6240,7 +8192,7 @@ const char* TransitRouteInfo::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 block_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.block_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_block_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6248,7 +8200,7 @@ const char* TransitRouteInfo::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 trip_id = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.trip_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_trip_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6286,7 +8238,7 @@ const char* TransitRouteInfo::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 color = 7; case 7: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { - _impl_.color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_color(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6294,7 +8246,7 @@ const char* TransitRouteInfo::_InternalParse(const char* ptr, ::_pbi::ParseConte // uint32 text_color = 8; case 8: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { - _impl_.text_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_text_color(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -6382,7 +8334,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( (void) cached_has_bits; // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { + if (_internal_has_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_onestop_id().data(), static_cast(this->_internal_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6392,19 +8344,19 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // uint32 block_id = 2; - if (this->_internal_block_id() != 0) { + if (_internal_has_block_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_block_id(), target); } // uint32 trip_id = 3; - if (this->_internal_trip_id() != 0) { + if (_internal_has_trip_id()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_trip_id(), target); } // string short_name = 4; - if (!this->_internal_short_name().empty()) { + if (_internal_has_short_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_short_name().data(), static_cast(this->_internal_short_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6414,7 +8366,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // string long_name = 5; - if (!this->_internal_long_name().empty()) { + if (_internal_has_long_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_long_name().data(), static_cast(this->_internal_long_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6424,7 +8376,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // string headsign = 6; - if (!this->_internal_headsign().empty()) { + if (_internal_has_headsign()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_headsign().data(), static_cast(this->_internal_headsign().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6434,19 +8386,19 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // uint32 color = 7; - if (this->_internal_color() != 0) { + if (_internal_has_color()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_color(), target); } // uint32 text_color = 8; - if (this->_internal_text_color() != 0) { + if (_internal_has_text_color()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_text_color(), target); } // string description = 9; - if (!this->_internal_description().empty()) { + if (_internal_has_description()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_description().data(), static_cast(this->_internal_description().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6456,7 +8408,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // string operator_onestop_id = 10; - if (!this->_internal_operator_onestop_id().empty()) { + if (_internal_has_operator_onestop_id()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_operator_onestop_id().data(), static_cast(this->_internal_operator_onestop_id().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6466,7 +8418,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // string operator_name = 11; - if (!this->_internal_operator_name().empty()) { + if (_internal_has_operator_name()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_operator_name().data(), static_cast(this->_internal_operator_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6476,7 +8428,7 @@ uint8_t* TransitRouteInfo::_InternalSerialize( } // string operator_url = 12; - if (!this->_internal_operator_url().empty()) { + if (_internal_has_operator_url()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_operator_url().data(), static_cast(this->_internal_operator_url().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6516,82 +8468,142 @@ size_t TransitRouteInfo::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - // string onestop_id = 1; - if (!this->_internal_onestop_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_onestop_id()); + switch (has_onestop_id_case()) { + // string onestop_id = 1; + case kOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } } - - // string short_name = 4; - if (!this->_internal_short_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_short_name()); + switch (has_block_id_case()) { + // uint32 block_id = 2; + case kBlockId: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_block_id()); + break; + } + case HAS_BLOCK_ID_NOT_SET: { + break; + } } - - // string long_name = 5; - if (!this->_internal_long_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_long_name()); + switch (has_trip_id_case()) { + // uint32 trip_id = 3; + case kTripId: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } } - - // string headsign = 6; - if (!this->_internal_headsign().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_headsign()); + switch (has_short_name_case()) { + // string short_name = 4; + case kShortName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_short_name()); + break; + } + case HAS_SHORT_NAME_NOT_SET: { + break; + } } - - // string description = 9; - if (!this->_internal_description().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_description()); + switch (has_long_name_case()) { + // string long_name = 5; + case kLongName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_long_name()); + break; + } + case HAS_LONG_NAME_NOT_SET: { + break; + } } - - // string operator_onestop_id = 10; - if (!this->_internal_operator_onestop_id().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_operator_onestop_id()); + switch (has_headsign_case()) { + // string headsign = 6; + case kHeadsign: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_headsign()); + break; + } + case HAS_HEADSIGN_NOT_SET: { + break; + } } - - // string operator_name = 11; - if (!this->_internal_operator_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_operator_name()); + switch (has_color_case()) { + // uint32 color = 7; + case kColor: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_color()); + break; + } + case HAS_COLOR_NOT_SET: { + break; + } } - - // string operator_url = 12; - if (!this->_internal_operator_url().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_operator_url()); + switch (has_text_color_case()) { + // uint32 text_color = 8; + case kTextColor: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_text_color()); + break; + } + case HAS_TEXT_COLOR_NOT_SET: { + break; + } } - - // uint32 block_id = 2; - if (this->_internal_block_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_block_id()); + switch (has_description_case()) { + // string description = 9; + case kDescription: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } } - - // uint32 trip_id = 3; - if (this->_internal_trip_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_trip_id()); + switch (has_operator_onestop_id_case()) { + // string operator_onestop_id = 10; + case kOperatorOnestopId: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_operator_onestop_id()); + break; + } + case HAS_OPERATOR_ONESTOP_ID_NOT_SET: { + break; + } } - - // uint32 color = 7; - if (this->_internal_color() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_color()); + switch (has_operator_name_case()) { + // string operator_name = 11; + case kOperatorName: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_operator_name()); + break; + } + case HAS_OPERATOR_NAME_NOT_SET: { + break; + } } - - // uint32 text_color = 8; - if (this->_internal_text_color() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_text_color()); + switch (has_operator_url_case()) { + // string operator_url = 12; + case kOperatorUrl: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_operator_url()); + break; + } + case HAS_OPERATOR_URL_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -6614,41 +8626,113 @@ void TransitRouteInfo::MergeFrom(const TransitRouteInfo& from) { (void) cached_has_bits; _this->_impl_.transit_stops_.MergeFrom(from._impl_.transit_stops_); - if (!from._internal_onestop_id().empty()) { - _this->_internal_set_onestop_id(from._internal_onestop_id()); + switch (from.has_onestop_id_case()) { + case kOnestopId: { + _this->_internal_set_onestop_id(from._internal_onestop_id()); + break; + } + case HAS_ONESTOP_ID_NOT_SET: { + break; + } } - if (!from._internal_short_name().empty()) { - _this->_internal_set_short_name(from._internal_short_name()); + switch (from.has_block_id_case()) { + case kBlockId: { + _this->_internal_set_block_id(from._internal_block_id()); + break; + } + case HAS_BLOCK_ID_NOT_SET: { + break; + } } - if (!from._internal_long_name().empty()) { - _this->_internal_set_long_name(from._internal_long_name()); + switch (from.has_trip_id_case()) { + case kTripId: { + _this->_internal_set_trip_id(from._internal_trip_id()); + break; + } + case HAS_TRIP_ID_NOT_SET: { + break; + } } - if (!from._internal_headsign().empty()) { - _this->_internal_set_headsign(from._internal_headsign()); + switch (from.has_short_name_case()) { + case kShortName: { + _this->_internal_set_short_name(from._internal_short_name()); + break; + } + case HAS_SHORT_NAME_NOT_SET: { + break; + } } - if (!from._internal_description().empty()) { - _this->_internal_set_description(from._internal_description()); + switch (from.has_long_name_case()) { + case kLongName: { + _this->_internal_set_long_name(from._internal_long_name()); + break; + } + case HAS_LONG_NAME_NOT_SET: { + break; + } } - if (!from._internal_operator_onestop_id().empty()) { - _this->_internal_set_operator_onestop_id(from._internal_operator_onestop_id()); + switch (from.has_headsign_case()) { + case kHeadsign: { + _this->_internal_set_headsign(from._internal_headsign()); + break; + } + case HAS_HEADSIGN_NOT_SET: { + break; + } } - if (!from._internal_operator_name().empty()) { - _this->_internal_set_operator_name(from._internal_operator_name()); + switch (from.has_color_case()) { + case kColor: { + _this->_internal_set_color(from._internal_color()); + break; + } + case HAS_COLOR_NOT_SET: { + break; + } } - if (!from._internal_operator_url().empty()) { - _this->_internal_set_operator_url(from._internal_operator_url()); + switch (from.has_text_color_case()) { + case kTextColor: { + _this->_internal_set_text_color(from._internal_text_color()); + break; + } + case HAS_TEXT_COLOR_NOT_SET: { + break; + } } - if (from._internal_block_id() != 0) { - _this->_internal_set_block_id(from._internal_block_id()); + switch (from.has_description_case()) { + case kDescription: { + _this->_internal_set_description(from._internal_description()); + break; + } + case HAS_DESCRIPTION_NOT_SET: { + break; + } } - if (from._internal_trip_id() != 0) { - _this->_internal_set_trip_id(from._internal_trip_id()); + switch (from.has_operator_onestop_id_case()) { + case kOperatorOnestopId: { + _this->_internal_set_operator_onestop_id(from._internal_operator_onestop_id()); + break; + } + case HAS_OPERATOR_ONESTOP_ID_NOT_SET: { + break; + } } - if (from._internal_color() != 0) { - _this->_internal_set_color(from._internal_color()); + switch (from.has_operator_name_case()) { + case kOperatorName: { + _this->_internal_set_operator_name(from._internal_operator_name()); + break; + } + case HAS_OPERATOR_NAME_NOT_SET: { + break; + } } - if (from._internal_text_color() != 0) { - _this->_internal_set_text_color(from._internal_text_color()); + switch (from.has_operator_url_case()) { + case kOperatorUrl: { + _this->_internal_set_operator_url(from._internal_operator_url()); + break; + } + case HAS_OPERATOR_URL_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -6666,48 +8750,32 @@ bool TransitRouteInfo::IsInitialized() const { void TransitRouteInfo::InternalSwap(TransitRouteInfo* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.transit_stops_.InternalSwap(&other->_impl_.transit_stops_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.onestop_id_, lhs_arena, - &other->_impl_.onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.short_name_, lhs_arena, - &other->_impl_.short_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.long_name_, lhs_arena, - &other->_impl_.long_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.headsign_, lhs_arena, - &other->_impl_.headsign_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.description_, lhs_arena, - &other->_impl_.description_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.operator_onestop_id_, lhs_arena, - &other->_impl_.operator_onestop_id_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.operator_name_, lhs_arena, - &other->_impl_.operator_name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.operator_url_, lhs_arena, - &other->_impl_.operator_url_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TransitRouteInfo, _impl_.text_color_) - + sizeof(TransitRouteInfo::_impl_.text_color_) - - PROTOBUF_FIELD_OFFSET(TransitRouteInfo, _impl_.block_id_)>( - reinterpret_cast(&_impl_.block_id_), - reinterpret_cast(&other->_impl_.block_id_)); + swap(_impl_.has_onestop_id_, other->_impl_.has_onestop_id_); + swap(_impl_.has_block_id_, other->_impl_.has_block_id_); + swap(_impl_.has_trip_id_, other->_impl_.has_trip_id_); + swap(_impl_.has_short_name_, other->_impl_.has_short_name_); + swap(_impl_.has_long_name_, other->_impl_.has_long_name_); + swap(_impl_.has_headsign_, other->_impl_.has_headsign_); + swap(_impl_.has_color_, other->_impl_.has_color_); + swap(_impl_.has_text_color_, other->_impl_.has_text_color_); + swap(_impl_.has_description_, other->_impl_.has_description_); + swap(_impl_.has_operator_onestop_id_, other->_impl_.has_operator_onestop_id_); + swap(_impl_.has_operator_name_, other->_impl_.has_operator_name_); + swap(_impl_.has_operator_url_, other->_impl_.has_operator_url_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); + swap(_impl_._oneof_case_[3], other->_impl_._oneof_case_[3]); + swap(_impl_._oneof_case_[4], other->_impl_._oneof_case_[4]); + swap(_impl_._oneof_case_[5], other->_impl_._oneof_case_[5]); + swap(_impl_._oneof_case_[6], other->_impl_._oneof_case_[6]); + swap(_impl_._oneof_case_[7], other->_impl_._oneof_case_[7]); + swap(_impl_._oneof_case_[8], other->_impl_._oneof_case_[8]); + swap(_impl_._oneof_case_[9], other->_impl_._oneof_case_[9]); + swap(_impl_._oneof_case_[10], other->_impl_._oneof_case_[10]); + swap(_impl_._oneof_case_[11], other->_impl_._oneof_case_[11]); } std::string TransitRouteInfo::GetTypeName() const { @@ -6731,20 +8799,32 @@ Pronunciation::Pronunciation(const Pronunciation& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { Pronunciation* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.alphabet_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_alphabet_){} + , decltype(_impl_.has_value_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - _this->_impl_.alphabet_ = from._impl_.alphabet_; + clear_has_has_alphabet(); + switch (from.has_alphabet_case()) { + case kAlphabet: { + _this->_internal_set_alphabet(from._internal_alphabet()); + break; + } + case HAS_ALPHABET_NOT_SET: { + break; + } + } + clear_has_has_value(); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.Pronunciation) } @@ -6753,14 +8833,13 @@ inline void Pronunciation::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.alphabet_){0} + decltype(_impl_.has_alphabet_){} + , decltype(_impl_.has_value_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_alphabet(); + clear_has_has_value(); } Pronunciation::~Pronunciation() { @@ -6774,21 +8853,55 @@ Pronunciation::~Pronunciation() { inline void Pronunciation::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.value_.Destroy(); + if (has_has_alphabet()) { + clear_has_alphabet(); + } + if (has_has_value()) { + clear_has_value(); + } } void Pronunciation::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void Pronunciation::clear_has_alphabet() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Pronunciation) + switch (has_alphabet_case()) { + case kAlphabet: { + // No need to clear + break; + } + case HAS_ALPHABET_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_ALPHABET_NOT_SET; +} + +void Pronunciation::clear_has_value() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.Pronunciation) + switch (has_value_case()) { + case kValue: { + _impl_.has_value_.value_.Destroy(); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_VALUE_NOT_SET; +} + + void Pronunciation::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.Pronunciation) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.value_.ClearToEmpty(); - _impl_.alphabet_ = 0; + clear_has_alphabet(); + clear_has_value(); _internal_metadata_.Clear(); } @@ -6847,14 +8960,14 @@ uint8_t* Pronunciation::_InternalSerialize( (void) cached_has_bits; // .valhalla.Pronunciation.Alphabet alphabet = 1; - if (this->_internal_alphabet() != 0) { + if (_internal_has_alphabet()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 1, this->_internal_alphabet(), target); } // string value = 2; - if (!this->_internal_value().empty()) { + if (_internal_has_value()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_value().data(), static_cast(this->_internal_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -6879,19 +8992,29 @@ size_t Pronunciation::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string value = 2; - if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_value()); + switch (has_alphabet_case()) { + // .valhalla.Pronunciation.Alphabet alphabet = 1; + case kAlphabet: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_alphabet()); + break; + } + case HAS_ALPHABET_NOT_SET: { + break; + } } - - // .valhalla.Pronunciation.Alphabet alphabet = 1; - if (this->_internal_alphabet() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_alphabet()); + switch (has_value_case()) { + // string value = 2; + case kValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -6913,11 +9036,23 @@ void Pronunciation::MergeFrom(const Pronunciation& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_value().empty()) { - _this->_internal_set_value(from._internal_value()); + switch (from.has_alphabet_case()) { + case kAlphabet: { + _this->_internal_set_alphabet(from._internal_alphabet()); + break; + } + case HAS_ALPHABET_NOT_SET: { + break; + } } - if (from._internal_alphabet() != 0) { - _this->_internal_set_alphabet(from._internal_alphabet()); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -6935,14 +9070,11 @@ bool Pronunciation::IsInitialized() const { void Pronunciation::InternalSwap(Pronunciation* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - swap(_impl_.alphabet_, other->_impl_.alphabet_); + swap(_impl_.has_alphabet_, other->_impl_.has_alphabet_); + swap(_impl_.has_value_, other->_impl_.has_value_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string Pronunciation::GetTypeName() const { @@ -6971,24 +9103,36 @@ StreetName::StreetName(const StreetName& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { StreetName* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.pronunciation_){nullptr} - , decltype(_impl_.is_route_number_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.pronunciation_){nullptr} + , decltype(_impl_.has_value_){} + , decltype(_impl_.has_is_route_number_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } if (from._internal_has_pronunciation()) { _this->_impl_.pronunciation_ = new ::valhalla::Pronunciation(*from._impl_.pronunciation_); } - _this->_impl_.is_route_number_ = from._impl_.is_route_number_; + clear_has_has_value(); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + clear_has_has_is_route_number(); + switch (from.has_is_route_number_case()) { + case kIsRouteNumber: { + _this->_internal_set_is_route_number(from._internal_is_route_number()); + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.StreetName) } @@ -6997,15 +9141,14 @@ inline void StreetName::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.pronunciation_){nullptr} - , decltype(_impl_.is_route_number_){false} + decltype(_impl_.pronunciation_){nullptr} + , decltype(_impl_.has_value_){} + , decltype(_impl_.has_is_route_number_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_value(); + clear_has_has_is_route_number(); } StreetName::~StreetName() { @@ -7019,26 +9162,60 @@ StreetName::~StreetName() { inline void StreetName::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.value_.Destroy(); if (this != internal_default_instance()) delete _impl_.pronunciation_; + if (has_has_value()) { + clear_has_value(); + } + if (has_has_is_route_number()) { + clear_has_is_route_number(); + } } void StreetName::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void StreetName::clear_has_value() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.StreetName) + switch (has_value_case()) { + case kValue: { + _impl_.has_value_.value_.Destroy(); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_VALUE_NOT_SET; +} + +void StreetName::clear_has_is_route_number() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.StreetName) + switch (has_is_route_number_case()) { + case kIsRouteNumber: { + // No need to clear + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_IS_ROUTE_NUMBER_NOT_SET; +} + + void StreetName::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.StreetName) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.value_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.pronunciation_ != nullptr) { delete _impl_.pronunciation_; } _impl_.pronunciation_ = nullptr; - _impl_.is_route_number_ = false; + clear_has_value(); + clear_has_is_route_number(); _internal_metadata_.Clear(); } @@ -7061,7 +9238,7 @@ const char* StreetName::_InternalParse(const char* ptr, ::_pbi::ParseContext* ct // bool is_route_number = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _impl_.is_route_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _internal_set_is_route_number(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -7104,7 +9281,7 @@ uint8_t* StreetName::_InternalSerialize( (void) cached_has_bits; // string value = 1; - if (!this->_internal_value().empty()) { + if (_internal_has_value()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_value().data(), static_cast(this->_internal_value().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, @@ -7114,7 +9291,7 @@ uint8_t* StreetName::_InternalSerialize( } // bool is_route_number = 2; - if (this->_internal_is_route_number() != 0) { + if (_internal_has_is_route_number()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_is_route_number(), target); } @@ -7142,13 +9319,6 @@ size_t StreetName::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string value = 1; - if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_value()); - } - // .valhalla.Pronunciation pronunciation = 3; if (this->_internal_has_pronunciation()) { total_size += 1 + @@ -7156,11 +9326,28 @@ size_t StreetName::ByteSizeLong() const { *_impl_.pronunciation_); } - // bool is_route_number = 2; - if (this->_internal_is_route_number() != 0) { - total_size += 1 + 1; + switch (has_value_case()) { + // string value = 1; + case kValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + switch (has_is_route_number_case()) { + // bool is_route_number = 2; + case kIsRouteNumber: { + total_size += 1 + 1; + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -7182,15 +9369,27 @@ void StreetName::MergeFrom(const StreetName& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_value().empty()) { - _this->_internal_set_value(from._internal_value()); - } if (from._internal_has_pronunciation()) { _this->_internal_mutable_pronunciation()->::valhalla::Pronunciation::MergeFrom( from._internal_pronunciation()); } - if (from._internal_is_route_number() != 0) { - _this->_internal_set_is_route_number(from._internal_is_route_number()); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + switch (from.has_is_route_number_case()) { + case kIsRouteNumber: { + _this->_internal_set_is_route_number(from._internal_is_route_number()); + break; + } + case HAS_IS_ROUTE_NUMBER_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -7208,19 +9407,12 @@ bool StreetName::IsInitialized() const { void StreetName::InternalSwap(StreetName* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(StreetName, _impl_.is_route_number_) - + sizeof(StreetName::_impl_.is_route_number_) - - PROTOBUF_FIELD_OFFSET(StreetName, _impl_.pronunciation_)>( - reinterpret_cast(&_impl_.pronunciation_), - reinterpret_cast(&other->_impl_.pronunciation_)); + swap(_impl_.pronunciation_, other->_impl_.pronunciation_); + swap(_impl_.has_value_, other->_impl_.has_value_); + swap(_impl_.has_is_route_number_, other->_impl_.has_is_route_number_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string StreetName::GetTypeName() const { @@ -7244,15 +9436,43 @@ TurnLane::TurnLane(const TurnLane& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TurnLane* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.directions_mask_){} - , decltype(_impl_.state_){} - , decltype(_impl_.active_direction_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_directions_mask_){} + , decltype(_impl_.has_state_){} + , decltype(_impl_.has_active_direction_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - ::memcpy(&_impl_.directions_mask_, &from._impl_.directions_mask_, - static_cast(reinterpret_cast(&_impl_.active_direction_) - - reinterpret_cast(&_impl_.directions_mask_)) + sizeof(_impl_.active_direction_)); + clear_has_has_directions_mask(); + switch (from.has_directions_mask_case()) { + case kDirectionsMask: { + _this->_internal_set_directions_mask(from._internal_directions_mask()); + break; + } + case HAS_DIRECTIONS_MASK_NOT_SET: { + break; + } + } + clear_has_has_state(); + switch (from.has_state_case()) { + case kState: { + _this->_internal_set_state(from._internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } + } + clear_has_has_active_direction(); + switch (from.has_active_direction_case()) { + case kActiveDirection: { + _this->_internal_set_active_direction(from._internal_active_direction()); + break; + } + case HAS_ACTIVE_DIRECTION_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TurnLane) } @@ -7261,11 +9481,15 @@ inline void TurnLane::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.directions_mask_){0u} - , decltype(_impl_.state_){0} - , decltype(_impl_.active_direction_){0u} + decltype(_impl_.has_directions_mask_){} + , decltype(_impl_.has_state_){} + , decltype(_impl_.has_active_direction_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; + clear_has_has_directions_mask(); + clear_has_has_state(); + clear_has_has_active_direction(); } TurnLane::~TurnLane() { @@ -7279,21 +9503,73 @@ TurnLane::~TurnLane() { inline void TurnLane::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_has_directions_mask()) { + clear_has_directions_mask(); + } + if (has_has_state()) { + clear_has_state(); + } + if (has_has_active_direction()) { + clear_has_active_direction(); + } } void TurnLane::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TurnLane::clear_has_directions_mask() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TurnLane) + switch (has_directions_mask_case()) { + case kDirectionsMask: { + // No need to clear + break; + } + case HAS_DIRECTIONS_MASK_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_DIRECTIONS_MASK_NOT_SET; +} + +void TurnLane::clear_has_state() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TurnLane) + switch (has_state_case()) { + case kState: { + // No need to clear + break; + } + case HAS_STATE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_STATE_NOT_SET; +} + +void TurnLane::clear_has_active_direction() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TurnLane) + switch (has_active_direction_case()) { + case kActiveDirection: { + // No need to clear + break; + } + case HAS_ACTIVE_DIRECTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[2] = HAS_ACTIVE_DIRECTION_NOT_SET; +} + + void TurnLane::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TurnLane) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::memset(&_impl_.directions_mask_, 0, static_cast( - reinterpret_cast(&_impl_.active_direction_) - - reinterpret_cast(&_impl_.directions_mask_)) + sizeof(_impl_.active_direction_)); + clear_has_directions_mask(); + clear_has_state(); + clear_has_active_direction(); _internal_metadata_.Clear(); } @@ -7306,7 +9582,7 @@ const char* TurnLane::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint32 directions_mask = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.directions_mask_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_directions_mask(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -7323,7 +9599,7 @@ const char* TurnLane::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) // uint32 active_direction = 3; case 3: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.active_direction_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + _internal_set_active_direction(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); CHK_(ptr); } else goto handle_unusual; @@ -7358,20 +9634,20 @@ uint8_t* TurnLane::_InternalSerialize( (void) cached_has_bits; // uint32 directions_mask = 1; - if (this->_internal_directions_mask() != 0) { + if (_internal_has_directions_mask()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_directions_mask(), target); } // .valhalla.TurnLane.State state = 2; - if (this->_internal_state() != 0) { + if (_internal_has_state()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 2, this->_internal_state(), target); } // uint32 active_direction = 3; - if (this->_internal_active_direction() != 0) { + if (_internal_has_active_direction()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_active_direction(), target); } @@ -7392,22 +9668,37 @@ size_t TurnLane::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // uint32 directions_mask = 1; - if (this->_internal_directions_mask() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_directions_mask()); + switch (has_directions_mask_case()) { + // uint32 directions_mask = 1; + case kDirectionsMask: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_directions_mask()); + break; + } + case HAS_DIRECTIONS_MASK_NOT_SET: { + break; + } } - - // .valhalla.TurnLane.State state = 2; - if (this->_internal_state() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); + switch (has_state_case()) { + // .valhalla.TurnLane.State state = 2; + case kState: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } } - - // uint32 active_direction = 3; - if (this->_internal_active_direction() != 0) { - total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_active_direction()); + switch (has_active_direction_case()) { + // uint32 active_direction = 3; + case kActiveDirection: { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_active_direction()); + break; + } + case HAS_ACTIVE_DIRECTION_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -7429,14 +9720,32 @@ void TurnLane::MergeFrom(const TurnLane& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_directions_mask() != 0) { - _this->_internal_set_directions_mask(from._internal_directions_mask()); + switch (from.has_directions_mask_case()) { + case kDirectionsMask: { + _this->_internal_set_directions_mask(from._internal_directions_mask()); + break; + } + case HAS_DIRECTIONS_MASK_NOT_SET: { + break; + } } - if (from._internal_state() != 0) { - _this->_internal_set_state(from._internal_state()); + switch (from.has_state_case()) { + case kState: { + _this->_internal_set_state(from._internal_state()); + break; + } + case HAS_STATE_NOT_SET: { + break; + } } - if (from._internal_active_direction() != 0) { - _this->_internal_set_active_direction(from._internal_active_direction()); + switch (from.has_active_direction_case()) { + case kActiveDirection: { + _this->_internal_set_active_direction(from._internal_active_direction()); + break; + } + case HAS_ACTIVE_DIRECTION_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -7455,12 +9764,12 @@ bool TurnLane::IsInitialized() const { void TurnLane::InternalSwap(TurnLane* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TurnLane, _impl_.active_direction_) - + sizeof(TurnLane::_impl_.active_direction_) - - PROTOBUF_FIELD_OFFSET(TurnLane, _impl_.directions_mask_)>( - reinterpret_cast(&_impl_.directions_mask_), - reinterpret_cast(&other->_impl_.directions_mask_)); + swap(_impl_.has_directions_mask_, other->_impl_.has_directions_mask_); + swap(_impl_.has_state_, other->_impl_.has_state_); + swap(_impl_.has_active_direction_, other->_impl_.has_active_direction_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); + swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]); } std::string TurnLane::GetTypeName() const { @@ -7484,20 +9793,32 @@ TaggedValue::TaggedValue(const TaggedValue& from) : ::PROTOBUF_NAMESPACE_ID::MessageLite() { TaggedValue* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.type_){} - , /*decltype(_impl_._cached_size_)*/{}}; + decltype(_impl_.has_value_){} + , decltype(_impl_.has_type_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom(from._internal_metadata_); - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_value().empty()) { - _this->_impl_.value_.Set(from._internal_value(), - _this->GetArenaForAllocation()); - } - _this->_impl_.type_ = from._impl_.type_; + clear_has_has_value(); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + clear_has_has_type(); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } // @@protoc_insertion_point(copy_constructor:valhalla.TaggedValue) } @@ -7506,14 +9827,13 @@ inline void TaggedValue::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.value_){} - , decltype(_impl_.type_){0} + decltype(_impl_.has_value_){} + , decltype(_impl_.has_type_){} , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} }; - _impl_.value_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.value_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + clear_has_has_value(); + clear_has_has_type(); } TaggedValue::~TaggedValue() { @@ -7527,21 +9847,55 @@ TaggedValue::~TaggedValue() { inline void TaggedValue::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.value_.Destroy(); + if (has_has_value()) { + clear_has_value(); + } + if (has_has_type()) { + clear_has_type(); + } } void TaggedValue::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } +void TaggedValue::clear_has_value() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TaggedValue) + switch (has_value_case()) { + case kValue: { + _impl_.has_value_.value_.Destroy(); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = HAS_VALUE_NOT_SET; +} + +void TaggedValue::clear_has_type() { +// @@protoc_insertion_point(one_of_clear_start:valhalla.TaggedValue) + switch (has_type_case()) { + case kType: { + // No need to clear + break; + } + case HAS_TYPE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} + + void TaggedValue::Clear() { // @@protoc_insertion_point(message_clear_start:valhalla.TaggedValue) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.value_.ClearToEmpty(); - _impl_.type_ = 0; + clear_has_value(); + clear_has_type(); _internal_metadata_.Clear(); } @@ -7599,13 +9953,13 @@ uint8_t* TaggedValue::_InternalSerialize( (void) cached_has_bits; // bytes value = 1; - if (!this->_internal_value().empty()) { + if (_internal_has_value()) { target = stream->WriteBytesMaybeAliased( 1, this->_internal_value(), target); } // .valhalla.TaggedValue.Type type = 2; - if (this->_internal_type() != 0) { + if (_internal_has_type()) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 2, this->_internal_type(), target); @@ -7627,19 +9981,29 @@ size_t TaggedValue::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes value = 1; - if (!this->_internal_value().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_value()); + switch (has_value_case()) { + // bytes value = 1; + case kValue: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } - - // .valhalla.TaggedValue.Type type = 2; - if (this->_internal_type() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + switch (has_type_case()) { + // .valhalla.TaggedValue.Type type = 2; + case kType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); } @@ -7661,11 +10025,23 @@ void TaggedValue::MergeFrom(const TaggedValue& from) { uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_value().empty()) { - _this->_internal_set_value(from._internal_value()); + switch (from.has_value_case()) { + case kValue: { + _this->_internal_set_value(from._internal_value()); + break; + } + case HAS_VALUE_NOT_SET: { + break; + } } - if (from._internal_type() != 0) { - _this->_internal_set_type(from._internal_type()); + switch (from.has_type_case()) { + case kType: { + _this->_internal_set_type(from._internal_type()); + break; + } + case HAS_TYPE_NOT_SET: { + break; + } } _this->_internal_metadata_.MergeFrom(from._internal_metadata_); } @@ -7683,14 +10059,11 @@ bool TaggedValue::IsInitialized() const { void TaggedValue::InternalSwap(TaggedValue* other) { using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.value_, lhs_arena, - &other->_impl_.value_, rhs_arena - ); - swap(_impl_.type_, other->_impl_.type_); + swap(_impl_.has_value_, other->_impl_.has_value_); + swap(_impl_.has_type_, other->_impl_.has_type_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); + swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]); } std::string TaggedValue::GetTypeName() const { @@ -7709,17 +10082,13 @@ template<> PROTOBUF_NOINLINE ::valhalla::BoundingBox* Arena::CreateMaybeMessage< ::valhalla::BoundingBox >(Arena* arena) { return Arena::CreateMessageInternal< ::valhalla::BoundingBox >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::SearchFilter* -Arena::CreateMaybeMessage< ::valhalla::SearchFilter >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::SearchFilter >(arena); -} -template<> PROTOBUF_NOINLINE ::valhalla::PathEdge* -Arena::CreateMaybeMessage< ::valhalla::PathEdge >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::PathEdge >(arena); +template<> PROTOBUF_NOINLINE ::valhalla::Location_PathEdge* +Arena::CreateMaybeMessage< ::valhalla::Location_PathEdge >(Arena* arena) { + return Arena::CreateMessageInternal< ::valhalla::Location_PathEdge >(arena); } -template<> PROTOBUF_NOINLINE ::valhalla::Correlation* -Arena::CreateMaybeMessage< ::valhalla::Correlation >(Arena* arena) { - return Arena::CreateMessageInternal< ::valhalla::Correlation >(arena); +template<> PROTOBUF_NOINLINE ::valhalla::Location_SearchFilter* +Arena::CreateMaybeMessage< ::valhalla::Location_SearchFilter >(Arena* arena) { + return Arena::CreateMessageInternal< ::valhalla::Location_SearchFilter >(arena); } template<> PROTOBUF_NOINLINE ::valhalla::Location* Arena::CreateMaybeMessage< ::valhalla::Location >(Arena* arena) { diff --git a/include/linux/valhalla/proto/common.pb.h b/include/linux/valhalla/proto/tripcommon.pb.h similarity index 55% rename from include/linux/valhalla/proto/common.pb.h rename to include/linux/valhalla/proto/tripcommon.pb.h index f4f3df8..8cfd3da 100644 --- a/include/linux/valhalla/proto/common.pb.h +++ b/include/linux/valhalla/proto/tripcommon.pb.h @@ -1,8 +1,8 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common.proto +// source: tripcommon.proto -#ifndef GOOGLE_PROTOBUF_INCLUDED_common_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_common_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_tripcommon_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tripcommon_2eproto #include #include @@ -31,7 +31,7 @@ #include // @@protoc_insertion_point(includes) #include -#define PROTOBUF_INTERNAL_EXPORT_common_2eproto +#define PROTOBUF_INTERNAL_EXPORT_tripcommon_2eproto PROTOBUF_NAMESPACE_OPEN namespace internal { class AnyMetadata; @@ -39,7 +39,7 @@ class AnyMetadata; PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. -struct TableStruct_common_2eproto { +struct TableStruct_tripcommon_2eproto { static const uint32_t offsets[]; }; namespace valhalla { @@ -49,24 +49,21 @@ extern BikeShareStationInfoDefaultTypeInternal _BikeShareStationInfo_default_ins class BoundingBox; struct BoundingBoxDefaultTypeInternal; extern BoundingBoxDefaultTypeInternal _BoundingBox_default_instance_; -class Correlation; -struct CorrelationDefaultTypeInternal; -extern CorrelationDefaultTypeInternal _Correlation_default_instance_; class LatLng; struct LatLngDefaultTypeInternal; extern LatLngDefaultTypeInternal _LatLng_default_instance_; class Location; struct LocationDefaultTypeInternal; extern LocationDefaultTypeInternal _Location_default_instance_; -class PathEdge; -struct PathEdgeDefaultTypeInternal; -extern PathEdgeDefaultTypeInternal _PathEdge_default_instance_; +class Location_PathEdge; +struct Location_PathEdgeDefaultTypeInternal; +extern Location_PathEdgeDefaultTypeInternal _Location_PathEdge_default_instance_; +class Location_SearchFilter; +struct Location_SearchFilterDefaultTypeInternal; +extern Location_SearchFilterDefaultTypeInternal _Location_SearchFilter_default_instance_; class Pronunciation; struct PronunciationDefaultTypeInternal; extern PronunciationDefaultTypeInternal _Pronunciation_default_instance_; -class SearchFilter; -struct SearchFilterDefaultTypeInternal; -extern SearchFilterDefaultTypeInternal _SearchFilter_default_instance_; class StreetName; struct StreetNameDefaultTypeInternal; extern StreetNameDefaultTypeInternal _StreetName_default_instance_; @@ -92,12 +89,11 @@ extern TurnLaneDefaultTypeInternal _TurnLane_default_instance_; PROTOBUF_NAMESPACE_OPEN template<> ::valhalla::BikeShareStationInfo* Arena::CreateMaybeMessage<::valhalla::BikeShareStationInfo>(Arena*); template<> ::valhalla::BoundingBox* Arena::CreateMaybeMessage<::valhalla::BoundingBox>(Arena*); -template<> ::valhalla::Correlation* Arena::CreateMaybeMessage<::valhalla::Correlation>(Arena*); template<> ::valhalla::LatLng* Arena::CreateMaybeMessage<::valhalla::LatLng>(Arena*); template<> ::valhalla::Location* Arena::CreateMaybeMessage<::valhalla::Location>(Arena*); -template<> ::valhalla::PathEdge* Arena::CreateMaybeMessage<::valhalla::PathEdge>(Arena*); +template<> ::valhalla::Location_PathEdge* Arena::CreateMaybeMessage<::valhalla::Location_PathEdge>(Arena*); +template<> ::valhalla::Location_SearchFilter* Arena::CreateMaybeMessage<::valhalla::Location_SearchFilter>(Arena*); template<> ::valhalla::Pronunciation* Arena::CreateMaybeMessage<::valhalla::Pronunciation>(Arena*); -template<> ::valhalla::SearchFilter* Arena::CreateMaybeMessage<::valhalla::SearchFilter>(Arena*); template<> ::valhalla::StreetName* Arena::CreateMaybeMessage<::valhalla::StreetName>(Arena*); template<> ::valhalla::TaggedValue* Arena::CreateMaybeMessage<::valhalla::TaggedValue>(Arena*); template<> ::valhalla::TransitEgressInfo* Arena::CreateMaybeMessage<::valhalla::TransitEgressInfo>(Arena*); @@ -131,28 +127,6 @@ inline const std::string& Location_Type_Name(T enum_t_value) { } bool Location_Type_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_Type* value); -enum Location_PreferredSide : int { - Location_PreferredSide_either = 0, - Location_PreferredSide_same = 1, - Location_PreferredSide_opposite = 2, - Location_PreferredSide_Location_PreferredSide_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - Location_PreferredSide_Location_PreferredSide_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool Location_PreferredSide_IsValid(int value); -constexpr Location_PreferredSide Location_PreferredSide_PreferredSide_MIN = Location_PreferredSide_either; -constexpr Location_PreferredSide Location_PreferredSide_PreferredSide_MAX = Location_PreferredSide_opposite; -constexpr int Location_PreferredSide_PreferredSide_ARRAYSIZE = Location_PreferredSide_PreferredSide_MAX + 1; - -const std::string& Location_PreferredSide_Name(Location_PreferredSide value); -template -inline const std::string& Location_PreferredSide_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function Location_PreferredSide_Name."); - return Location_PreferredSide_Name(static_cast(enum_t_value)); -} -bool Location_PreferredSide_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_PreferredSide* value); enum Location_SideOfStreet : int { Location_SideOfStreet_kNone = 0, Location_SideOfStreet_kLeft = 1, @@ -175,6 +149,28 @@ inline const std::string& Location_SideOfStreet_Name(T enum_t_value) { } bool Location_SideOfStreet_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_SideOfStreet* value); +enum Location_PreferredSide : int { + Location_PreferredSide_either = 0, + Location_PreferredSide_same = 1, + Location_PreferredSide_opposite = 2, + Location_PreferredSide_Location_PreferredSide_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + Location_PreferredSide_Location_PreferredSide_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool Location_PreferredSide_IsValid(int value); +constexpr Location_PreferredSide Location_PreferredSide_PreferredSide_MIN = Location_PreferredSide_either; +constexpr Location_PreferredSide Location_PreferredSide_PreferredSide_MAX = Location_PreferredSide_opposite; +constexpr int Location_PreferredSide_PreferredSide_ARRAYSIZE = Location_PreferredSide_PreferredSide_MAX + 1; + +const std::string& Location_PreferredSide_Name(Location_PreferredSide value); +template +inline const std::string& Location_PreferredSide_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Location_PreferredSide_Name."); + return Location_PreferredSide_Name(static_cast(enum_t_value)); +} +bool Location_PreferredSide_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Location_PreferredSide* value); enum TransitPlatformInfo_Type : int { TransitPlatformInfo_Type_kStop = 0, TransitPlatformInfo_Type_kStation = 1, @@ -246,8 +242,6 @@ enum TaggedValue_Type : int { TaggedValue_Type_kLayer = 1, TaggedValue_Type_kPronunciation = 2, TaggedValue_Type_kBssInfo = 3, - TaggedValue_Type_kLevel = 4, - TaggedValue_Type_kLevelRef = 5, TaggedValue_Type_kTunnel = 49, TaggedValue_Type_kBridge = 50, TaggedValue_Type_TaggedValue_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), @@ -593,7 +587,7 @@ class LatLng final : }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -752,28 +746,28 @@ class BoundingBox final : mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- -class SearchFilter final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.SearchFilter) */ { +class Location_PathEdge final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Location.PathEdge) */ { public: - inline SearchFilter() : SearchFilter(nullptr) {} - ~SearchFilter() override; - explicit PROTOBUF_CONSTEXPR SearchFilter(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Location_PathEdge() : Location_PathEdge(nullptr) {} + ~Location_PathEdge() override; + explicit PROTOBUF_CONSTEXPR Location_PathEdge(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - SearchFilter(const SearchFilter& from); - SearchFilter(SearchFilter&& from) noexcept - : SearchFilter() { + Location_PathEdge(const Location_PathEdge& from); + Location_PathEdge(Location_PathEdge&& from) noexcept + : Location_PathEdge() { *this = ::std::move(from); } - inline SearchFilter& operator=(const SearchFilter& from) { + inline Location_PathEdge& operator=(const Location_PathEdge& from) { CopyFrom(from); return *this; } - inline SearchFilter& operator=(SearchFilter&& from) noexcept { + inline Location_PathEdge& operator=(Location_PathEdge&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -787,35 +781,70 @@ class SearchFilter final : return *this; } - static const SearchFilter& default_instance() { + static const Location_PathEdge& default_instance() { return *internal_default_instance(); } - enum HasMinRoadClassCase { - kMinRoadClass = 1, - HAS_MIN_ROAD_CLASS_NOT_SET = 0, + enum HasGraphIdCase { + kGraphId = 1, + HAS_GRAPH_ID_NOT_SET = 0, }; - enum HasMaxRoadClassCase { - kMaxRoadClass = 2, - HAS_MAX_ROAD_CLASS_NOT_SET = 0, + enum HasPercentAlongCase { + kPercentAlong = 2, + HAS_PERCENT_ALONG_NOT_SET = 0, }; - enum HasExcludeClosuresCase { - kExcludeClosures = 6, - HAS_EXCLUDE_CLOSURES_NOT_SET = 0, + enum HasSideOfStreetCase { + kSideOfStreet = 4, + HAS_SIDE_OF_STREET_NOT_SET = 0, + }; + + enum HasDistanceCase { + kDistance = 5, + HAS_DISTANCE_NOT_SET = 0, + }; + + enum HasMinimumReachabilityCase { + kMinimumReachability = 6, + HAS_MINIMUM_REACHABILITY_NOT_SET = 0, + }; + + enum HasBeginNodeCase { + kBeginNode = 7, + HAS_BEGIN_NODE_NOT_SET = 0, + }; + + enum HasEndNodeCase { + kEndNode = 8, + HAS_END_NODE_NOT_SET = 0, + }; + + enum HasOutboundReachCase { + kOutboundReach = 11, + HAS_OUTBOUND_REACH_NOT_SET = 0, + }; + + enum HasInboundReachCase { + kInboundReach = 12, + HAS_INBOUND_REACH_NOT_SET = 0, + }; + + enum HasHeadingCase { + kHeading = 13, + HAS_HEADING_NOT_SET = 0, }; - static inline const SearchFilter* internal_default_instance() { - return reinterpret_cast( - &_SearchFilter_default_instance_); + static inline const Location_PathEdge* internal_default_instance() { + return reinterpret_cast( + &_Location_PathEdge_default_instance_); } static constexpr int kIndexInFileMessages = 2; - friend void swap(SearchFilter& a, SearchFilter& b) { + friend void swap(Location_PathEdge& a, Location_PathEdge& b) { a.Swap(&b); } - inline void Swap(SearchFilter* other) { + inline void Swap(Location_PathEdge* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -828,7 +857,7 @@ class SearchFilter final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(SearchFilter* other) { + void UnsafeArenaSwap(Location_PathEdge* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -836,12 +865,12 @@ class SearchFilter final : // implements Message ---------------------------------------------- - SearchFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Location_PathEdge* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const SearchFilter& from); - void MergeFrom(const SearchFilter& from); + void CopyFrom(const Location_PathEdge& from); + void MergeFrom(const Location_PathEdge& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -855,15 +884,15 @@ class SearchFilter final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(SearchFilter* other); + void InternalSwap(Location_PathEdge* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.SearchFilter"; + return "valhalla.Location.PathEdge"; } protected: - explicit SearchFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit Location_PathEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -874,353 +903,170 @@ class SearchFilter final : // accessors ------------------------------------------------------- enum : int { - kExcludeTunnelFieldNumber = 3, - kExcludeBridgeFieldNumber = 4, - kExcludeRampFieldNumber = 5, - kMinRoadClassFieldNumber = 1, - kMaxRoadClassFieldNumber = 2, - kExcludeClosuresFieldNumber = 6, + kNamesFieldNumber = 10, + kLlFieldNumber = 3, + kGraphIdFieldNumber = 1, + kPercentAlongFieldNumber = 2, + kSideOfStreetFieldNumber = 4, + kDistanceFieldNumber = 5, + kMinimumReachabilityFieldNumber = 6, + kBeginNodeFieldNumber = 7, + kEndNodeFieldNumber = 8, + kOutboundReachFieldNumber = 11, + kInboundReachFieldNumber = 12, + kHeadingFieldNumber = 13, }; - // bool exclude_tunnel = 3; - void clear_exclude_tunnel(); - bool exclude_tunnel() const; - void set_exclude_tunnel(bool value); + // repeated string names = 10; + int names_size() const; private: - bool _internal_exclude_tunnel() const; - void _internal_set_exclude_tunnel(bool value); + int _internal_names_size() const; + public: + void clear_names(); + const std::string& names(int index) const; + std::string* mutable_names(int index); + void set_names(int index, const std::string& value); + void set_names(int index, std::string&& value); + void set_names(int index, const char* value); + void set_names(int index, const char* value, size_t size); + std::string* add_names(); + void add_names(const std::string& value); + void add_names(std::string&& value); + void add_names(const char* value); + void add_names(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& names() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_names(); + private: + const std::string& _internal_names(int index) const; + std::string* _internal_add_names(); public: - // bool exclude_bridge = 4; - void clear_exclude_bridge(); - bool exclude_bridge() const; - void set_exclude_bridge(bool value); + // .valhalla.LatLng ll = 3; + bool has_ll() const; private: - bool _internal_exclude_bridge() const; - void _internal_set_exclude_bridge(bool value); + bool _internal_has_ll() const; + public: + void clear_ll(); + const ::valhalla::LatLng& ll() const; + PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); + ::valhalla::LatLng* mutable_ll(); + void set_allocated_ll(::valhalla::LatLng* ll); + private: + const ::valhalla::LatLng& _internal_ll() const; + ::valhalla::LatLng* _internal_mutable_ll(); public: + void unsafe_arena_set_allocated_ll( + ::valhalla::LatLng* ll); + ::valhalla::LatLng* unsafe_arena_release_ll(); - // bool exclude_ramp = 5; - void clear_exclude_ramp(); - bool exclude_ramp() const; - void set_exclude_ramp(bool value); + // uint64 graph_id = 1; + bool has_graph_id() const; private: - bool _internal_exclude_ramp() const; - void _internal_set_exclude_ramp(bool value); + bool _internal_has_graph_id() const; + public: + void clear_graph_id(); + uint64_t graph_id() const; + void set_graph_id(uint64_t value); + private: + uint64_t _internal_graph_id() const; + void _internal_set_graph_id(uint64_t value); public: - // .valhalla.RoadClass min_road_class = 1; - bool has_min_road_class() const; + // double percent_along = 2; + bool has_percent_along() const; private: - bool _internal_has_min_road_class() const; + bool _internal_has_percent_along() const; public: - void clear_min_road_class(); - ::valhalla::RoadClass min_road_class() const; - void set_min_road_class(::valhalla::RoadClass value); + void clear_percent_along(); + double percent_along() const; + void set_percent_along(double value); private: - ::valhalla::RoadClass _internal_min_road_class() const; - void _internal_set_min_road_class(::valhalla::RoadClass value); + double _internal_percent_along() const; + void _internal_set_percent_along(double value); public: - // .valhalla.RoadClass max_road_class = 2; - bool has_max_road_class() const; + // .valhalla.Location.SideOfStreet side_of_street = 4; + bool has_side_of_street() const; private: - bool _internal_has_max_road_class() const; + bool _internal_has_side_of_street() const; public: - void clear_max_road_class(); - ::valhalla::RoadClass max_road_class() const; - void set_max_road_class(::valhalla::RoadClass value); + void clear_side_of_street(); + ::valhalla::Location_SideOfStreet side_of_street() const; + void set_side_of_street(::valhalla::Location_SideOfStreet value); private: - ::valhalla::RoadClass _internal_max_road_class() const; - void _internal_set_max_road_class(::valhalla::RoadClass value); + ::valhalla::Location_SideOfStreet _internal_side_of_street() const; + void _internal_set_side_of_street(::valhalla::Location_SideOfStreet value); public: - // bool exclude_closures = 6; - bool has_exclude_closures() const; + // double distance = 5; + bool has_distance() const; private: - bool _internal_has_exclude_closures() const; + bool _internal_has_distance() const; public: - void clear_exclude_closures(); - bool exclude_closures() const; - void set_exclude_closures(bool value); + void clear_distance(); + double distance() const; + void set_distance(double value); private: - bool _internal_exclude_closures() const; - void _internal_set_exclude_closures(bool value); + double _internal_distance() const; + void _internal_set_distance(double value); public: - void clear_has_min_road_class(); - HasMinRoadClassCase has_min_road_class_case() const; - void clear_has_max_road_class(); - HasMaxRoadClassCase has_max_road_class_case() const; - void clear_has_exclude_closures(); - HasExcludeClosuresCase has_exclude_closures_case() const; - // @@protoc_insertion_point(class_scope:valhalla.SearchFilter) - private: - class _Internal; - void set_has_min_road_class(); - void set_has_max_road_class(); - void set_has_exclude_closures(); + // int32 minimum_reachability = 6; + bool has_minimum_reachability() const; + private: + bool _internal_has_minimum_reachability() const; + public: + void clear_minimum_reachability(); + int32_t minimum_reachability() const; + void set_minimum_reachability(int32_t value); + private: + int32_t _internal_minimum_reachability() const; + void _internal_set_minimum_reachability(int32_t value); + public: - inline bool has_has_min_road_class() const; - inline void clear_has_has_min_road_class(); + // bool begin_node = 7; + bool has_begin_node() const; + private: + bool _internal_has_begin_node() const; + public: + void clear_begin_node(); + bool begin_node() const; + void set_begin_node(bool value); + private: + bool _internal_begin_node() const; + void _internal_set_begin_node(bool value); + public: - inline bool has_has_max_road_class() const; - inline void clear_has_has_max_road_class(); + // bool end_node = 8; + bool has_end_node() const; + private: + bool _internal_has_end_node() const; + public: + void clear_end_node(); + bool end_node() const; + void set_end_node(bool value); + private: + bool _internal_end_node() const; + void _internal_set_end_node(bool value); + public: - inline bool has_has_exclude_closures() const; - inline void clear_has_has_exclude_closures(); + // int32 outbound_reach = 11; + bool has_outbound_reach() const; + private: + bool _internal_has_outbound_reach() const; + public: + void clear_outbound_reach(); + int32_t outbound_reach() const; + void set_outbound_reach(int32_t value); + private: + int32_t _internal_outbound_reach() const; + void _internal_set_outbound_reach(int32_t value); + public: - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - bool exclude_tunnel_; - bool exclude_bridge_; - bool exclude_ramp_; - union HasMinRoadClassUnion { - constexpr HasMinRoadClassUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - int min_road_class_; - } has_min_road_class_; - union HasMaxRoadClassUnion { - constexpr HasMaxRoadClassUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - int max_road_class_; - } has_max_road_class_; - union HasExcludeClosuresUnion { - constexpr HasExcludeClosuresUnion() : _constinit_{} {} - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - bool exclude_closures_; - } has_exclude_closures_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[3]; - - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; -}; -// ------------------------------------------------------------------- - -class PathEdge final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.PathEdge) */ { - public: - inline PathEdge() : PathEdge(nullptr) {} - ~PathEdge() override; - explicit PROTOBUF_CONSTEXPR PathEdge(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - PathEdge(const PathEdge& from); - PathEdge(PathEdge&& from) noexcept - : PathEdge() { - *this = ::std::move(from); - } - - inline PathEdge& operator=(const PathEdge& from) { - CopyFrom(from); - return *this; - } - inline PathEdge& operator=(PathEdge&& from) noexcept { - if (this == &from) return *this; - if (GetOwningArena() == from.GetOwningArena() - #ifdef PROTOBUF_FORCE_COPY_IN_MOVE - && GetOwningArena() != nullptr - #endif // !PROTOBUF_FORCE_COPY_IN_MOVE - ) { - InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const PathEdge& default_instance() { - return *internal_default_instance(); - } - static inline const PathEdge* internal_default_instance() { - return reinterpret_cast( - &_PathEdge_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(PathEdge& a, PathEdge& b) { - a.Swap(&b); - } - inline void Swap(PathEdge* other) { - if (other == this) return; - #ifdef PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() != nullptr && - GetOwningArena() == other->GetOwningArena()) { - #else // PROTOBUF_FORCE_COPY_IN_SWAP - if (GetOwningArena() == other->GetOwningArena()) { - #endif // !PROTOBUF_FORCE_COPY_IN_SWAP - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(PathEdge* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - PathEdge* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const PathEdge& from); - void MergeFrom(const PathEdge& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - uint8_t* _InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _impl_._cached_size_.Get(); } - - private: - void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(PathEdge* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.PathEdge"; - } - protected: - explicit PathEdge(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNamesFieldNumber = 10, - kLlFieldNumber = 3, - kGraphIdFieldNumber = 1, - kPercentAlongFieldNumber = 2, - kDistanceFieldNumber = 5, - kSideOfStreetFieldNumber = 4, - kBeginNodeFieldNumber = 7, - kEndNodeFieldNumber = 8, - kOutboundReachFieldNumber = 11, - kInboundReachFieldNumber = 12, - kHeadingFieldNumber = 13, - }; - // repeated string names = 10; - int names_size() const; - private: - int _internal_names_size() const; - public: - void clear_names(); - const std::string& names(int index) const; - std::string* mutable_names(int index); - void set_names(int index, const std::string& value); - void set_names(int index, std::string&& value); - void set_names(int index, const char* value); - void set_names(int index, const char* value, size_t size); - std::string* add_names(); - void add_names(const std::string& value); - void add_names(std::string&& value); - void add_names(const char* value); - void add_names(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& names() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_names(); - private: - const std::string& _internal_names(int index) const; - std::string* _internal_add_names(); - public: - - // .valhalla.LatLng ll = 3; - bool has_ll() const; - private: - bool _internal_has_ll() const; - public: - void clear_ll(); - const ::valhalla::LatLng& ll() const; - PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); - ::valhalla::LatLng* mutable_ll(); - void set_allocated_ll(::valhalla::LatLng* ll); - private: - const ::valhalla::LatLng& _internal_ll() const; - ::valhalla::LatLng* _internal_mutable_ll(); - public: - void unsafe_arena_set_allocated_ll( - ::valhalla::LatLng* ll); - ::valhalla::LatLng* unsafe_arena_release_ll(); - - // uint64 graph_id = 1; - void clear_graph_id(); - uint64_t graph_id() const; - void set_graph_id(uint64_t value); - private: - uint64_t _internal_graph_id() const; - void _internal_set_graph_id(uint64_t value); - public: - - // double percent_along = 2; - void clear_percent_along(); - double percent_along() const; - void set_percent_along(double value); - private: - double _internal_percent_along() const; - void _internal_set_percent_along(double value); - public: - - // double distance = 5; - void clear_distance(); - double distance() const; - void set_distance(double value); - private: - double _internal_distance() const; - void _internal_set_distance(double value); - public: - - // .valhalla.Location.SideOfStreet side_of_street = 4; - void clear_side_of_street(); - ::valhalla::Location_SideOfStreet side_of_street() const; - void set_side_of_street(::valhalla::Location_SideOfStreet value); - private: - ::valhalla::Location_SideOfStreet _internal_side_of_street() const; - void _internal_set_side_of_street(::valhalla::Location_SideOfStreet value); - public: - - // bool begin_node = 7; - void clear_begin_node(); - bool begin_node() const; - void set_begin_node(bool value); - private: - bool _internal_begin_node() const; - void _internal_set_begin_node(bool value); - public: - - // bool end_node = 8; - void clear_end_node(); - bool end_node() const; - void set_end_node(bool value); - private: - bool _internal_end_node() const; - void _internal_set_end_node(bool value); - public: - - // int32 outbound_reach = 11; - void clear_outbound_reach(); - int32_t outbound_reach() const; - void set_outbound_reach(int32_t value); + // int32 inbound_reach = 12; + bool has_inbound_reach() const; private: - int32_t _internal_outbound_reach() const; - void _internal_set_outbound_reach(int32_t value); + bool _internal_has_inbound_reach() const; public: - - // int32 inbound_reach = 12; void clear_inbound_reach(); int32_t inbound_reach() const; void set_inbound_reach(int32_t value); @@ -1230,6 +1076,10 @@ class PathEdge final : public: // float heading = 13; + bool has_heading() const; + private: + bool _internal_has_heading() const; + public: void clear_heading(); float heading() const; void set_heading(float value); @@ -1238,9 +1088,69 @@ class PathEdge final : void _internal_set_heading(float value); public: - // @@protoc_insertion_point(class_scope:valhalla.PathEdge) + void clear_has_graph_id(); + HasGraphIdCase has_graph_id_case() const; + void clear_has_percent_along(); + HasPercentAlongCase has_percent_along_case() const; + void clear_has_side_of_street(); + HasSideOfStreetCase has_side_of_street_case() const; + void clear_has_distance(); + HasDistanceCase has_distance_case() const; + void clear_has_minimum_reachability(); + HasMinimumReachabilityCase has_minimum_reachability_case() const; + void clear_has_begin_node(); + HasBeginNodeCase has_begin_node_case() const; + void clear_has_end_node(); + HasEndNodeCase has_end_node_case() const; + void clear_has_outbound_reach(); + HasOutboundReachCase has_outbound_reach_case() const; + void clear_has_inbound_reach(); + HasInboundReachCase has_inbound_reach_case() const; + void clear_has_heading(); + HasHeadingCase has_heading_case() const; + // @@protoc_insertion_point(class_scope:valhalla.Location.PathEdge) private: class _Internal; + void set_has_graph_id(); + void set_has_percent_along(); + void set_has_side_of_street(); + void set_has_distance(); + void set_has_minimum_reachability(); + void set_has_begin_node(); + void set_has_end_node(); + void set_has_outbound_reach(); + void set_has_inbound_reach(); + void set_has_heading(); + + inline bool has_has_graph_id() const; + inline void clear_has_has_graph_id(); + + inline bool has_has_percent_along() const; + inline void clear_has_has_percent_along(); + + inline bool has_has_side_of_street() const; + inline void clear_has_has_side_of_street(); + + inline bool has_has_distance() const; + inline void clear_has_has_distance(); + + inline bool has_has_minimum_reachability() const; + inline void clear_has_has_minimum_reachability(); + + inline bool has_has_begin_node() const; + inline void clear_has_has_begin_node(); + + inline bool has_has_end_node() const; + inline void clear_has_has_end_node(); + + inline bool has_has_outbound_reach() const; + inline void clear_has_has_outbound_reach(); + + inline bool has_has_inbound_reach() const; + inline void clear_has_has_inbound_reach(); + + inline bool has_has_heading() const; + inline void clear_has_has_heading(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; @@ -1248,40 +1158,83 @@ class PathEdge final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField names_; ::valhalla::LatLng* ll_; - uint64_t graph_id_; - double percent_along_; - double distance_; - int side_of_street_; - bool begin_node_; - bool end_node_; - int32_t outbound_reach_; - int32_t inbound_reach_; - float heading_; + union HasGraphIdUnion { + constexpr HasGraphIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t graph_id_; + } has_graph_id_; + union HasPercentAlongUnion { + constexpr HasPercentAlongUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double percent_along_; + } has_percent_along_; + union HasSideOfStreetUnion { + constexpr HasSideOfStreetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int side_of_street_; + } has_side_of_street_; + union HasDistanceUnion { + constexpr HasDistanceUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double distance_; + } has_distance_; + union HasMinimumReachabilityUnion { + constexpr HasMinimumReachabilityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t minimum_reachability_; + } has_minimum_reachability_; + union HasBeginNodeUnion { + constexpr HasBeginNodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool begin_node_; + } has_begin_node_; + union HasEndNodeUnion { + constexpr HasEndNodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool end_node_; + } has_end_node_; + union HasOutboundReachUnion { + constexpr HasOutboundReachUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t outbound_reach_; + } has_outbound_reach_; + union HasInboundReachUnion { + constexpr HasInboundReachUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int32_t inbound_reach_; + } has_inbound_reach_; + union HasHeadingUnion { + constexpr HasHeadingUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float heading_; + } has_heading_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[10]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- -class Correlation final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Correlation) */ { +class Location_SearchFilter final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:valhalla.Location.SearchFilter) */ { public: - inline Correlation() : Correlation(nullptr) {} - ~Correlation() override; - explicit PROTOBUF_CONSTEXPR Correlation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + inline Location_SearchFilter() : Location_SearchFilter(nullptr) {} + ~Location_SearchFilter() override; + explicit PROTOBUF_CONSTEXPR Location_SearchFilter(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - Correlation(const Correlation& from); - Correlation(Correlation&& from) noexcept - : Correlation() { + Location_SearchFilter(const Location_SearchFilter& from); + Location_SearchFilter(Location_SearchFilter&& from) noexcept + : Location_SearchFilter() { *this = ::std::move(from); } - inline Correlation& operator=(const Correlation& from) { + inline Location_SearchFilter& operator=(const Location_SearchFilter& from) { CopyFrom(from); return *this; } - inline Correlation& operator=(Correlation&& from) noexcept { + inline Location_SearchFilter& operator=(Location_SearchFilter&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -1295,20 +1248,50 @@ class Correlation final : return *this; } - static const Correlation& default_instance() { + static const Location_SearchFilter& default_instance() { return *internal_default_instance(); } - static inline const Correlation* internal_default_instance() { - return reinterpret_cast( - &_Correlation_default_instance_); + enum HasMinRoadClassCase { + kMinRoadClass = 1, + HAS_MIN_ROAD_CLASS_NOT_SET = 0, + }; + + enum HasMaxRoadClassCase { + kMaxRoadClass = 2, + HAS_MAX_ROAD_CLASS_NOT_SET = 0, + }; + + enum HasExcludeTunnelCase { + kExcludeTunnel = 3, + HAS_EXCLUDE_TUNNEL_NOT_SET = 0, + }; + + enum HasExcludeBridgeCase { + kExcludeBridge = 4, + HAS_EXCLUDE_BRIDGE_NOT_SET = 0, + }; + + enum HasExcludeRampCase { + kExcludeRamp = 5, + HAS_EXCLUDE_RAMP_NOT_SET = 0, + }; + + enum HasExcludeClosuresCase { + kExcludeClosures = 6, + HAS_EXCLUDE_CLOSURES_NOT_SET = 0, + }; + + static inline const Location_SearchFilter* internal_default_instance() { + return reinterpret_cast( + &_Location_SearchFilter_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 3; - friend void swap(Correlation& a, Correlation& b) { + friend void swap(Location_SearchFilter& a, Location_SearchFilter& b) { a.Swap(&b); } - inline void Swap(Correlation* other) { + inline void Swap(Location_SearchFilter* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -1321,7 +1304,7 @@ class Correlation final : ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Correlation* other) { + void UnsafeArenaSwap(Location_SearchFilter* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -1329,12 +1312,12 @@ class Correlation final : // implements Message ---------------------------------------------- - Correlation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Location_SearchFilter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const Correlation& from); - void MergeFrom(const Correlation& from); + void CopyFrom(const Location_SearchFilter& from); + void MergeFrom(const Location_SearchFilter& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1348,15 +1331,15 @@ class Correlation final : void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(Correlation* other); + void InternalSwap(Location_SearchFilter* other); private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "valhalla.Correlation"; + return "valhalla.Location.SearchFilter"; } protected: - explicit Correlation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + explicit Location_SearchFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); public: @@ -1367,134 +1350,171 @@ class Correlation final : // accessors ------------------------------------------------------- enum : int { - kEdgesFieldNumber = 1, - kFilteredEdgesFieldNumber = 2, - kProjectedLlFieldNumber = 4, - kOriginalIndexFieldNumber = 3, - kLegShapeIndexFieldNumber = 5, - kDistanceFromLegOriginFieldNumber = 6, - kRouteIndexFieldNumber = 7, - kWaypointIndexFieldNumber = 8, + kMinRoadClassFieldNumber = 1, + kMaxRoadClassFieldNumber = 2, + kExcludeTunnelFieldNumber = 3, + kExcludeBridgeFieldNumber = 4, + kExcludeRampFieldNumber = 5, + kExcludeClosuresFieldNumber = 6, }; - // repeated .valhalla.PathEdge edges = 1; - int edges_size() const; + // .valhalla.RoadClass min_road_class = 1; + bool has_min_road_class() const; private: - int _internal_edges_size() const; + bool _internal_has_min_road_class() const; public: - void clear_edges(); - ::valhalla::PathEdge* mutable_edges(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >* - mutable_edges(); + void clear_min_road_class(); + ::valhalla::RoadClass min_road_class() const; + void set_min_road_class(::valhalla::RoadClass value); private: - const ::valhalla::PathEdge& _internal_edges(int index) const; - ::valhalla::PathEdge* _internal_add_edges(); + ::valhalla::RoadClass _internal_min_road_class() const; + void _internal_set_min_road_class(::valhalla::RoadClass value); public: - const ::valhalla::PathEdge& edges(int index) const; - ::valhalla::PathEdge* add_edges(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >& - edges() const; - // repeated .valhalla.PathEdge filtered_edges = 2; - int filtered_edges_size() const; + // .valhalla.RoadClass max_road_class = 2; + bool has_max_road_class() const; private: - int _internal_filtered_edges_size() const; + bool _internal_has_max_road_class() const; public: - void clear_filtered_edges(); - ::valhalla::PathEdge* mutable_filtered_edges(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >* - mutable_filtered_edges(); + void clear_max_road_class(); + ::valhalla::RoadClass max_road_class() const; + void set_max_road_class(::valhalla::RoadClass value); private: - const ::valhalla::PathEdge& _internal_filtered_edges(int index) const; - ::valhalla::PathEdge* _internal_add_filtered_edges(); + ::valhalla::RoadClass _internal_max_road_class() const; + void _internal_set_max_road_class(::valhalla::RoadClass value); public: - const ::valhalla::PathEdge& filtered_edges(int index) const; - ::valhalla::PathEdge* add_filtered_edges(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >& - filtered_edges() const; - // .valhalla.LatLng projected_ll = 4; - bool has_projected_ll() const; + // bool exclude_tunnel = 3; + bool has_exclude_tunnel() const; private: - bool _internal_has_projected_ll() const; + bool _internal_has_exclude_tunnel() const; public: - void clear_projected_ll(); - const ::valhalla::LatLng& projected_ll() const; - PROTOBUF_NODISCARD ::valhalla::LatLng* release_projected_ll(); - ::valhalla::LatLng* mutable_projected_ll(); - void set_allocated_projected_ll(::valhalla::LatLng* projected_ll); + void clear_exclude_tunnel(); + bool exclude_tunnel() const; + void set_exclude_tunnel(bool value); private: - const ::valhalla::LatLng& _internal_projected_ll() const; - ::valhalla::LatLng* _internal_mutable_projected_ll(); + bool _internal_exclude_tunnel() const; + void _internal_set_exclude_tunnel(bool value); public: - void unsafe_arena_set_allocated_projected_ll( - ::valhalla::LatLng* projected_ll); - ::valhalla::LatLng* unsafe_arena_release_projected_ll(); - // uint32 original_index = 3; - void clear_original_index(); - uint32_t original_index() const; - void set_original_index(uint32_t value); + // bool exclude_bridge = 4; + bool has_exclude_bridge() const; private: - uint32_t _internal_original_index() const; - void _internal_set_original_index(uint32_t value); + bool _internal_has_exclude_bridge() const; public: - - // uint32 leg_shape_index = 5; - void clear_leg_shape_index(); - uint32_t leg_shape_index() const; - void set_leg_shape_index(uint32_t value); + void clear_exclude_bridge(); + bool exclude_bridge() const; + void set_exclude_bridge(bool value); private: - uint32_t _internal_leg_shape_index() const; - void _internal_set_leg_shape_index(uint32_t value); + bool _internal_exclude_bridge() const; + void _internal_set_exclude_bridge(bool value); public: - // double distance_from_leg_origin = 6; - void clear_distance_from_leg_origin(); - double distance_from_leg_origin() const; - void set_distance_from_leg_origin(double value); + // bool exclude_ramp = 5; + bool has_exclude_ramp() const; private: - double _internal_distance_from_leg_origin() const; - void _internal_set_distance_from_leg_origin(double value); + bool _internal_has_exclude_ramp() const; public: - - // uint32 route_index = 7; - void clear_route_index(); - uint32_t route_index() const; - void set_route_index(uint32_t value); + void clear_exclude_ramp(); + bool exclude_ramp() const; + void set_exclude_ramp(bool value); private: - uint32_t _internal_route_index() const; - void _internal_set_route_index(uint32_t value); + bool _internal_exclude_ramp() const; + void _internal_set_exclude_ramp(bool value); public: - // uint32 waypoint_index = 8; - void clear_waypoint_index(); - uint32_t waypoint_index() const; - void set_waypoint_index(uint32_t value); + // bool exclude_closures = 6; + bool has_exclude_closures() const; private: - uint32_t _internal_waypoint_index() const; - void _internal_set_waypoint_index(uint32_t value); + bool _internal_has_exclude_closures() const; + public: + void clear_exclude_closures(); + bool exclude_closures() const; + void set_exclude_closures(bool value); + private: + bool _internal_exclude_closures() const; + void _internal_set_exclude_closures(bool value); public: - // @@protoc_insertion_point(class_scope:valhalla.Correlation) + void clear_has_min_road_class(); + HasMinRoadClassCase has_min_road_class_case() const; + void clear_has_max_road_class(); + HasMaxRoadClassCase has_max_road_class_case() const; + void clear_has_exclude_tunnel(); + HasExcludeTunnelCase has_exclude_tunnel_case() const; + void clear_has_exclude_bridge(); + HasExcludeBridgeCase has_exclude_bridge_case() const; + void clear_has_exclude_ramp(); + HasExcludeRampCase has_exclude_ramp_case() const; + void clear_has_exclude_closures(); + HasExcludeClosuresCase has_exclude_closures_case() const; + // @@protoc_insertion_point(class_scope:valhalla.Location.SearchFilter) private: class _Internal; + void set_has_min_road_class(); + void set_has_max_road_class(); + void set_has_exclude_tunnel(); + void set_has_exclude_bridge(); + void set_has_exclude_ramp(); + void set_has_exclude_closures(); + + inline bool has_has_min_road_class() const; + inline void clear_has_has_min_road_class(); + + inline bool has_has_max_road_class() const; + inline void clear_has_has_max_road_class(); + + inline bool has_has_exclude_tunnel() const; + inline void clear_has_has_exclude_tunnel(); + + inline bool has_has_exclude_bridge() const; + inline void clear_has_has_exclude_bridge(); + + inline bool has_has_exclude_ramp() const; + inline void clear_has_has_exclude_ramp(); + + inline bool has_has_exclude_closures() const; + inline void clear_has_has_exclude_closures(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge > edges_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge > filtered_edges_; - ::valhalla::LatLng* projected_ll_; - uint32_t original_index_; - uint32_t leg_shape_index_; - double distance_from_leg_origin_; - uint32_t route_index_; - uint32_t waypoint_index_; + union HasMinRoadClassUnion { + constexpr HasMinRoadClassUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int min_road_class_; + } has_min_road_class_; + union HasMaxRoadClassUnion { + constexpr HasMaxRoadClassUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int max_road_class_; + } has_max_road_class_; + union HasExcludeTunnelUnion { + constexpr HasExcludeTunnelUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool exclude_tunnel_; + } has_exclude_tunnel_; + union HasExcludeBridgeUnion { + constexpr HasExcludeBridgeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool exclude_bridge_; + } has_exclude_bridge_; + union HasExcludeRampUnion { + constexpr HasExcludeRampUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool exclude_ramp_; + } has_exclude_ramp_; + union HasExcludeClosuresUnion { + constexpr HasExcludeClosuresUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool exclude_closures_; + } has_exclude_closures_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[6]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -1532,11 +1552,66 @@ class Location final : static const Location& default_instance() { return *internal_default_instance(); } + enum HasTypeCase { + kType = 2, + HAS_TYPE_NOT_SET = 0, + }; + enum HasHeadingCase { kHeading = 3, HAS_HEADING_NOT_SET = 0, }; + enum HasNameCase { + kName = 4, + HAS_NAME_NOT_SET = 0, + }; + + enum HasStreetCase { + kStreet = 5, + HAS_STREET_NOT_SET = 0, + }; + + enum HasCityCase { + kCity = 6, + HAS_CITY_NOT_SET = 0, + }; + + enum HasStateCase { + kState = 7, + HAS_STATE_NOT_SET = 0, + }; + + enum HasPostalCodeCase { + kPostalCode = 8, + HAS_POSTAL_CODE_NOT_SET = 0, + }; + + enum HasCountryCase { + kCountry = 9, + HAS_COUNTRY_NOT_SET = 0, + }; + + enum HasPhoneCase { + kPhone = 10, + HAS_PHONE_NOT_SET = 0, + }; + + enum HasUrlCase { + kUrl = 11, + HAS_URL_NOT_SET = 0, + }; + + enum HasDateTimeCase { + kDateTime = 12, + HAS_DATE_TIME_NOT_SET = 0, + }; + + enum HasSideOfStreetCase { + kSideOfStreet = 13, + HAS_SIDE_OF_STREET_NOT_SET = 0, + }; + enum HasHeadingToleranceCase { kHeadingTolerance = 14, HAS_HEADING_TOLERANCE_NOT_SET = 0, @@ -1547,6 +1622,11 @@ class Location final : HAS_NODE_SNAP_TOLERANCE_NOT_SET = 0, }; + enum HasWayIdCase { + kWayId = 16, + HAS_WAY_ID_NOT_SET = 0, + }; + enum HasMinimumReachabilityCase { kMinimumReachability = 17, HAS_MINIMUM_REACHABILITY_NOT_SET = 0, @@ -1567,23 +1647,58 @@ class Location final : HAS_TIME_NOT_SET = 0, }; + enum HasSkipRankingCandidatesCase { + kSkipRankingCandidates = 21, + HAS_SKIP_RANKING_CANDIDATES_NOT_SET = 0, + }; + + enum HasOriginalIndexCase { + kOriginalIndex = 24, + HAS_ORIGINAL_INDEX_NOT_SET = 0, + }; + + enum HasLegShapeIndexCase { + kLegShapeIndex = 35, + HAS_LEG_SHAPE_INDEX_NOT_SET = 0, + }; + + enum HasDistanceFromLegOriginCase { + kDistanceFromLegOrigin = 36, + HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET = 0, + }; + + enum HasPreferredSideCase { + kPreferredSide = 26, + HAS_PREFERRED_SIDE_NOT_SET = 0, + }; + enum HasSearchCutoffCase { - kSearchCutoff = 24, + kSearchCutoff = 28, HAS_SEARCH_CUTOFF_NOT_SET = 0, }; enum HasStreetSideToleranceCase { - kStreetSideTolerance = 25, + kStreetSideTolerance = 29, HAS_STREET_SIDE_TOLERANCE_NOT_SET = 0, }; + enum HasRouteIndexCase { + kRouteIndex = 30, + HAS_ROUTE_INDEX_NOT_SET = 0, + }; + + enum HasWaypointIndexCase { + kWaypointIndex = 31, + HAS_WAYPOINT_INDEX_NOT_SET = 0, + }; + enum HasStreetSideMaxDistanceCase { - kStreetSideMaxDistance = 27, + kStreetSideMaxDistance = 33, HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET = 0, }; enum HasPreferredLayerCase { - kPreferredLayer = 28, + kPreferredLayer = 34, HAS_PREFERRED_LAYER_NOT_SET = 0, }; @@ -1592,7 +1707,7 @@ class Location final : &_Location_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 4; friend void swap(Location& a, Location& b) { a.Swap(&b); @@ -1653,6 +1768,9 @@ class Location final : // nested types ---------------------------------------------------- + typedef Location_PathEdge PathEdge; + typedef Location_SearchFilter SearchFilter; + typedef Location_Type Type; static constexpr Type kBreak = Location_Type_kBreak; @@ -1683,34 +1801,6 @@ class Location final : return Location_Type_Parse(name, value); } - typedef Location_PreferredSide PreferredSide; - static constexpr PreferredSide either = - Location_PreferredSide_either; - static constexpr PreferredSide same = - Location_PreferredSide_same; - static constexpr PreferredSide opposite = - Location_PreferredSide_opposite; - static inline bool PreferredSide_IsValid(int value) { - return Location_PreferredSide_IsValid(value); - } - static constexpr PreferredSide PreferredSide_MIN = - Location_PreferredSide_PreferredSide_MIN; - static constexpr PreferredSide PreferredSide_MAX = - Location_PreferredSide_PreferredSide_MAX; - static constexpr int PreferredSide_ARRAYSIZE = - Location_PreferredSide_PreferredSide_ARRAYSIZE; - template - static inline const std::string& PreferredSide_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function PreferredSide_Name."); - return Location_PreferredSide_Name(enum_t_value); - } - static inline bool PreferredSide_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, - PreferredSide* value) { - return Location_PreferredSide_Parse(name, value); - } - typedef Location_SideOfStreet SideOfStreet; static constexpr SideOfStreet kNone = Location_SideOfStreet_kNone; @@ -1728,85 +1818,120 @@ class Location final : static constexpr int SideOfStreet_ARRAYSIZE = Location_SideOfStreet_SideOfStreet_ARRAYSIZE; template - static inline const std::string& SideOfStreet_Name(T enum_t_value) { - static_assert(::std::is_same::value || + static inline const std::string& SideOfStreet_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SideOfStreet_Name."); + return Location_SideOfStreet_Name(enum_t_value); + } + static inline bool SideOfStreet_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + SideOfStreet* value) { + return Location_SideOfStreet_Parse(name, value); + } + + typedef Location_PreferredSide PreferredSide; + static constexpr PreferredSide either = + Location_PreferredSide_either; + static constexpr PreferredSide same = + Location_PreferredSide_same; + static constexpr PreferredSide opposite = + Location_PreferredSide_opposite; + static inline bool PreferredSide_IsValid(int value) { + return Location_PreferredSide_IsValid(value); + } + static constexpr PreferredSide PreferredSide_MIN = + Location_PreferredSide_PreferredSide_MIN; + static constexpr PreferredSide PreferredSide_MAX = + Location_PreferredSide_PreferredSide_MAX; + static constexpr int PreferredSide_ARRAYSIZE = + Location_PreferredSide_PreferredSide_ARRAYSIZE; + template + static inline const std::string& PreferredSide_Name(T enum_t_value) { + static_assert(::std::is_same::value || ::std::is_integral::value, - "Incorrect type passed to function SideOfStreet_Name."); - return Location_SideOfStreet_Name(enum_t_value); + "Incorrect type passed to function PreferredSide_Name."); + return Location_PreferredSide_Name(enum_t_value); } - static inline bool SideOfStreet_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, - SideOfStreet* value) { - return Location_SideOfStreet_Parse(name, value); + static inline bool PreferredSide_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + PreferredSide* value) { + return Location_PreferredSide_Parse(name, value); } // accessors ------------------------------------------------------- enum : int { + kPathEdgesFieldNumber = 22, + kFilteredEdgesFieldNumber = 23, + kLlFieldNumber = 1, + kProjectedLlFieldNumber = 25, + kDisplayLlFieldNumber = 27, + kSearchFilterFieldNumber = 32, + kTypeFieldNumber = 2, + kHeadingFieldNumber = 3, kNameFieldNumber = 4, kStreetFieldNumber = 5, + kCityFieldNumber = 6, + kStateFieldNumber = 7, + kPostalCodeFieldNumber = 8, + kCountryFieldNumber = 9, + kPhoneFieldNumber = 10, + kUrlFieldNumber = 11, kDateTimeFieldNumber = 12, - kLlFieldNumber = 1, - kDisplayLlFieldNumber = 23, - kSearchFilterFieldNumber = 26, - kCorrelationFieldNumber = 90, - kTypeFieldNumber = 2, kSideOfStreetFieldNumber = 13, - kSkipRankingCandidatesFieldNumber = 21, - kPreferredSideFieldNumber = 22, - kWaitingSecsFieldNumber = 29, - kHeadingFieldNumber = 3, kHeadingToleranceFieldNumber = 14, kNodeSnapToleranceFieldNumber = 15, + kWayIdFieldNumber = 16, kMinimumReachabilityFieldNumber = 17, kRadiusFieldNumber = 18, kAccuracyFieldNumber = 19, kTimeFieldNumber = 20, - kSearchCutoffFieldNumber = 24, - kStreetSideToleranceFieldNumber = 25, - kStreetSideMaxDistanceFieldNumber = 27, - kPreferredLayerFieldNumber = 28, + kSkipRankingCandidatesFieldNumber = 21, + kOriginalIndexFieldNumber = 24, + kLegShapeIndexFieldNumber = 35, + kDistanceFromLegOriginFieldNumber = 36, + kPreferredSideFieldNumber = 26, + kSearchCutoffFieldNumber = 28, + kStreetSideToleranceFieldNumber = 29, + kRouteIndexFieldNumber = 30, + kWaypointIndexFieldNumber = 31, + kStreetSideMaxDistanceFieldNumber = 33, + kPreferredLayerFieldNumber = 34, }; - // string name = 4; - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); + // repeated .valhalla.Location.PathEdge path_edges = 22; + int path_edges_size() const; private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); + int _internal_path_edges_size() const; public: - - // string street = 5; - void clear_street(); - const std::string& street() const; - template - void set_street(ArgT0&& arg0, ArgT... args); - std::string* mutable_street(); - PROTOBUF_NODISCARD std::string* release_street(); - void set_allocated_street(std::string* street); + void clear_path_edges(); + ::valhalla::Location_PathEdge* mutable_path_edges(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >* + mutable_path_edges(); private: - const std::string& _internal_street() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_street(const std::string& value); - std::string* _internal_mutable_street(); + const ::valhalla::Location_PathEdge& _internal_path_edges(int index) const; + ::valhalla::Location_PathEdge* _internal_add_path_edges(); public: + const ::valhalla::Location_PathEdge& path_edges(int index) const; + ::valhalla::Location_PathEdge* add_path_edges(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >& + path_edges() const; - // string date_time = 12; - void clear_date_time(); - const std::string& date_time() const; - template - void set_date_time(ArgT0&& arg0, ArgT... args); - std::string* mutable_date_time(); - PROTOBUF_NODISCARD std::string* release_date_time(); - void set_allocated_date_time(std::string* date_time); + // repeated .valhalla.Location.PathEdge filtered_edges = 23; + int filtered_edges_size() const; private: - const std::string& _internal_date_time() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_date_time(const std::string& value); - std::string* _internal_mutable_date_time(); + int _internal_filtered_edges_size() const; + public: + void clear_filtered_edges(); + ::valhalla::Location_PathEdge* mutable_filtered_edges(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >* + mutable_filtered_edges(); + private: + const ::valhalla::Location_PathEdge& _internal_filtered_edges(int index) const; + ::valhalla::Location_PathEdge* _internal_add_filtered_edges(); public: + const ::valhalla::Location_PathEdge& filtered_edges(int index) const; + ::valhalla::Location_PathEdge* add_filtered_edges(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >& + filtered_edges() const; // .valhalla.LatLng ll = 1; bool has_ll() const; @@ -1826,7 +1951,25 @@ class Location final : ::valhalla::LatLng* ll); ::valhalla::LatLng* unsafe_arena_release_ll(); - // .valhalla.LatLng display_ll = 23; + // .valhalla.LatLng projected_ll = 25; + bool has_projected_ll() const; + private: + bool _internal_has_projected_ll() const; + public: + void clear_projected_ll(); + const ::valhalla::LatLng& projected_ll() const; + PROTOBUF_NODISCARD ::valhalla::LatLng* release_projected_ll(); + ::valhalla::LatLng* mutable_projected_ll(); + void set_allocated_projected_ll(::valhalla::LatLng* projected_ll); + private: + const ::valhalla::LatLng& _internal_projected_ll() const; + ::valhalla::LatLng* _internal_mutable_projected_ll(); + public: + void unsafe_arena_set_allocated_projected_ll( + ::valhalla::LatLng* projected_ll); + ::valhalla::LatLng* unsafe_arena_release_projected_ll(); + + // .valhalla.LatLng display_ll = 27; bool has_display_ll() const; private: bool _internal_has_display_ll() const; @@ -1844,43 +1987,29 @@ class Location final : ::valhalla::LatLng* display_ll); ::valhalla::LatLng* unsafe_arena_release_display_ll(); - // .valhalla.SearchFilter search_filter = 26; + // .valhalla.Location.SearchFilter search_filter = 32; bool has_search_filter() const; private: bool _internal_has_search_filter() const; public: void clear_search_filter(); - const ::valhalla::SearchFilter& search_filter() const; - PROTOBUF_NODISCARD ::valhalla::SearchFilter* release_search_filter(); - ::valhalla::SearchFilter* mutable_search_filter(); - void set_allocated_search_filter(::valhalla::SearchFilter* search_filter); + const ::valhalla::Location_SearchFilter& search_filter() const; + PROTOBUF_NODISCARD ::valhalla::Location_SearchFilter* release_search_filter(); + ::valhalla::Location_SearchFilter* mutable_search_filter(); + void set_allocated_search_filter(::valhalla::Location_SearchFilter* search_filter); private: - const ::valhalla::SearchFilter& _internal_search_filter() const; - ::valhalla::SearchFilter* _internal_mutable_search_filter(); + const ::valhalla::Location_SearchFilter& _internal_search_filter() const; + ::valhalla::Location_SearchFilter* _internal_mutable_search_filter(); public: void unsafe_arena_set_allocated_search_filter( - ::valhalla::SearchFilter* search_filter); - ::valhalla::SearchFilter* unsafe_arena_release_search_filter(); + ::valhalla::Location_SearchFilter* search_filter); + ::valhalla::Location_SearchFilter* unsafe_arena_release_search_filter(); - // .valhalla.Correlation correlation = 90; - bool has_correlation() const; - private: - bool _internal_has_correlation() const; - public: - void clear_correlation(); - const ::valhalla::Correlation& correlation() const; - PROTOBUF_NODISCARD ::valhalla::Correlation* release_correlation(); - ::valhalla::Correlation* mutable_correlation(); - void set_allocated_correlation(::valhalla::Correlation* correlation); + // .valhalla.Location.Type type = 2; + bool has_type() const; private: - const ::valhalla::Correlation& _internal_correlation() const; - ::valhalla::Correlation* _internal_mutable_correlation(); + bool _internal_has_type() const; public: - void unsafe_arena_set_allocated_correlation( - ::valhalla::Correlation* correlation); - ::valhalla::Correlation* unsafe_arena_release_correlation(); - - // .valhalla.Location.Type type = 2; void clear_type(); ::valhalla::Location_Type type() const; void set_type(::valhalla::Location_Type value); @@ -1889,53 +2018,192 @@ class Location final : void _internal_set_type(::valhalla::Location_Type value); public: - // .valhalla.Location.SideOfStreet side_of_street = 13; - void clear_side_of_street(); - ::valhalla::Location_SideOfStreet side_of_street() const; - void set_side_of_street(::valhalla::Location_SideOfStreet value); + // uint32 heading = 3; + bool has_heading() const; private: - ::valhalla::Location_SideOfStreet _internal_side_of_street() const; - void _internal_set_side_of_street(::valhalla::Location_SideOfStreet value); + bool _internal_has_heading() const; + public: + void clear_heading(); + uint32_t heading() const; + void set_heading(uint32_t value); + private: + uint32_t _internal_heading() const; + void _internal_set_heading(uint32_t value); public: - // bool skip_ranking_candidates = 21; - void clear_skip_ranking_candidates(); - bool skip_ranking_candidates() const; - void set_skip_ranking_candidates(bool value); + // string name = 4; + bool has_name() const; private: - bool _internal_skip_ranking_candidates() const; - void _internal_set_skip_ranking_candidates(bool value); + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); public: - // .valhalla.Location.PreferredSide preferred_side = 22; - void clear_preferred_side(); - ::valhalla::Location_PreferredSide preferred_side() const; - void set_preferred_side(::valhalla::Location_PreferredSide value); + // string street = 5; + bool has_street() const; private: - ::valhalla::Location_PreferredSide _internal_preferred_side() const; - void _internal_set_preferred_side(::valhalla::Location_PreferredSide value); + bool _internal_has_street() const; + public: + void clear_street(); + const std::string& street() const; + template + void set_street(ArgT0&& arg0, ArgT... args); + std::string* mutable_street(); + PROTOBUF_NODISCARD std::string* release_street(); + void set_allocated_street(std::string* street); + private: + const std::string& _internal_street() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_street(const std::string& value); + std::string* _internal_mutable_street(); + public: + + // string city = 6; + bool has_city() const; + private: + bool _internal_has_city() const; + public: + void clear_city(); + const std::string& city() const; + template + void set_city(ArgT0&& arg0, ArgT... args); + std::string* mutable_city(); + PROTOBUF_NODISCARD std::string* release_city(); + void set_allocated_city(std::string* city); + private: + const std::string& _internal_city() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_city(const std::string& value); + std::string* _internal_mutable_city(); public: - // float waiting_secs = 29; - void clear_waiting_secs(); - float waiting_secs() const; - void set_waiting_secs(float value); + // string state = 7; + bool has_state() const; + private: + bool _internal_has_state() const; + public: + void clear_state(); + const std::string& state() const; + template + void set_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_state(); + PROTOBUF_NODISCARD std::string* release_state(); + void set_allocated_state(std::string* state); private: - float _internal_waiting_secs() const; - void _internal_set_waiting_secs(float value); + const std::string& _internal_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_state(const std::string& value); + std::string* _internal_mutable_state(); public: - // uint32 heading = 3; - bool has_heading() const; + // string postal_code = 8; + bool has_postal_code() const; private: - bool _internal_has_heading() const; + bool _internal_has_postal_code() const; public: - void clear_heading(); - uint32_t heading() const; - void set_heading(uint32_t value); + void clear_postal_code(); + const std::string& postal_code() const; + template + void set_postal_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_postal_code(); + PROTOBUF_NODISCARD std::string* release_postal_code(); + void set_allocated_postal_code(std::string* postal_code); private: - uint32_t _internal_heading() const; - void _internal_set_heading(uint32_t value); + const std::string& _internal_postal_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_postal_code(const std::string& value); + std::string* _internal_mutable_postal_code(); + public: + + // string country = 9; + bool has_country() const; + private: + bool _internal_has_country() const; + public: + void clear_country(); + const std::string& country() const; + template + void set_country(ArgT0&& arg0, ArgT... args); + std::string* mutable_country(); + PROTOBUF_NODISCARD std::string* release_country(); + void set_allocated_country(std::string* country); + private: + const std::string& _internal_country() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_country(const std::string& value); + std::string* _internal_mutable_country(); + public: + + // string phone = 10; + bool has_phone() const; + private: + bool _internal_has_phone() const; + public: + void clear_phone(); + const std::string& phone() const; + template + void set_phone(ArgT0&& arg0, ArgT... args); + std::string* mutable_phone(); + PROTOBUF_NODISCARD std::string* release_phone(); + void set_allocated_phone(std::string* phone); + private: + const std::string& _internal_phone() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_phone(const std::string& value); + std::string* _internal_mutable_phone(); + public: + + // string url = 11; + bool has_url() const; + private: + bool _internal_has_url() const; + public: + void clear_url(); + const std::string& url() const; + template + void set_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_url(); + PROTOBUF_NODISCARD std::string* release_url(); + void set_allocated_url(std::string* url); + private: + const std::string& _internal_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_url(const std::string& value); + std::string* _internal_mutable_url(); + public: + + // string date_time = 12; + bool has_date_time() const; + private: + bool _internal_has_date_time() const; + public: + void clear_date_time(); + const std::string& date_time() const; + template + void set_date_time(ArgT0&& arg0, ArgT... args); + std::string* mutable_date_time(); + PROTOBUF_NODISCARD std::string* release_date_time(); + void set_allocated_date_time(std::string* date_time); + private: + const std::string& _internal_date_time() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_date_time(const std::string& value); + std::string* _internal_mutable_date_time(); + public: + + // .valhalla.Location.SideOfStreet side_of_street = 13; + bool has_side_of_street() const; + private: + bool _internal_has_side_of_street() const; + public: + void clear_side_of_street(); + ::valhalla::Location_SideOfStreet side_of_street() const; + void set_side_of_street(::valhalla::Location_SideOfStreet value); + private: + ::valhalla::Location_SideOfStreet _internal_side_of_street() const; + void _internal_set_side_of_street(::valhalla::Location_SideOfStreet value); public: // uint32 heading_tolerance = 14; @@ -1964,6 +2232,19 @@ class Location final : void _internal_set_node_snap_tolerance(uint32_t value); public: + // uint64 way_id = 16; + bool has_way_id() const; + private: + bool _internal_has_way_id() const; + public: + void clear_way_id(); + uint64_t way_id() const; + void set_way_id(uint64_t value); + private: + uint64_t _internal_way_id() const; + void _internal_set_way_id(uint64_t value); + public: + // uint32 minimum_reachability = 17; bool has_minimum_reachability() const; private: @@ -2012,11 +2293,76 @@ class Location final : double time() const; void set_time(double value); private: - double _internal_time() const; - void _internal_set_time(double value); + double _internal_time() const; + void _internal_set_time(double value); + public: + + // bool skip_ranking_candidates = 21; + bool has_skip_ranking_candidates() const; + private: + bool _internal_has_skip_ranking_candidates() const; + public: + void clear_skip_ranking_candidates(); + bool skip_ranking_candidates() const; + void set_skip_ranking_candidates(bool value); + private: + bool _internal_skip_ranking_candidates() const; + void _internal_set_skip_ranking_candidates(bool value); + public: + + // uint32 original_index = 24; + bool has_original_index() const; + private: + bool _internal_has_original_index() const; + public: + void clear_original_index(); + uint32_t original_index() const; + void set_original_index(uint32_t value); + private: + uint32_t _internal_original_index() const; + void _internal_set_original_index(uint32_t value); + public: + + // uint32 leg_shape_index = 35; + bool has_leg_shape_index() const; + private: + bool _internal_has_leg_shape_index() const; + public: + void clear_leg_shape_index(); + uint32_t leg_shape_index() const; + void set_leg_shape_index(uint32_t value); + private: + uint32_t _internal_leg_shape_index() const; + void _internal_set_leg_shape_index(uint32_t value); + public: + + // double distance_from_leg_origin = 36; + bool has_distance_from_leg_origin() const; + private: + bool _internal_has_distance_from_leg_origin() const; + public: + void clear_distance_from_leg_origin(); + double distance_from_leg_origin() const; + void set_distance_from_leg_origin(double value); + private: + double _internal_distance_from_leg_origin() const; + void _internal_set_distance_from_leg_origin(double value); + public: + + // .valhalla.Location.PreferredSide preferred_side = 26; + bool has_preferred_side() const; + private: + bool _internal_has_preferred_side() const; + public: + void clear_preferred_side(); + ::valhalla::Location_PreferredSide preferred_side() const; + void set_preferred_side(::valhalla::Location_PreferredSide value); + private: + ::valhalla::Location_PreferredSide _internal_preferred_side() const; + void _internal_set_preferred_side(::valhalla::Location_PreferredSide value); public: - // uint32 search_cutoff = 24; + // uint32 search_cutoff = 28; bool has_search_cutoff() const; private: bool _internal_has_search_cutoff() const; @@ -2029,7 +2375,7 @@ class Location final : void _internal_set_search_cutoff(uint32_t value); public: - // uint32 street_side_tolerance = 25; + // uint32 street_side_tolerance = 29; bool has_street_side_tolerance() const; private: bool _internal_has_street_side_tolerance() const; @@ -2042,7 +2388,33 @@ class Location final : void _internal_set_street_side_tolerance(uint32_t value); public: - // uint32 street_side_max_distance = 27; + // uint32 route_index = 30; + bool has_route_index() const; + private: + bool _internal_has_route_index() const; + public: + void clear_route_index(); + uint32_t route_index() const; + void set_route_index(uint32_t value); + private: + uint32_t _internal_route_index() const; + void _internal_set_route_index(uint32_t value); + public: + + // uint32 waypoint_index = 31; + bool has_waypoint_index() const; + private: + bool _internal_has_waypoint_index() const; + public: + void clear_waypoint_index(); + uint32_t waypoint_index() const; + void set_waypoint_index(uint32_t value); + private: + uint32_t _internal_waypoint_index() const; + void _internal_set_waypoint_index(uint32_t value); + public: + + // uint32 street_side_max_distance = 33; bool has_street_side_max_distance() const; private: bool _internal_has_street_side_max_distance() const; @@ -2055,7 +2427,7 @@ class Location final : void _internal_set_street_side_max_distance(uint32_t value); public: - // int32 preferred_layer = 28; + // int32 preferred_layer = 34; bool has_preferred_layer() const; private: bool _internal_has_preferred_layer() const; @@ -2068,12 +2440,36 @@ class Location final : void _internal_set_preferred_layer(int32_t value); public: + void clear_has_type(); + HasTypeCase has_type_case() const; void clear_has_heading(); HasHeadingCase has_heading_case() const; + void clear_has_name(); + HasNameCase has_name_case() const; + void clear_has_street(); + HasStreetCase has_street_case() const; + void clear_has_city(); + HasCityCase has_city_case() const; + void clear_has_state(); + HasStateCase has_state_case() const; + void clear_has_postal_code(); + HasPostalCodeCase has_postal_code_case() const; + void clear_has_country(); + HasCountryCase has_country_case() const; + void clear_has_phone(); + HasPhoneCase has_phone_case() const; + void clear_has_url(); + HasUrlCase has_url_case() const; + void clear_has_date_time(); + HasDateTimeCase has_date_time_case() const; + void clear_has_side_of_street(); + HasSideOfStreetCase has_side_of_street_case() const; void clear_has_heading_tolerance(); HasHeadingToleranceCase has_heading_tolerance_case() const; void clear_has_node_snap_tolerance(); HasNodeSnapToleranceCase has_node_snap_tolerance_case() const; + void clear_has_way_id(); + HasWayIdCase has_way_id_case() const; void clear_has_minimum_reachability(); HasMinimumReachabilityCase has_minimum_reachability_case() const; void clear_has_radius(); @@ -2082,10 +2478,24 @@ class Location final : HasAccuracyCase has_accuracy_case() const; void clear_has_time(); HasTimeCase has_time_case() const; + void clear_has_skip_ranking_candidates(); + HasSkipRankingCandidatesCase has_skip_ranking_candidates_case() const; + void clear_has_original_index(); + HasOriginalIndexCase has_original_index_case() const; + void clear_has_leg_shape_index(); + HasLegShapeIndexCase has_leg_shape_index_case() const; + void clear_has_distance_from_leg_origin(); + HasDistanceFromLegOriginCase has_distance_from_leg_origin_case() const; + void clear_has_preferred_side(); + HasPreferredSideCase has_preferred_side_case() const; void clear_has_search_cutoff(); HasSearchCutoffCase has_search_cutoff_case() const; void clear_has_street_side_tolerance(); HasStreetSideToleranceCase has_street_side_tolerance_case() const; + void clear_has_route_index(); + HasRouteIndexCase has_route_index_case() const; + void clear_has_waypoint_index(); + HasWaypointIndexCase has_waypoint_index_case() const; void clear_has_street_side_max_distance(); HasStreetSideMaxDistanceCase has_street_side_max_distance_case() const; void clear_has_preferred_layer(); @@ -2093,27 +2503,82 @@ class Location final : // @@protoc_insertion_point(class_scope:valhalla.Location) private: class _Internal; + void set_has_type(); void set_has_heading(); + void set_has_name(); + void set_has_street(); + void set_has_city(); + void set_has_state(); + void set_has_postal_code(); + void set_has_country(); + void set_has_phone(); + void set_has_url(); + void set_has_date_time(); + void set_has_side_of_street(); void set_has_heading_tolerance(); void set_has_node_snap_tolerance(); + void set_has_way_id(); void set_has_minimum_reachability(); void set_has_radius(); void set_has_accuracy(); void set_has_time(); + void set_has_skip_ranking_candidates(); + void set_has_original_index(); + void set_has_leg_shape_index(); + void set_has_distance_from_leg_origin(); + void set_has_preferred_side(); void set_has_search_cutoff(); void set_has_street_side_tolerance(); + void set_has_route_index(); + void set_has_waypoint_index(); void set_has_street_side_max_distance(); void set_has_preferred_layer(); + inline bool has_has_type() const; + inline void clear_has_has_type(); + inline bool has_has_heading() const; inline void clear_has_has_heading(); + inline bool has_has_name() const; + inline void clear_has_has_name(); + + inline bool has_has_street() const; + inline void clear_has_has_street(); + + inline bool has_has_city() const; + inline void clear_has_has_city(); + + inline bool has_has_state() const; + inline void clear_has_has_state(); + + inline bool has_has_postal_code() const; + inline void clear_has_has_postal_code(); + + inline bool has_has_country() const; + inline void clear_has_has_country(); + + inline bool has_has_phone() const; + inline void clear_has_has_phone(); + + inline bool has_has_url() const; + inline void clear_has_has_url(); + + inline bool has_has_date_time() const; + inline void clear_has_has_date_time(); + + inline bool has_has_side_of_street() const; + inline void clear_has_has_side_of_street(); + inline bool has_has_heading_tolerance() const; inline void clear_has_has_heading_tolerance(); inline bool has_has_node_snap_tolerance() const; inline void clear_has_has_node_snap_tolerance(); + inline bool has_has_way_id() const; + inline void clear_has_has_way_id(); + inline bool has_has_minimum_reachability() const; inline void clear_has_has_minimum_reachability(); @@ -2126,12 +2591,33 @@ class Location final : inline bool has_has_time() const; inline void clear_has_has_time(); + inline bool has_has_skip_ranking_candidates() const; + inline void clear_has_has_skip_ranking_candidates(); + + inline bool has_has_original_index() const; + inline void clear_has_has_original_index(); + + inline bool has_has_leg_shape_index() const; + inline void clear_has_has_leg_shape_index(); + + inline bool has_has_distance_from_leg_origin() const; + inline void clear_has_has_distance_from_leg_origin(); + + inline bool has_has_preferred_side() const; + inline void clear_has_has_preferred_side(); + inline bool has_has_search_cutoff() const; inline void clear_has_has_search_cutoff(); inline bool has_has_street_side_tolerance() const; inline void clear_has_has_street_side_tolerance(); + inline bool has_has_route_index() const; + inline void clear_has_has_route_index(); + + inline bool has_has_waypoint_index() const; + inline void clear_has_has_waypoint_index(); + inline bool has_has_street_side_max_distance() const; inline void clear_has_has_street_side_max_distance(); @@ -2142,23 +2628,72 @@ class Location final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr street_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr date_time_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge > path_edges_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge > filtered_edges_; ::valhalla::LatLng* ll_; + ::valhalla::LatLng* projected_ll_; ::valhalla::LatLng* display_ll_; - ::valhalla::SearchFilter* search_filter_; - ::valhalla::Correlation* correlation_; - int type_; - int side_of_street_; - bool skip_ranking_candidates_; - int preferred_side_; - float waiting_secs_; + ::valhalla::Location_SearchFilter* search_filter_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; union HasHeadingUnion { constexpr HasHeadingUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; uint32_t heading_; } has_heading_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; + union HasStreetUnion { + constexpr HasStreetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr street_; + } has_street_; + union HasCityUnion { + constexpr HasCityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr city_; + } has_city_; + union HasStateUnion { + constexpr HasStateUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_; + } has_state_; + union HasPostalCodeUnion { + constexpr HasPostalCodeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr postal_code_; + } has_postal_code_; + union HasCountryUnion { + constexpr HasCountryUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_; + } has_country_; + union HasPhoneUnion { + constexpr HasPhoneUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr phone_; + } has_phone_; + union HasUrlUnion { + constexpr HasUrlUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr url_; + } has_url_; + union HasDateTimeUnion { + constexpr HasDateTimeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr date_time_; + } has_date_time_; + union HasSideOfStreetUnion { + constexpr HasSideOfStreetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int side_of_street_; + } has_side_of_street_; union HasHeadingToleranceUnion { constexpr HasHeadingToleranceUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -2169,6 +2704,11 @@ class Location final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; uint32_t node_snap_tolerance_; } has_node_snap_tolerance_; + union HasWayIdUnion { + constexpr HasWayIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint64_t way_id_; + } has_way_id_; union HasMinimumReachabilityUnion { constexpr HasMinimumReachabilityUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -2189,6 +2729,31 @@ class Location final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; double time_; } has_time_; + union HasSkipRankingCandidatesUnion { + constexpr HasSkipRankingCandidatesUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool skip_ranking_candidates_; + } has_skip_ranking_candidates_; + union HasOriginalIndexUnion { + constexpr HasOriginalIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t original_index_; + } has_original_index_; + union HasLegShapeIndexUnion { + constexpr HasLegShapeIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t leg_shape_index_; + } has_leg_shape_index_; + union HasDistanceFromLegOriginUnion { + constexpr HasDistanceFromLegOriginUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + double distance_from_leg_origin_; + } has_distance_from_leg_origin_; + union HasPreferredSideUnion { + constexpr HasPreferredSideUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int preferred_side_; + } has_preferred_side_; union HasSearchCutoffUnion { constexpr HasSearchCutoffUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -2199,6 +2764,16 @@ class Location final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; uint32_t street_side_tolerance_; } has_street_side_tolerance_; + union HasRouteIndexUnion { + constexpr HasRouteIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t route_index_; + } has_route_index_; + union HasWaypointIndexUnion { + constexpr HasWaypointIndexUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t waypoint_index_; + } has_waypoint_index_; union HasStreetSideMaxDistanceUnion { constexpr HasStreetSideMaxDistanceUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; @@ -2210,11 +2785,11 @@ class Location final : int32_t preferred_layer_; } has_preferred_layer_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - uint32_t _oneof_case_[11]; + uint32_t _oneof_case_[30]; }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -2252,12 +2827,22 @@ class TransitEgressInfo final : static const TransitEgressInfo& default_instance() { return *internal_default_instance(); } + enum HasOnestopIdCase { + kOnestopId = 1, + HAS_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasNameCase { + kName = 2, + HAS_NAME_NOT_SET = 0, + }; + static inline const TransitEgressInfo* internal_default_instance() { return reinterpret_cast( &_TransitEgressInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 5; friend void swap(TransitEgressInfo& a, TransitEgressInfo& b) { a.Swap(&b); @@ -2321,11 +2906,33 @@ class TransitEgressInfo final : // accessors ------------------------------------------------------- enum : int { + kLlFieldNumber = 3, kOnestopIdFieldNumber = 1, kNameFieldNumber = 2, - kLlFieldNumber = 3, }; + // .valhalla.LatLng ll = 3; + bool has_ll() const; + private: + bool _internal_has_ll() const; + public: + void clear_ll(); + const ::valhalla::LatLng& ll() const; + PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); + ::valhalla::LatLng* mutable_ll(); + void set_allocated_ll(::valhalla::LatLng* ll); + private: + const ::valhalla::LatLng& _internal_ll() const; + ::valhalla::LatLng* _internal_mutable_ll(); + public: + void unsafe_arena_set_allocated_ll( + ::valhalla::LatLng* ll); + ::valhalla::LatLng* unsafe_arena_release_ll(); + // string onestop_id = 1; + bool has_onestop_id() const; + private: + bool _internal_has_onestop_id() const; + public: void clear_onestop_id(); const std::string& onestop_id() const; template @@ -2340,6 +2947,10 @@ class TransitEgressInfo final : public: // string name = 2; + bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); const std::string& name() const; template @@ -2353,39 +2964,43 @@ class TransitEgressInfo final : std::string* _internal_mutable_name(); public: - // .valhalla.LatLng ll = 3; - bool has_ll() const; - private: - bool _internal_has_ll() const; - public: - void clear_ll(); - const ::valhalla::LatLng& ll() const; - PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); - ::valhalla::LatLng* mutable_ll(); - void set_allocated_ll(::valhalla::LatLng* ll); - private: - const ::valhalla::LatLng& _internal_ll() const; - ::valhalla::LatLng* _internal_mutable_ll(); - public: - void unsafe_arena_set_allocated_ll( - ::valhalla::LatLng* ll); - ::valhalla::LatLng* unsafe_arena_release_ll(); - + void clear_has_onestop_id(); + HasOnestopIdCase has_onestop_id_case() const; + void clear_has_name(); + HasNameCase has_name_case() const; // @@protoc_insertion_point(class_scope:valhalla.TransitEgressInfo) private: class _Internal; + void set_has_onestop_id(); + void set_has_name(); + + inline bool has_has_onestop_id() const; + inline void clear_has_has_onestop_id(); + + inline bool has_has_name() const; + inline void clear_has_has_name(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::valhalla::LatLng* ll_; + union HasOnestopIdUnion { + constexpr HasOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; + } has_onestop_id_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -2423,12 +3038,22 @@ class TransitStationInfo final : static const TransitStationInfo& default_instance() { return *internal_default_instance(); } + enum HasOnestopIdCase { + kOnestopId = 1, + HAS_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasNameCase { + kName = 2, + HAS_NAME_NOT_SET = 0, + }; + static inline const TransitStationInfo* internal_default_instance() { return reinterpret_cast( &_TransitStationInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 6; friend void swap(TransitStationInfo& a, TransitStationInfo& b) { a.Swap(&b); @@ -2492,11 +3117,33 @@ class TransitStationInfo final : // accessors ------------------------------------------------------- enum : int { + kLlFieldNumber = 3, kOnestopIdFieldNumber = 1, kNameFieldNumber = 2, - kLlFieldNumber = 3, }; + // .valhalla.LatLng ll = 3; + bool has_ll() const; + private: + bool _internal_has_ll() const; + public: + void clear_ll(); + const ::valhalla::LatLng& ll() const; + PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); + ::valhalla::LatLng* mutable_ll(); + void set_allocated_ll(::valhalla::LatLng* ll); + private: + const ::valhalla::LatLng& _internal_ll() const; + ::valhalla::LatLng* _internal_mutable_ll(); + public: + void unsafe_arena_set_allocated_ll( + ::valhalla::LatLng* ll); + ::valhalla::LatLng* unsafe_arena_release_ll(); + // string onestop_id = 1; + bool has_onestop_id() const; + private: + bool _internal_has_onestop_id() const; + public: void clear_onestop_id(); const std::string& onestop_id() const; template @@ -2511,6 +3158,10 @@ class TransitStationInfo final : public: // string name = 2; + bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); const std::string& name() const; template @@ -2524,39 +3175,43 @@ class TransitStationInfo final : std::string* _internal_mutable_name(); public: - // .valhalla.LatLng ll = 3; - bool has_ll() const; - private: - bool _internal_has_ll() const; - public: - void clear_ll(); - const ::valhalla::LatLng& ll() const; - PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); - ::valhalla::LatLng* mutable_ll(); - void set_allocated_ll(::valhalla::LatLng* ll); - private: - const ::valhalla::LatLng& _internal_ll() const; - ::valhalla::LatLng* _internal_mutable_ll(); - public: - void unsafe_arena_set_allocated_ll( - ::valhalla::LatLng* ll); - ::valhalla::LatLng* unsafe_arena_release_ll(); - + void clear_has_onestop_id(); + HasOnestopIdCase has_onestop_id_case() const; + void clear_has_name(); + HasNameCase has_name_case() const; // @@protoc_insertion_point(class_scope:valhalla.TransitStationInfo) private: class _Internal; + void set_has_onestop_id(); + void set_has_name(); + + inline bool has_has_onestop_id() const; + inline void clear_has_has_onestop_id(); + + inline bool has_has_name() const; + inline void clear_has_has_name(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::valhalla::LatLng* ll_; + union HasOnestopIdUnion { + constexpr HasOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; + } has_onestop_id_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -2594,12 +3249,47 @@ class BikeShareStationInfo final : static const BikeShareStationInfo& default_instance() { return *internal_default_instance(); } + enum HasNameCase { + kName = 1, + HAS_NAME_NOT_SET = 0, + }; + + enum HasRefCase { + kRef = 2, + HAS_REF_NOT_SET = 0, + }; + + enum HasCapacityCase { + kCapacity = 3, + HAS_CAPACITY_NOT_SET = 0, + }; + + enum HasNetworkCase { + kNetwork = 4, + HAS_NETWORK_NOT_SET = 0, + }; + + enum HasOperatorCase { + kOperator = 5, + HAS_OPERATOR__NOT_SET = 0, + }; + + enum HasRentCostCase { + kRentCost = 6, + HAS_RENT_COST_NOT_SET = 0, + }; + + enum HasReturnCostCase { + kReturnCost = 7, + HAS_RETURN_COST_NOT_SET = 0, + }; + static inline const BikeShareStationInfo* internal_default_instance() { return reinterpret_cast( &_BikeShareStationInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 7; friend void swap(BikeShareStationInfo& a, BikeShareStationInfo& b) { a.Swap(&b); @@ -2665,13 +3355,17 @@ class BikeShareStationInfo final : enum : int { kNameFieldNumber = 1, kRefFieldNumber = 2, + kCapacityFieldNumber = 3, kNetworkFieldNumber = 4, kOperatorFieldNumber = 5, - kCapacityFieldNumber = 3, kRentCostFieldNumber = 6, kReturnCostFieldNumber = 7, }; // string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); const std::string& name() const; template @@ -2686,6 +3380,10 @@ class BikeShareStationInfo final : public: // string ref = 2; + bool has_ref() const; + private: + bool _internal_has_ref() const; + public: void clear_ref(); const std::string& ref() const; template @@ -2699,7 +3397,24 @@ class BikeShareStationInfo final : std::string* _internal_mutable_ref(); public: + // uint32 capacity = 3; + bool has_capacity() const; + private: + bool _internal_has_capacity() const; + public: + void clear_capacity(); + uint32_t capacity() const; + void set_capacity(uint32_t value); + private: + uint32_t _internal_capacity() const; + void _internal_set_capacity(uint32_t value); + public: + // string network = 4; + bool has_network() const; + private: + bool _internal_has_network() const; + public: void clear_network(); const std::string& network() const; template @@ -2714,6 +3429,10 @@ class BikeShareStationInfo final : public: // string operator = 5; + bool has_operator_() const; + private: + bool _internal_has_operator_() const; + public: void clear_operator_(); const std::string& operator_() const; template @@ -2727,16 +3446,11 @@ class BikeShareStationInfo final : std::string* _internal_mutable_operator_(); public: - // uint32 capacity = 3; - void clear_capacity(); - uint32_t capacity() const; - void set_capacity(uint32_t value); + // float rent_cost = 6; + bool has_rent_cost() const; private: - uint32_t _internal_capacity() const; - void _internal_set_capacity(uint32_t value); + bool _internal_has_rent_cost() const; public: - - // float rent_cost = 6; void clear_rent_cost(); float rent_cost() const; void set_rent_cost(float value); @@ -2746,6 +3460,10 @@ class BikeShareStationInfo final : public: // float return_cost = 7; + bool has_return_cost() const; + private: + bool _internal_has_return_cost() const; + public: void clear_return_cost(); float return_cost() const; void set_return_cost(float value); @@ -2754,25 +3472,97 @@ class BikeShareStationInfo final : void _internal_set_return_cost(float value); public: + void clear_has_name(); + HasNameCase has_name_case() const; + void clear_has_ref(); + HasRefCase has_ref_case() const; + void clear_has_capacity(); + HasCapacityCase has_capacity_case() const; + void clear_has_network(); + HasNetworkCase has_network_case() const; + void clear_has_operator_(); + HasOperatorCase has_operator__case() const; + void clear_has_rent_cost(); + HasRentCostCase has_rent_cost_case() const; + void clear_has_return_cost(); + HasReturnCostCase has_return_cost_case() const; // @@protoc_insertion_point(class_scope:valhalla.BikeShareStationInfo) private: class _Internal; + void set_has_name(); + void set_has_ref(); + void set_has_capacity(); + void set_has_network(); + void set_has_operator_(); + void set_has_rent_cost(); + void set_has_return_cost(); + + inline bool has_has_name() const; + inline void clear_has_has_name(); + + inline bool has_has_ref() const; + inline void clear_has_has_ref(); + + inline bool has_has_capacity() const; + inline void clear_has_has_capacity(); + + inline bool has_has_network() const; + inline void clear_has_has_network(); + + inline bool has_has_operator_() const; + inline void clear_has_has_operator_(); + + inline bool has_has_rent_cost() const; + inline void clear_has_has_rent_cost(); + + inline bool has_has_return_cost() const; + inline void clear_has_has_return_cost(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ref_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr network_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator__; - uint32_t capacity_; - float rent_cost_; - float return_cost_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; + union HasRefUnion { + constexpr HasRefUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ref_; + } has_ref_; + union HasCapacityUnion { + constexpr HasCapacityUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t capacity_; + } has_capacity_; + union HasNetworkUnion { + constexpr HasNetworkUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr network_; + } has_network_; + union HasOperatorUnion { + constexpr HasOperatorUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator__; + } has_operator__; + union HasRentCostUnion { + constexpr HasRentCostUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float rent_cost_; + } has_rent_cost_; + union HasReturnCostUnion { + constexpr HasReturnCostUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + float return_cost_; + } has_return_cost_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[7]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -2810,12 +3600,52 @@ class TransitPlatformInfo final : static const TransitPlatformInfo& default_instance() { return *internal_default_instance(); } + enum HasTypeCase { + kType = 1, + HAS_TYPE_NOT_SET = 0, + }; + + enum HasOnestopIdCase { + kOnestopId = 2, + HAS_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasNameCase { + kName = 3, + HAS_NAME_NOT_SET = 0, + }; + + enum HasArrivalDateTimeCase { + kArrivalDateTime = 4, + HAS_ARRIVAL_DATE_TIME_NOT_SET = 0, + }; + + enum HasDepartureDateTimeCase { + kDepartureDateTime = 5, + HAS_DEPARTURE_DATE_TIME_NOT_SET = 0, + }; + + enum HasAssumedScheduleCase { + kAssumedSchedule = 6, + HAS_ASSUMED_SCHEDULE_NOT_SET = 0, + }; + + enum HasStationOnestopIdCase { + kStationOnestopId = 8, + HAS_STATION_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasStationNameCase { + kStationName = 9, + HAS_STATION_NAME_NOT_SET = 0, + }; + static inline const TransitPlatformInfo* internal_default_instance() { return reinterpret_cast( &_TransitPlatformInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 8; friend void swap(TransitPlatformInfo& a, TransitPlatformInfo& b) { a.Swap(&b); @@ -2905,17 +3735,52 @@ class TransitPlatformInfo final : // accessors ------------------------------------------------------- enum : int { + kLlFieldNumber = 7, + kTypeFieldNumber = 1, kOnestopIdFieldNumber = 2, kNameFieldNumber = 3, kArrivalDateTimeFieldNumber = 4, kDepartureDateTimeFieldNumber = 5, + kAssumedScheduleFieldNumber = 6, kStationOnestopIdFieldNumber = 8, kStationNameFieldNumber = 9, - kLlFieldNumber = 7, - kTypeFieldNumber = 1, - kAssumedScheduleFieldNumber = 6, }; + // .valhalla.LatLng ll = 7; + bool has_ll() const; + private: + bool _internal_has_ll() const; + public: + void clear_ll(); + const ::valhalla::LatLng& ll() const; + PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); + ::valhalla::LatLng* mutable_ll(); + void set_allocated_ll(::valhalla::LatLng* ll); + private: + const ::valhalla::LatLng& _internal_ll() const; + ::valhalla::LatLng* _internal_mutable_ll(); + public: + void unsafe_arena_set_allocated_ll( + ::valhalla::LatLng* ll); + ::valhalla::LatLng* unsafe_arena_release_ll(); + + // .valhalla.TransitPlatformInfo.Type type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::valhalla::TransitPlatformInfo_Type type() const; + void set_type(::valhalla::TransitPlatformInfo_Type value); + private: + ::valhalla::TransitPlatformInfo_Type _internal_type() const; + void _internal_set_type(::valhalla::TransitPlatformInfo_Type value); + public: + // string onestop_id = 2; + bool has_onestop_id() const; + private: + bool _internal_has_onestop_id() const; + public: void clear_onestop_id(); const std::string& onestop_id() const; template @@ -2930,6 +3795,10 @@ class TransitPlatformInfo final : public: // string name = 3; + bool has_name() const; + private: + bool _internal_has_name() const; + public: void clear_name(); const std::string& name() const; template @@ -2944,6 +3813,10 @@ class TransitPlatformInfo final : public: // string arrival_date_time = 4; + bool has_arrival_date_time() const; + private: + bool _internal_has_arrival_date_time() const; + public: void clear_arrival_date_time(); const std::string& arrival_date_time() const; template @@ -2958,6 +3831,10 @@ class TransitPlatformInfo final : public: // string departure_date_time = 5; + bool has_departure_date_time() const; + private: + bool _internal_has_departure_date_time() const; + public: void clear_departure_date_time(); const std::string& departure_date_time() const; template @@ -2971,7 +3848,24 @@ class TransitPlatformInfo final : std::string* _internal_mutable_departure_date_time(); public: + // bool assumed_schedule = 6; + bool has_assumed_schedule() const; + private: + bool _internal_has_assumed_schedule() const; + public: + void clear_assumed_schedule(); + bool assumed_schedule() const; + void set_assumed_schedule(bool value); + private: + bool _internal_assumed_schedule() const; + void _internal_set_assumed_schedule(bool value); + public: + // string station_onestop_id = 8; + bool has_station_onestop_id() const; + private: + bool _internal_has_station_onestop_id() const; + public: void clear_station_onestop_id(); const std::string& station_onestop_id() const; template @@ -2986,6 +3880,10 @@ class TransitPlatformInfo final : public: // string station_name = 9; + bool has_station_name() const; + private: + bool _internal_has_station_name() const; + public: void clear_station_name(); const std::string& station_name() const; template @@ -2999,63 +3897,109 @@ class TransitPlatformInfo final : std::string* _internal_mutable_station_name(); public: - // .valhalla.LatLng ll = 7; - bool has_ll() const; - private: - bool _internal_has_ll() const; - public: - void clear_ll(); - const ::valhalla::LatLng& ll() const; - PROTOBUF_NODISCARD ::valhalla::LatLng* release_ll(); - ::valhalla::LatLng* mutable_ll(); - void set_allocated_ll(::valhalla::LatLng* ll); - private: - const ::valhalla::LatLng& _internal_ll() const; - ::valhalla::LatLng* _internal_mutable_ll(); - public: - void unsafe_arena_set_allocated_ll( - ::valhalla::LatLng* ll); - ::valhalla::LatLng* unsafe_arena_release_ll(); - - // .valhalla.TransitPlatformInfo.Type type = 1; - void clear_type(); - ::valhalla::TransitPlatformInfo_Type type() const; - void set_type(::valhalla::TransitPlatformInfo_Type value); - private: - ::valhalla::TransitPlatformInfo_Type _internal_type() const; - void _internal_set_type(::valhalla::TransitPlatformInfo_Type value); - public: - - // bool assumed_schedule = 6; - void clear_assumed_schedule(); - bool assumed_schedule() const; - void set_assumed_schedule(bool value); - private: - bool _internal_assumed_schedule() const; - void _internal_set_assumed_schedule(bool value); - public: - + void clear_has_type(); + HasTypeCase has_type_case() const; + void clear_has_onestop_id(); + HasOnestopIdCase has_onestop_id_case() const; + void clear_has_name(); + HasNameCase has_name_case() const; + void clear_has_arrival_date_time(); + HasArrivalDateTimeCase has_arrival_date_time_case() const; + void clear_has_departure_date_time(); + HasDepartureDateTimeCase has_departure_date_time_case() const; + void clear_has_assumed_schedule(); + HasAssumedScheduleCase has_assumed_schedule_case() const; + void clear_has_station_onestop_id(); + HasStationOnestopIdCase has_station_onestop_id_case() const; + void clear_has_station_name(); + HasStationNameCase has_station_name_case() const; // @@protoc_insertion_point(class_scope:valhalla.TransitPlatformInfo) private: class _Internal; + void set_has_type(); + void set_has_onestop_id(); + void set_has_name(); + void set_has_arrival_date_time(); + void set_has_departure_date_time(); + void set_has_assumed_schedule(); + void set_has_station_onestop_id(); + void set_has_station_name(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); + + inline bool has_has_onestop_id() const; + inline void clear_has_has_onestop_id(); + + inline bool has_has_name() const; + inline void clear_has_has_name(); + + inline bool has_has_arrival_date_time() const; + inline void clear_has_has_arrival_date_time(); + + inline bool has_has_departure_date_time() const; + inline void clear_has_has_departure_date_time(); + + inline bool has_has_assumed_schedule() const; + inline void clear_has_has_assumed_schedule(); + + inline bool has_has_station_onestop_id() const; + inline void clear_has_has_station_onestop_id(); + + inline bool has_has_station_name() const; + inline void clear_has_has_station_name(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr arrival_date_time_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr departure_date_time_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr station_onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr station_name_; ::valhalla::LatLng* ll_; - int type_; - bool assumed_schedule_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; + union HasOnestopIdUnion { + constexpr HasOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; + } has_onestop_id_; + union HasNameUnion { + constexpr HasNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + } has_name_; + union HasArrivalDateTimeUnion { + constexpr HasArrivalDateTimeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr arrival_date_time_; + } has_arrival_date_time_; + union HasDepartureDateTimeUnion { + constexpr HasDepartureDateTimeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr departure_date_time_; + } has_departure_date_time_; + union HasAssumedScheduleUnion { + constexpr HasAssumedScheduleUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool assumed_schedule_; + } has_assumed_schedule_; + union HasStationOnestopIdUnion { + constexpr HasStationOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr station_onestop_id_; + } has_station_onestop_id_; + union HasStationNameUnion { + constexpr HasStationNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr station_name_; + } has_station_name_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[8]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -3093,12 +4037,72 @@ class TransitRouteInfo final : static const TransitRouteInfo& default_instance() { return *internal_default_instance(); } + enum HasOnestopIdCase { + kOnestopId = 1, + HAS_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasBlockIdCase { + kBlockId = 2, + HAS_BLOCK_ID_NOT_SET = 0, + }; + + enum HasTripIdCase { + kTripId = 3, + HAS_TRIP_ID_NOT_SET = 0, + }; + + enum HasShortNameCase { + kShortName = 4, + HAS_SHORT_NAME_NOT_SET = 0, + }; + + enum HasLongNameCase { + kLongName = 5, + HAS_LONG_NAME_NOT_SET = 0, + }; + + enum HasHeadsignCase { + kHeadsign = 6, + HAS_HEADSIGN_NOT_SET = 0, + }; + + enum HasColorCase { + kColor = 7, + HAS_COLOR_NOT_SET = 0, + }; + + enum HasTextColorCase { + kTextColor = 8, + HAS_TEXT_COLOR_NOT_SET = 0, + }; + + enum HasDescriptionCase { + kDescription = 9, + HAS_DESCRIPTION_NOT_SET = 0, + }; + + enum HasOperatorOnestopIdCase { + kOperatorOnestopId = 10, + HAS_OPERATOR_ONESTOP_ID_NOT_SET = 0, + }; + + enum HasOperatorNameCase { + kOperatorName = 11, + HAS_OPERATOR_NAME_NOT_SET = 0, + }; + + enum HasOperatorUrlCase { + kOperatorUrl = 12, + HAS_OPERATOR_URL_NOT_SET = 0, + }; + static inline const TransitRouteInfo* internal_default_instance() { return reinterpret_cast( &_TransitRouteInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 9; friend void swap(TransitRouteInfo& a, TransitRouteInfo& b) { a.Swap(&b); @@ -3164,17 +4168,17 @@ class TransitRouteInfo final : enum : int { kTransitStopsFieldNumber = 13, kOnestopIdFieldNumber = 1, + kBlockIdFieldNumber = 2, + kTripIdFieldNumber = 3, kShortNameFieldNumber = 4, kLongNameFieldNumber = 5, kHeadsignFieldNumber = 6, + kColorFieldNumber = 7, + kTextColorFieldNumber = 8, kDescriptionFieldNumber = 9, kOperatorOnestopIdFieldNumber = 10, kOperatorNameFieldNumber = 11, kOperatorUrlFieldNumber = 12, - kBlockIdFieldNumber = 2, - kTripIdFieldNumber = 3, - kColorFieldNumber = 7, - kTextColorFieldNumber = 8, }; // repeated .valhalla.TransitPlatformInfo transit_stops = 13; int transit_stops_size() const; @@ -3195,6 +4199,10 @@ class TransitRouteInfo final : transit_stops() const; // string onestop_id = 1; + bool has_onestop_id() const; + private: + bool _internal_has_onestop_id() const; + public: void clear_onestop_id(); const std::string& onestop_id() const; template @@ -3208,7 +4216,37 @@ class TransitRouteInfo final : std::string* _internal_mutable_onestop_id(); public: + // uint32 block_id = 2; + bool has_block_id() const; + private: + bool _internal_has_block_id() const; + public: + void clear_block_id(); + uint32_t block_id() const; + void set_block_id(uint32_t value); + private: + uint32_t _internal_block_id() const; + void _internal_set_block_id(uint32_t value); + public: + + // uint32 trip_id = 3; + bool has_trip_id() const; + private: + bool _internal_has_trip_id() const; + public: + void clear_trip_id(); + uint32_t trip_id() const; + void set_trip_id(uint32_t value); + private: + uint32_t _internal_trip_id() const; + void _internal_set_trip_id(uint32_t value); + public: + // string short_name = 4; + bool has_short_name() const; + private: + bool _internal_has_short_name() const; + public: void clear_short_name(); const std::string& short_name() const; template @@ -3223,6 +4261,10 @@ class TransitRouteInfo final : public: // string long_name = 5; + bool has_long_name() const; + private: + bool _internal_has_long_name() const; + public: void clear_long_name(); const std::string& long_name() const; template @@ -3237,6 +4279,10 @@ class TransitRouteInfo final : public: // string headsign = 6; + bool has_headsign() const; + private: + bool _internal_has_headsign() const; + public: void clear_headsign(); const std::string& headsign() const; template @@ -3250,7 +4296,37 @@ class TransitRouteInfo final : std::string* _internal_mutable_headsign(); public: + // uint32 color = 7; + bool has_color() const; + private: + bool _internal_has_color() const; + public: + void clear_color(); + uint32_t color() const; + void set_color(uint32_t value); + private: + uint32_t _internal_color() const; + void _internal_set_color(uint32_t value); + public: + + // uint32 text_color = 8; + bool has_text_color() const; + private: + bool _internal_has_text_color() const; + public: + void clear_text_color(); + uint32_t text_color() const; + void set_text_color(uint32_t value); + private: + uint32_t _internal_text_color() const; + void _internal_set_text_color(uint32_t value); + public: + // string description = 9; + bool has_description() const; + private: + bool _internal_has_description() const; + public: void clear_description(); const std::string& description() const; template @@ -3265,6 +4341,10 @@ class TransitRouteInfo final : public: // string operator_onestop_id = 10; + bool has_operator_onestop_id() const; + private: + bool _internal_has_operator_onestop_id() const; + public: void clear_operator_onestop_id(); const std::string& operator_onestop_id() const; template @@ -3279,6 +4359,10 @@ class TransitRouteInfo final : public: // string operator_name = 11; + bool has_operator_name() const; + private: + bool _internal_has_operator_name() const; + public: void clear_operator_name(); const std::string& operator_name() const; template @@ -3293,6 +4377,10 @@ class TransitRouteInfo final : public: // string operator_url = 12; + bool has_operator_url() const; + private: + bool _internal_has_operator_url() const; + public: void clear_operator_url(); const std::string& operator_url() const; template @@ -3306,67 +4394,153 @@ class TransitRouteInfo final : std::string* _internal_mutable_operator_url(); public: - // uint32 block_id = 2; - void clear_block_id(); - uint32_t block_id() const; - void set_block_id(uint32_t value); - private: - uint32_t _internal_block_id() const; - void _internal_set_block_id(uint32_t value); - public: + void clear_has_onestop_id(); + HasOnestopIdCase has_onestop_id_case() const; + void clear_has_block_id(); + HasBlockIdCase has_block_id_case() const; + void clear_has_trip_id(); + HasTripIdCase has_trip_id_case() const; + void clear_has_short_name(); + HasShortNameCase has_short_name_case() const; + void clear_has_long_name(); + HasLongNameCase has_long_name_case() const; + void clear_has_headsign(); + HasHeadsignCase has_headsign_case() const; + void clear_has_color(); + HasColorCase has_color_case() const; + void clear_has_text_color(); + HasTextColorCase has_text_color_case() const; + void clear_has_description(); + HasDescriptionCase has_description_case() const; + void clear_has_operator_onestop_id(); + HasOperatorOnestopIdCase has_operator_onestop_id_case() const; + void clear_has_operator_name(); + HasOperatorNameCase has_operator_name_case() const; + void clear_has_operator_url(); + HasOperatorUrlCase has_operator_url_case() const; + // @@protoc_insertion_point(class_scope:valhalla.TransitRouteInfo) + private: + class _Internal; + void set_has_onestop_id(); + void set_has_block_id(); + void set_has_trip_id(); + void set_has_short_name(); + void set_has_long_name(); + void set_has_headsign(); + void set_has_color(); + void set_has_text_color(); + void set_has_description(); + void set_has_operator_onestop_id(); + void set_has_operator_name(); + void set_has_operator_url(); - // uint32 trip_id = 3; - void clear_trip_id(); - uint32_t trip_id() const; - void set_trip_id(uint32_t value); - private: - uint32_t _internal_trip_id() const; - void _internal_set_trip_id(uint32_t value); - public: + inline bool has_has_onestop_id() const; + inline void clear_has_has_onestop_id(); - // uint32 color = 7; - void clear_color(); - uint32_t color() const; - void set_color(uint32_t value); - private: - uint32_t _internal_color() const; - void _internal_set_color(uint32_t value); - public: + inline bool has_has_block_id() const; + inline void clear_has_has_block_id(); - // uint32 text_color = 8; - void clear_text_color(); - uint32_t text_color() const; - void set_text_color(uint32_t value); - private: - uint32_t _internal_text_color() const; - void _internal_set_text_color(uint32_t value); - public: + inline bool has_has_trip_id() const; + inline void clear_has_has_trip_id(); - // @@protoc_insertion_point(class_scope:valhalla.TransitRouteInfo) - private: - class _Internal; + inline bool has_has_short_name() const; + inline void clear_has_has_short_name(); + + inline bool has_has_long_name() const; + inline void clear_has_has_long_name(); + + inline bool has_has_headsign() const; + inline void clear_has_has_headsign(); + + inline bool has_has_color() const; + inline void clear_has_has_color(); + + inline bool has_has_text_color() const; + inline void clear_has_has_text_color(); + + inline bool has_has_description() const; + inline void clear_has_has_description(); + + inline bool has_has_operator_onestop_id() const; + inline void clear_has_has_operator_onestop_id(); + + inline bool has_has_operator_name() const; + inline void clear_has_has_operator_name(); + + inline bool has_has_operator_url() const; + inline void clear_has_has_operator_url(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::TransitPlatformInfo > transit_stops_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr short_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr long_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr headsign_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_onestop_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_url_; - uint32_t block_id_; - uint32_t trip_id_; - uint32_t color_; - uint32_t text_color_; + union HasOnestopIdUnion { + constexpr HasOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr onestop_id_; + } has_onestop_id_; + union HasBlockIdUnion { + constexpr HasBlockIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t block_id_; + } has_block_id_; + union HasTripIdUnion { + constexpr HasTripIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t trip_id_; + } has_trip_id_; + union HasShortNameUnion { + constexpr HasShortNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr short_name_; + } has_short_name_; + union HasLongNameUnion { + constexpr HasLongNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr long_name_; + } has_long_name_; + union HasHeadsignUnion { + constexpr HasHeadsignUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr headsign_; + } has_headsign_; + union HasColorUnion { + constexpr HasColorUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t color_; + } has_color_; + union HasTextColorUnion { + constexpr HasTextColorUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t text_color_; + } has_text_color_; + union HasDescriptionUnion { + constexpr HasDescriptionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + } has_description_; + union HasOperatorOnestopIdUnion { + constexpr HasOperatorOnestopIdUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_onestop_id_; + } has_operator_onestop_id_; + union HasOperatorNameUnion { + constexpr HasOperatorNameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_name_; + } has_operator_name_; + union HasOperatorUrlUnion { + constexpr HasOperatorUrlUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr operator_url_; + } has_operator_url_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[12]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -3404,12 +4578,22 @@ class Pronunciation final : static const Pronunciation& default_instance() { return *internal_default_instance(); } + enum HasAlphabetCase { + kAlphabet = 1, + HAS_ALPHABET_NOT_SET = 0, + }; + + enum HasValueCase { + kValue = 2, + HAS_VALUE_NOT_SET = 0, + }; + static inline const Pronunciation* internal_default_instance() { return reinterpret_cast( &_Pronunciation_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 10; friend void swap(Pronunciation& a, Pronunciation& b) { a.Swap(&b); @@ -3503,10 +4687,27 @@ class Pronunciation final : // accessors ------------------------------------------------------- enum : int { - kValueFieldNumber = 2, kAlphabetFieldNumber = 1, + kValueFieldNumber = 2, }; + // .valhalla.Pronunciation.Alphabet alphabet = 1; + bool has_alphabet() const; + private: + bool _internal_has_alphabet() const; + public: + void clear_alphabet(); + ::valhalla::Pronunciation_Alphabet alphabet() const; + void set_alphabet(::valhalla::Pronunciation_Alphabet value); + private: + ::valhalla::Pronunciation_Alphabet _internal_alphabet() const; + void _internal_set_alphabet(::valhalla::Pronunciation_Alphabet value); + public: + // string value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: void clear_value(); const std::string& value() const; template @@ -3520,29 +4721,42 @@ class Pronunciation final : std::string* _internal_mutable_value(); public: - // .valhalla.Pronunciation.Alphabet alphabet = 1; - void clear_alphabet(); - ::valhalla::Pronunciation_Alphabet alphabet() const; - void set_alphabet(::valhalla::Pronunciation_Alphabet value); - private: - ::valhalla::Pronunciation_Alphabet _internal_alphabet() const; - void _internal_set_alphabet(::valhalla::Pronunciation_Alphabet value); - public: - + void clear_has_alphabet(); + HasAlphabetCase has_alphabet_case() const; + void clear_has_value(); + HasValueCase has_value_case() const; // @@protoc_insertion_point(class_scope:valhalla.Pronunciation) private: class _Internal; + void set_has_alphabet(); + void set_has_value(); + + inline bool has_has_alphabet() const; + inline void clear_has_has_alphabet(); + + inline bool has_has_value() const; + inline void clear_has_has_value(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - int alphabet_; + union HasAlphabetUnion { + constexpr HasAlphabetUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int alphabet_; + } has_alphabet_; + union HasValueUnion { + constexpr HasValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + } has_value_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -3580,12 +4794,22 @@ class StreetName final : static const StreetName& default_instance() { return *internal_default_instance(); } + enum HasValueCase { + kValue = 1, + HAS_VALUE_NOT_SET = 0, + }; + + enum HasIsRouteNumberCase { + kIsRouteNumber = 2, + HAS_IS_ROUTE_NUMBER_NOT_SET = 0, + }; + static inline const StreetName* internal_default_instance() { return reinterpret_cast( &_StreetName_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 11; friend void swap(StreetName& a, StreetName& b) { a.Swap(&b); @@ -3649,24 +4873,10 @@ class StreetName final : // accessors ------------------------------------------------------- enum : int { - kValueFieldNumber = 1, kPronunciationFieldNumber = 3, + kValueFieldNumber = 1, kIsRouteNumberFieldNumber = 2, }; - // string value = 1; - void clear_value(); - const std::string& value() const; - template - void set_value(ArgT0&& arg0, ArgT... args); - std::string* mutable_value(); - PROTOBUF_NODISCARD std::string* release_value(); - void set_allocated_value(std::string* value); - private: - const std::string& _internal_value() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); - std::string* _internal_mutable_value(); - public: - // .valhalla.Pronunciation pronunciation = 3; bool has_pronunciation() const; private: @@ -3685,7 +4895,29 @@ class StreetName final : ::valhalla::Pronunciation* pronunciation); ::valhalla::Pronunciation* unsafe_arena_release_pronunciation(); + // string value = 1; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const std::string& value() const; + template + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + // bool is_route_number = 2; + bool has_is_route_number() const; + private: + bool _internal_has_is_route_number() const; + public: void clear_is_route_number(); bool is_route_number() const; void set_is_route_number(bool value); @@ -3694,21 +4926,43 @@ class StreetName final : void _internal_set_is_route_number(bool value); public: + void clear_has_value(); + HasValueCase has_value_case() const; + void clear_has_is_route_number(); + HasIsRouteNumberCase has_is_route_number_case() const; // @@protoc_insertion_point(class_scope:valhalla.StreetName) private: class _Internal; + void set_has_value(); + void set_has_is_route_number(); + + inline bool has_has_value() const; + inline void clear_has_has_value(); + + inline bool has_has_is_route_number() const; + inline void clear_has_has_is_route_number(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; ::valhalla::Pronunciation* pronunciation_; - bool is_route_number_; + union HasValueUnion { + constexpr HasValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + } has_value_; + union HasIsRouteNumberUnion { + constexpr HasIsRouteNumberUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + bool is_route_number_; + } has_is_route_number_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -3746,12 +5000,27 @@ class TurnLane final : static const TurnLane& default_instance() { return *internal_default_instance(); } + enum HasDirectionsMaskCase { + kDirectionsMask = 1, + HAS_DIRECTIONS_MASK_NOT_SET = 0, + }; + + enum HasStateCase { + kState = 2, + HAS_STATE_NOT_SET = 0, + }; + + enum HasActiveDirectionCase { + kActiveDirection = 3, + HAS_ACTIVE_DIRECTION_NOT_SET = 0, + }; + static inline const TurnLane* internal_default_instance() { return reinterpret_cast( &_TurnLane_default_instance_); } static constexpr int kIndexInFileMessages = - 13; + 12; friend void swap(TurnLane& a, TurnLane& b) { a.Swap(&b); @@ -3848,6 +5117,10 @@ class TurnLane final : kActiveDirectionFieldNumber = 3, }; // uint32 directions_mask = 1; + bool has_directions_mask() const; + private: + bool _internal_has_directions_mask() const; + public: void clear_directions_mask(); uint32_t directions_mask() const; void set_directions_mask(uint32_t value); @@ -3857,6 +5130,10 @@ class TurnLane final : public: // .valhalla.TurnLane.State state = 2; + bool has_state() const; + private: + bool _internal_has_state() const; + public: void clear_state(); ::valhalla::TurnLane_State state() const; void set_state(::valhalla::TurnLane_State value); @@ -3866,6 +5143,10 @@ class TurnLane final : public: // uint32 active_direction = 3; + bool has_active_direction() const; + private: + bool _internal_has_active_direction() const; + public: void clear_active_direction(); uint32_t active_direction() const; void set_active_direction(uint32_t value); @@ -3874,21 +5155,53 @@ class TurnLane final : void _internal_set_active_direction(uint32_t value); public: + void clear_has_directions_mask(); + HasDirectionsMaskCase has_directions_mask_case() const; + void clear_has_state(); + HasStateCase has_state_case() const; + void clear_has_active_direction(); + HasActiveDirectionCase has_active_direction_case() const; // @@protoc_insertion_point(class_scope:valhalla.TurnLane) private: class _Internal; + void set_has_directions_mask(); + void set_has_state(); + void set_has_active_direction(); + + inline bool has_has_directions_mask() const; + inline void clear_has_has_directions_mask(); + + inline bool has_has_state() const; + inline void clear_has_has_state(); + + inline bool has_has_active_direction() const; + inline void clear_has_has_active_direction(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - uint32_t directions_mask_; - int state_; - uint32_t active_direction_; + union HasDirectionsMaskUnion { + constexpr HasDirectionsMaskUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t directions_mask_; + } has_directions_mask_; + union HasStateUnion { + constexpr HasStateUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int state_; + } has_state_; + union HasActiveDirectionUnion { + constexpr HasActiveDirectionUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + uint32_t active_direction_; + } has_active_direction_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[3]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // ------------------------------------------------------------------- @@ -3926,12 +5239,22 @@ class TaggedValue final : static const TaggedValue& default_instance() { return *internal_default_instance(); } + enum HasValueCase { + kValue = 1, + HAS_VALUE_NOT_SET = 0, + }; + + enum HasTypeCase { + kType = 2, + HAS_TYPE_NOT_SET = 0, + }; + static inline const TaggedValue* internal_default_instance() { return reinterpret_cast( &_TaggedValue_default_instance_); } static constexpr int kIndexInFileMessages = - 14; + 13; friend void swap(TaggedValue& a, TaggedValue& b) { a.Swap(&b); @@ -4001,10 +5324,6 @@ class TaggedValue final : TaggedValue_Type_kPronunciation; static constexpr Type kBssInfo = TaggedValue_Type_kBssInfo; - static constexpr Type kLevel = - TaggedValue_Type_kLevel; - static constexpr Type kLevelRef = - TaggedValue_Type_kLevelRef; static constexpr Type kTunnel = TaggedValue_Type_kTunnel; static constexpr Type kBridge = @@ -4037,6 +5356,10 @@ class TaggedValue final : kTypeFieldNumber = 2, }; // bytes value = 1; + bool has_value() const; + private: + bool _internal_has_value() const; + public: void clear_value(); const std::string& value() const; template @@ -4051,6 +5374,10 @@ class TaggedValue final : public: // .valhalla.TaggedValue.Type type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: void clear_type(); ::valhalla::TaggedValue_Type type() const; void set_type(::valhalla::TaggedValue_Type value); @@ -4059,20 +5386,42 @@ class TaggedValue final : void _internal_set_type(::valhalla::TaggedValue_Type value); public: + void clear_has_value(); + HasValueCase has_value_case() const; + void clear_has_type(); + HasTypeCase has_type_case() const; // @@protoc_insertion_point(class_scope:valhalla.TaggedValue) private: class _Internal; + void set_has_value(); + void set_has_type(); + + inline bool has_has_value() const; + inline void clear_has_has_value(); + + inline bool has_has_type() const; + inline void clear_has_has_type(); template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; - int type_; + union HasValueUnion { + constexpr HasValueUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + } has_value_; + union HasTypeUnion { + constexpr HasTypeUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int type_; + } has_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[2]; + }; union { Impl_ _impl_; }; - friend struct ::TableStruct_common_2eproto; + friend struct ::TableStruct_tripcommon_2eproto; }; // =================================================================== @@ -4365,276 +5714,107 @@ inline void BoundingBox::set_allocated_max_ll(::valhalla::LatLng* max_ll) { // ------------------------------------------------------------------- -// SearchFilter +// Location_PathEdge -// .valhalla.RoadClass min_road_class = 1; -inline bool SearchFilter::_internal_has_min_road_class() const { - return has_min_road_class_case() == kMinRoadClass; -} -inline bool SearchFilter::has_min_road_class() const { - return _internal_has_min_road_class(); -} -inline void SearchFilter::set_has_min_road_class() { - _impl_._oneof_case_[0] = kMinRoadClass; -} -inline void SearchFilter::clear_min_road_class() { - if (_internal_has_min_road_class()) { - _impl_.has_min_road_class_.min_road_class_ = 0; - clear_has_has_min_road_class(); - } -} -inline ::valhalla::RoadClass SearchFilter::_internal_min_road_class() const { - if (_internal_has_min_road_class()) { - return static_cast< ::valhalla::RoadClass >(_impl_.has_min_road_class_.min_road_class_); - } - return static_cast< ::valhalla::RoadClass >(0); -} -inline ::valhalla::RoadClass SearchFilter::min_road_class() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.min_road_class) - return _internal_min_road_class(); -} -inline void SearchFilter::_internal_set_min_road_class(::valhalla::RoadClass value) { - if (!_internal_has_min_road_class()) { - clear_has_min_road_class(); - set_has_min_road_class(); - } - _impl_.has_min_road_class_.min_road_class_ = value; -} -inline void SearchFilter::set_min_road_class(::valhalla::RoadClass value) { - _internal_set_min_road_class(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.min_road_class) -} - -// .valhalla.RoadClass max_road_class = 2; -inline bool SearchFilter::_internal_has_max_road_class() const { - return has_max_road_class_case() == kMaxRoadClass; -} -inline bool SearchFilter::has_max_road_class() const { - return _internal_has_max_road_class(); -} -inline void SearchFilter::set_has_max_road_class() { - _impl_._oneof_case_[1] = kMaxRoadClass; -} -inline void SearchFilter::clear_max_road_class() { - if (_internal_has_max_road_class()) { - _impl_.has_max_road_class_.max_road_class_ = 0; - clear_has_has_max_road_class(); - } -} -inline ::valhalla::RoadClass SearchFilter::_internal_max_road_class() const { - if (_internal_has_max_road_class()) { - return static_cast< ::valhalla::RoadClass >(_impl_.has_max_road_class_.max_road_class_); - } - return static_cast< ::valhalla::RoadClass >(0); -} -inline ::valhalla::RoadClass SearchFilter::max_road_class() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.max_road_class) - return _internal_max_road_class(); -} -inline void SearchFilter::_internal_set_max_road_class(::valhalla::RoadClass value) { - if (!_internal_has_max_road_class()) { - clear_has_max_road_class(); - set_has_max_road_class(); - } - _impl_.has_max_road_class_.max_road_class_ = value; -} -inline void SearchFilter::set_max_road_class(::valhalla::RoadClass value) { - _internal_set_max_road_class(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.max_road_class) -} - -// bool exclude_tunnel = 3; -inline void SearchFilter::clear_exclude_tunnel() { - _impl_.exclude_tunnel_ = false; -} -inline bool SearchFilter::_internal_exclude_tunnel() const { - return _impl_.exclude_tunnel_; -} -inline bool SearchFilter::exclude_tunnel() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.exclude_tunnel) - return _internal_exclude_tunnel(); -} -inline void SearchFilter::_internal_set_exclude_tunnel(bool value) { - - _impl_.exclude_tunnel_ = value; -} -inline void SearchFilter::set_exclude_tunnel(bool value) { - _internal_set_exclude_tunnel(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.exclude_tunnel) -} - -// bool exclude_bridge = 4; -inline void SearchFilter::clear_exclude_bridge() { - _impl_.exclude_bridge_ = false; -} -inline bool SearchFilter::_internal_exclude_bridge() const { - return _impl_.exclude_bridge_; -} -inline bool SearchFilter::exclude_bridge() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.exclude_bridge) - return _internal_exclude_bridge(); -} -inline void SearchFilter::_internal_set_exclude_bridge(bool value) { - - _impl_.exclude_bridge_ = value; -} -inline void SearchFilter::set_exclude_bridge(bool value) { - _internal_set_exclude_bridge(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.exclude_bridge) -} - -// bool exclude_ramp = 5; -inline void SearchFilter::clear_exclude_ramp() { - _impl_.exclude_ramp_ = false; -} -inline bool SearchFilter::_internal_exclude_ramp() const { - return _impl_.exclude_ramp_; -} -inline bool SearchFilter::exclude_ramp() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.exclude_ramp) - return _internal_exclude_ramp(); -} -inline void SearchFilter::_internal_set_exclude_ramp(bool value) { - - _impl_.exclude_ramp_ = value; -} -inline void SearchFilter::set_exclude_ramp(bool value) { - _internal_set_exclude_ramp(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.exclude_ramp) -} - -// bool exclude_closures = 6; -inline bool SearchFilter::_internal_has_exclude_closures() const { - return has_exclude_closures_case() == kExcludeClosures; -} -inline bool SearchFilter::has_exclude_closures() const { - return _internal_has_exclude_closures(); -} -inline void SearchFilter::set_has_exclude_closures() { - _impl_._oneof_case_[2] = kExcludeClosures; +// uint64 graph_id = 1; +inline bool Location_PathEdge::_internal_has_graph_id() const { + return has_graph_id_case() == kGraphId; } -inline void SearchFilter::clear_exclude_closures() { - if (_internal_has_exclude_closures()) { - _impl_.has_exclude_closures_.exclude_closures_ = false; - clear_has_has_exclude_closures(); - } +inline bool Location_PathEdge::has_graph_id() const { + return _internal_has_graph_id(); } -inline bool SearchFilter::_internal_exclude_closures() const { - if (_internal_has_exclude_closures()) { - return _impl_.has_exclude_closures_.exclude_closures_; - } - return false; +inline void Location_PathEdge::set_has_graph_id() { + _impl_._oneof_case_[0] = kGraphId; } -inline void SearchFilter::_internal_set_exclude_closures(bool value) { - if (!_internal_has_exclude_closures()) { - clear_has_exclude_closures(); - set_has_exclude_closures(); +inline void Location_PathEdge::clear_graph_id() { + if (_internal_has_graph_id()) { + _impl_.has_graph_id_.graph_id_ = uint64_t{0u}; + clear_has_has_graph_id(); } - _impl_.has_exclude_closures_.exclude_closures_ = value; -} -inline bool SearchFilter::exclude_closures() const { - // @@protoc_insertion_point(field_get:valhalla.SearchFilter.exclude_closures) - return _internal_exclude_closures(); -} -inline void SearchFilter::set_exclude_closures(bool value) { - _internal_set_exclude_closures(value); - // @@protoc_insertion_point(field_set:valhalla.SearchFilter.exclude_closures) -} - -inline bool SearchFilter::has_has_min_road_class() const { - return has_min_road_class_case() != HAS_MIN_ROAD_CLASS_NOT_SET; -} -inline void SearchFilter::clear_has_has_min_road_class() { - _impl_._oneof_case_[0] = HAS_MIN_ROAD_CLASS_NOT_SET; -} -inline bool SearchFilter::has_has_max_road_class() const { - return has_max_road_class_case() != HAS_MAX_ROAD_CLASS_NOT_SET; -} -inline void SearchFilter::clear_has_has_max_road_class() { - _impl_._oneof_case_[1] = HAS_MAX_ROAD_CLASS_NOT_SET; -} -inline bool SearchFilter::has_has_exclude_closures() const { - return has_exclude_closures_case() != HAS_EXCLUDE_CLOSURES_NOT_SET; -} -inline void SearchFilter::clear_has_has_exclude_closures() { - _impl_._oneof_case_[2] = HAS_EXCLUDE_CLOSURES_NOT_SET; -} -inline SearchFilter::HasMinRoadClassCase SearchFilter::has_min_road_class_case() const { - return SearchFilter::HasMinRoadClassCase(_impl_._oneof_case_[0]); -} -inline SearchFilter::HasMaxRoadClassCase SearchFilter::has_max_road_class_case() const { - return SearchFilter::HasMaxRoadClassCase(_impl_._oneof_case_[1]); -} -inline SearchFilter::HasExcludeClosuresCase SearchFilter::has_exclude_closures_case() const { - return SearchFilter::HasExcludeClosuresCase(_impl_._oneof_case_[2]); -} -// ------------------------------------------------------------------- - -// PathEdge - -// uint64 graph_id = 1; -inline void PathEdge::clear_graph_id() { - _impl_.graph_id_ = uint64_t{0u}; } -inline uint64_t PathEdge::_internal_graph_id() const { - return _impl_.graph_id_; +inline uint64_t Location_PathEdge::_internal_graph_id() const { + if (_internal_has_graph_id()) { + return _impl_.has_graph_id_.graph_id_; + } + return uint64_t{0u}; } -inline uint64_t PathEdge::graph_id() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.graph_id) - return _internal_graph_id(); +inline void Location_PathEdge::_internal_set_graph_id(uint64_t value) { + if (!_internal_has_graph_id()) { + clear_has_graph_id(); + set_has_graph_id(); + } + _impl_.has_graph_id_.graph_id_ = value; } -inline void PathEdge::_internal_set_graph_id(uint64_t value) { - - _impl_.graph_id_ = value; +inline uint64_t Location_PathEdge::graph_id() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.graph_id) + return _internal_graph_id(); } -inline void PathEdge::set_graph_id(uint64_t value) { +inline void Location_PathEdge::set_graph_id(uint64_t value) { _internal_set_graph_id(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.graph_id) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.graph_id) } // double percent_along = 2; -inline void PathEdge::clear_percent_along() { - _impl_.percent_along_ = 0; +inline bool Location_PathEdge::_internal_has_percent_along() const { + return has_percent_along_case() == kPercentAlong; } -inline double PathEdge::_internal_percent_along() const { - return _impl_.percent_along_; +inline bool Location_PathEdge::has_percent_along() const { + return _internal_has_percent_along(); } -inline double PathEdge::percent_along() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.percent_along) - return _internal_percent_along(); +inline void Location_PathEdge::set_has_percent_along() { + _impl_._oneof_case_[1] = kPercentAlong; } -inline void PathEdge::_internal_set_percent_along(double value) { - - _impl_.percent_along_ = value; +inline void Location_PathEdge::clear_percent_along() { + if (_internal_has_percent_along()) { + _impl_.has_percent_along_.percent_along_ = 0; + clear_has_has_percent_along(); + } } -inline void PathEdge::set_percent_along(double value) { +inline double Location_PathEdge::_internal_percent_along() const { + if (_internal_has_percent_along()) { + return _impl_.has_percent_along_.percent_along_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_percent_along(double value) { + if (!_internal_has_percent_along()) { + clear_has_percent_along(); + set_has_percent_along(); + } + _impl_.has_percent_along_.percent_along_ = value; +} +inline double Location_PathEdge::percent_along() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.percent_along) + return _internal_percent_along(); +} +inline void Location_PathEdge::set_percent_along(double value) { _internal_set_percent_along(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.percent_along) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.percent_along) } // .valhalla.LatLng ll = 3; -inline bool PathEdge::_internal_has_ll() const { +inline bool Location_PathEdge::_internal_has_ll() const { return this != internal_default_instance() && _impl_.ll_ != nullptr; } -inline bool PathEdge::has_ll() const { +inline bool Location_PathEdge::has_ll() const { return _internal_has_ll(); } -inline void PathEdge::clear_ll() { +inline void Location_PathEdge::clear_ll() { if (GetArenaForAllocation() == nullptr && _impl_.ll_ != nullptr) { delete _impl_.ll_; } _impl_.ll_ = nullptr; } -inline const ::valhalla::LatLng& PathEdge::_internal_ll() const { +inline const ::valhalla::LatLng& Location_PathEdge::_internal_ll() const { const ::valhalla::LatLng* p = _impl_.ll_; return p != nullptr ? *p : reinterpret_cast( ::valhalla::_LatLng_default_instance_); } -inline const ::valhalla::LatLng& PathEdge::ll() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.ll) +inline const ::valhalla::LatLng& Location_PathEdge::ll() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.ll) return _internal_ll(); } -inline void PathEdge::unsafe_arena_set_allocated_ll( +inline void Location_PathEdge::unsafe_arena_set_allocated_ll( ::valhalla::LatLng* ll) { if (GetArenaForAllocation() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.ll_); @@ -4645,9 +5825,9 @@ inline void PathEdge::unsafe_arena_set_allocated_ll( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.PathEdge.ll) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Location.PathEdge.ll) } -inline ::valhalla::LatLng* PathEdge::release_ll() { +inline ::valhalla::LatLng* Location_PathEdge::release_ll() { ::valhalla::LatLng* temp = _impl_.ll_; _impl_.ll_ = nullptr; @@ -4662,14 +5842,14 @@ inline ::valhalla::LatLng* PathEdge::release_ll() { #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline ::valhalla::LatLng* PathEdge::unsafe_arena_release_ll() { - // @@protoc_insertion_point(field_release:valhalla.PathEdge.ll) +inline ::valhalla::LatLng* Location_PathEdge::unsafe_arena_release_ll() { + // @@protoc_insertion_point(field_release:valhalla.Location.PathEdge.ll) ::valhalla::LatLng* temp = _impl_.ll_; _impl_.ll_ = nullptr; return temp; } -inline ::valhalla::LatLng* PathEdge::_internal_mutable_ll() { +inline ::valhalla::LatLng* Location_PathEdge::_internal_mutable_ll() { if (_impl_.ll_ == nullptr) { auto* p = CreateMaybeMessage<::valhalla::LatLng>(GetArenaForAllocation()); @@ -4677,12 +5857,12 @@ inline ::valhalla::LatLng* PathEdge::_internal_mutable_ll() { } return _impl_.ll_; } -inline ::valhalla::LatLng* PathEdge::mutable_ll() { +inline ::valhalla::LatLng* Location_PathEdge::mutable_ll() { ::valhalla::LatLng* _msg = _internal_mutable_ll(); - // @@protoc_insertion_point(field_mutable:valhalla.PathEdge.ll) + // @@protoc_insertion_point(field_mutable:valhalla.Location.PathEdge.ll) return _msg; } -inline void PathEdge::set_allocated_ll(::valhalla::LatLng* ll) { +inline void Location_PathEdge::set_allocated_ll(::valhalla::LatLng* ll) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { delete _impl_.ll_; @@ -4699,498 +5879,764 @@ inline void PathEdge::set_allocated_ll(::valhalla::LatLng* ll) { } _impl_.ll_ = ll; - // @@protoc_insertion_point(field_set_allocated:valhalla.PathEdge.ll) + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.PathEdge.ll) } // .valhalla.Location.SideOfStreet side_of_street = 4; -inline void PathEdge::clear_side_of_street() { - _impl_.side_of_street_ = 0; +inline bool Location_PathEdge::_internal_has_side_of_street() const { + return has_side_of_street_case() == kSideOfStreet; +} +inline bool Location_PathEdge::has_side_of_street() const { + return _internal_has_side_of_street(); } -inline ::valhalla::Location_SideOfStreet PathEdge::_internal_side_of_street() const { - return static_cast< ::valhalla::Location_SideOfStreet >(_impl_.side_of_street_); +inline void Location_PathEdge::set_has_side_of_street() { + _impl_._oneof_case_[2] = kSideOfStreet; } -inline ::valhalla::Location_SideOfStreet PathEdge::side_of_street() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.side_of_street) +inline void Location_PathEdge::clear_side_of_street() { + if (_internal_has_side_of_street()) { + _impl_.has_side_of_street_.side_of_street_ = 0; + clear_has_has_side_of_street(); + } +} +inline ::valhalla::Location_SideOfStreet Location_PathEdge::_internal_side_of_street() const { + if (_internal_has_side_of_street()) { + return static_cast< ::valhalla::Location_SideOfStreet >(_impl_.has_side_of_street_.side_of_street_); + } + return static_cast< ::valhalla::Location_SideOfStreet >(0); +} +inline ::valhalla::Location_SideOfStreet Location_PathEdge::side_of_street() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.side_of_street) return _internal_side_of_street(); } -inline void PathEdge::_internal_set_side_of_street(::valhalla::Location_SideOfStreet value) { - - _impl_.side_of_street_ = value; +inline void Location_PathEdge::_internal_set_side_of_street(::valhalla::Location_SideOfStreet value) { + if (!_internal_has_side_of_street()) { + clear_has_side_of_street(); + set_has_side_of_street(); + } + _impl_.has_side_of_street_.side_of_street_ = value; } -inline void PathEdge::set_side_of_street(::valhalla::Location_SideOfStreet value) { +inline void Location_PathEdge::set_side_of_street(::valhalla::Location_SideOfStreet value) { _internal_set_side_of_street(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.side_of_street) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.side_of_street) } // double distance = 5; -inline void PathEdge::clear_distance() { - _impl_.distance_ = 0; +inline bool Location_PathEdge::_internal_has_distance() const { + return has_distance_case() == kDistance; } -inline double PathEdge::_internal_distance() const { - return _impl_.distance_; +inline bool Location_PathEdge::has_distance() const { + return _internal_has_distance(); } -inline double PathEdge::distance() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.distance) - return _internal_distance(); +inline void Location_PathEdge::set_has_distance() { + _impl_._oneof_case_[3] = kDistance; } -inline void PathEdge::_internal_set_distance(double value) { - - _impl_.distance_ = value; +inline void Location_PathEdge::clear_distance() { + if (_internal_has_distance()) { + _impl_.has_distance_.distance_ = 0; + clear_has_has_distance(); + } +} +inline double Location_PathEdge::_internal_distance() const { + if (_internal_has_distance()) { + return _impl_.has_distance_.distance_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_distance(double value) { + if (!_internal_has_distance()) { + clear_has_distance(); + set_has_distance(); + } + _impl_.has_distance_.distance_ = value; +} +inline double Location_PathEdge::distance() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.distance) + return _internal_distance(); } -inline void PathEdge::set_distance(double value) { +inline void Location_PathEdge::set_distance(double value) { _internal_set_distance(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.distance) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.distance) +} + +// int32 minimum_reachability = 6; +inline bool Location_PathEdge::_internal_has_minimum_reachability() const { + return has_minimum_reachability_case() == kMinimumReachability; +} +inline bool Location_PathEdge::has_minimum_reachability() const { + return _internal_has_minimum_reachability(); +} +inline void Location_PathEdge::set_has_minimum_reachability() { + _impl_._oneof_case_[4] = kMinimumReachability; +} +inline void Location_PathEdge::clear_minimum_reachability() { + if (_internal_has_minimum_reachability()) { + _impl_.has_minimum_reachability_.minimum_reachability_ = 0; + clear_has_has_minimum_reachability(); + } +} +inline int32_t Location_PathEdge::_internal_minimum_reachability() const { + if (_internal_has_minimum_reachability()) { + return _impl_.has_minimum_reachability_.minimum_reachability_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_minimum_reachability(int32_t value) { + if (!_internal_has_minimum_reachability()) { + clear_has_minimum_reachability(); + set_has_minimum_reachability(); + } + _impl_.has_minimum_reachability_.minimum_reachability_ = value; +} +inline int32_t Location_PathEdge::minimum_reachability() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.minimum_reachability) + return _internal_minimum_reachability(); +} +inline void Location_PathEdge::set_minimum_reachability(int32_t value) { + _internal_set_minimum_reachability(value); + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.minimum_reachability) } // bool begin_node = 7; -inline void PathEdge::clear_begin_node() { - _impl_.begin_node_ = false; +inline bool Location_PathEdge::_internal_has_begin_node() const { + return has_begin_node_case() == kBeginNode; } -inline bool PathEdge::_internal_begin_node() const { - return _impl_.begin_node_; +inline bool Location_PathEdge::has_begin_node() const { + return _internal_has_begin_node(); } -inline bool PathEdge::begin_node() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.begin_node) - return _internal_begin_node(); +inline void Location_PathEdge::set_has_begin_node() { + _impl_._oneof_case_[5] = kBeginNode; } -inline void PathEdge::_internal_set_begin_node(bool value) { - - _impl_.begin_node_ = value; +inline void Location_PathEdge::clear_begin_node() { + if (_internal_has_begin_node()) { + _impl_.has_begin_node_.begin_node_ = false; + clear_has_has_begin_node(); + } +} +inline bool Location_PathEdge::_internal_begin_node() const { + if (_internal_has_begin_node()) { + return _impl_.has_begin_node_.begin_node_; + } + return false; +} +inline void Location_PathEdge::_internal_set_begin_node(bool value) { + if (!_internal_has_begin_node()) { + clear_has_begin_node(); + set_has_begin_node(); + } + _impl_.has_begin_node_.begin_node_ = value; +} +inline bool Location_PathEdge::begin_node() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.begin_node) + return _internal_begin_node(); } -inline void PathEdge::set_begin_node(bool value) { +inline void Location_PathEdge::set_begin_node(bool value) { _internal_set_begin_node(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.begin_node) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.begin_node) } // bool end_node = 8; -inline void PathEdge::clear_end_node() { - _impl_.end_node_ = false; +inline bool Location_PathEdge::_internal_has_end_node() const { + return has_end_node_case() == kEndNode; } -inline bool PathEdge::_internal_end_node() const { - return _impl_.end_node_; +inline bool Location_PathEdge::has_end_node() const { + return _internal_has_end_node(); } -inline bool PathEdge::end_node() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.end_node) - return _internal_end_node(); +inline void Location_PathEdge::set_has_end_node() { + _impl_._oneof_case_[6] = kEndNode; } -inline void PathEdge::_internal_set_end_node(bool value) { - - _impl_.end_node_ = value; +inline void Location_PathEdge::clear_end_node() { + if (_internal_has_end_node()) { + _impl_.has_end_node_.end_node_ = false; + clear_has_has_end_node(); + } +} +inline bool Location_PathEdge::_internal_end_node() const { + if (_internal_has_end_node()) { + return _impl_.has_end_node_.end_node_; + } + return false; +} +inline void Location_PathEdge::_internal_set_end_node(bool value) { + if (!_internal_has_end_node()) { + clear_has_end_node(); + set_has_end_node(); + } + _impl_.has_end_node_.end_node_ = value; +} +inline bool Location_PathEdge::end_node() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.end_node) + return _internal_end_node(); } -inline void PathEdge::set_end_node(bool value) { +inline void Location_PathEdge::set_end_node(bool value) { _internal_set_end_node(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.end_node) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.end_node) } // repeated string names = 10; -inline int PathEdge::_internal_names_size() const { +inline int Location_PathEdge::_internal_names_size() const { return _impl_.names_.size(); } -inline int PathEdge::names_size() const { +inline int Location_PathEdge::names_size() const { return _internal_names_size(); } -inline void PathEdge::clear_names() { +inline void Location_PathEdge::clear_names() { _impl_.names_.Clear(); } -inline std::string* PathEdge::add_names() { +inline std::string* Location_PathEdge::add_names() { std::string* _s = _internal_add_names(); - // @@protoc_insertion_point(field_add_mutable:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_add_mutable:valhalla.Location.PathEdge.names) return _s; } -inline const std::string& PathEdge::_internal_names(int index) const { +inline const std::string& Location_PathEdge::_internal_names(int index) const { return _impl_.names_.Get(index); } -inline const std::string& PathEdge::names(int index) const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.names) +inline const std::string& Location_PathEdge::names(int index) const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.names) return _internal_names(index); } -inline std::string* PathEdge::mutable_names(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.PathEdge.names) +inline std::string* Location_PathEdge::mutable_names(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.Location.PathEdge.names) return _impl_.names_.Mutable(index); } -inline void PathEdge::set_names(int index, const std::string& value) { +inline void Location_PathEdge::set_names(int index, const std::string& value) { _impl_.names_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.names) } -inline void PathEdge::set_names(int index, std::string&& value) { +inline void Location_PathEdge::set_names(int index, std::string&& value) { _impl_.names_.Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.names) } -inline void PathEdge::set_names(int index, const char* value) { +inline void Location_PathEdge::set_names(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.names_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_set_char:valhalla.Location.PathEdge.names) } -inline void PathEdge::set_names(int index, const char* value, size_t size) { +inline void Location_PathEdge::set_names(int index, const char* value, size_t size) { _impl_.names_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_set_pointer:valhalla.Location.PathEdge.names) } -inline std::string* PathEdge::_internal_add_names() { +inline std::string* Location_PathEdge::_internal_add_names() { return _impl_.names_.Add(); } -inline void PathEdge::add_names(const std::string& value) { +inline void Location_PathEdge::add_names(const std::string& value) { _impl_.names_.Add()->assign(value); - // @@protoc_insertion_point(field_add:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_add:valhalla.Location.PathEdge.names) } -inline void PathEdge::add_names(std::string&& value) { +inline void Location_PathEdge::add_names(std::string&& value) { _impl_.names_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_add:valhalla.Location.PathEdge.names) } -inline void PathEdge::add_names(const char* value) { +inline void Location_PathEdge::add_names(const char* value) { GOOGLE_DCHECK(value != nullptr); _impl_.names_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_add_char:valhalla.Location.PathEdge.names) } -inline void PathEdge::add_names(const char* value, size_t size) { +inline void Location_PathEdge::add_names(const char* value, size_t size) { _impl_.names_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:valhalla.PathEdge.names) + // @@protoc_insertion_point(field_add_pointer:valhalla.Location.PathEdge.names) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -PathEdge::names() const { - // @@protoc_insertion_point(field_list:valhalla.PathEdge.names) +Location_PathEdge::names() const { + // @@protoc_insertion_point(field_list:valhalla.Location.PathEdge.names) return _impl_.names_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -PathEdge::mutable_names() { - // @@protoc_insertion_point(field_mutable_list:valhalla.PathEdge.names) +Location_PathEdge::mutable_names() { + // @@protoc_insertion_point(field_mutable_list:valhalla.Location.PathEdge.names) return &_impl_.names_; } // int32 outbound_reach = 11; -inline void PathEdge::clear_outbound_reach() { - _impl_.outbound_reach_ = 0; +inline bool Location_PathEdge::_internal_has_outbound_reach() const { + return has_outbound_reach_case() == kOutboundReach; } -inline int32_t PathEdge::_internal_outbound_reach() const { - return _impl_.outbound_reach_; +inline bool Location_PathEdge::has_outbound_reach() const { + return _internal_has_outbound_reach(); } -inline int32_t PathEdge::outbound_reach() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.outbound_reach) - return _internal_outbound_reach(); +inline void Location_PathEdge::set_has_outbound_reach() { + _impl_._oneof_case_[7] = kOutboundReach; } -inline void PathEdge::_internal_set_outbound_reach(int32_t value) { - - _impl_.outbound_reach_ = value; +inline void Location_PathEdge::clear_outbound_reach() { + if (_internal_has_outbound_reach()) { + _impl_.has_outbound_reach_.outbound_reach_ = 0; + clear_has_has_outbound_reach(); + } } -inline void PathEdge::set_outbound_reach(int32_t value) { +inline int32_t Location_PathEdge::_internal_outbound_reach() const { + if (_internal_has_outbound_reach()) { + return _impl_.has_outbound_reach_.outbound_reach_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_outbound_reach(int32_t value) { + if (!_internal_has_outbound_reach()) { + clear_has_outbound_reach(); + set_has_outbound_reach(); + } + _impl_.has_outbound_reach_.outbound_reach_ = value; +} +inline int32_t Location_PathEdge::outbound_reach() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.outbound_reach) + return _internal_outbound_reach(); +} +inline void Location_PathEdge::set_outbound_reach(int32_t value) { _internal_set_outbound_reach(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.outbound_reach) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.outbound_reach) } // int32 inbound_reach = 12; -inline void PathEdge::clear_inbound_reach() { - _impl_.inbound_reach_ = 0; +inline bool Location_PathEdge::_internal_has_inbound_reach() const { + return has_inbound_reach_case() == kInboundReach; } -inline int32_t PathEdge::_internal_inbound_reach() const { - return _impl_.inbound_reach_; +inline bool Location_PathEdge::has_inbound_reach() const { + return _internal_has_inbound_reach(); } -inline int32_t PathEdge::inbound_reach() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.inbound_reach) - return _internal_inbound_reach(); +inline void Location_PathEdge::set_has_inbound_reach() { + _impl_._oneof_case_[8] = kInboundReach; } -inline void PathEdge::_internal_set_inbound_reach(int32_t value) { - - _impl_.inbound_reach_ = value; +inline void Location_PathEdge::clear_inbound_reach() { + if (_internal_has_inbound_reach()) { + _impl_.has_inbound_reach_.inbound_reach_ = 0; + clear_has_has_inbound_reach(); + } +} +inline int32_t Location_PathEdge::_internal_inbound_reach() const { + if (_internal_has_inbound_reach()) { + return _impl_.has_inbound_reach_.inbound_reach_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_inbound_reach(int32_t value) { + if (!_internal_has_inbound_reach()) { + clear_has_inbound_reach(); + set_has_inbound_reach(); + } + _impl_.has_inbound_reach_.inbound_reach_ = value; +} +inline int32_t Location_PathEdge::inbound_reach() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.inbound_reach) + return _internal_inbound_reach(); } -inline void PathEdge::set_inbound_reach(int32_t value) { +inline void Location_PathEdge::set_inbound_reach(int32_t value) { _internal_set_inbound_reach(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.inbound_reach) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.inbound_reach) } // float heading = 13; -inline void PathEdge::clear_heading() { - _impl_.heading_ = 0; +inline bool Location_PathEdge::_internal_has_heading() const { + return has_heading_case() == kHeading; } -inline float PathEdge::_internal_heading() const { - return _impl_.heading_; +inline bool Location_PathEdge::has_heading() const { + return _internal_has_heading(); } -inline float PathEdge::heading() const { - // @@protoc_insertion_point(field_get:valhalla.PathEdge.heading) - return _internal_heading(); +inline void Location_PathEdge::set_has_heading() { + _impl_._oneof_case_[9] = kHeading; } -inline void PathEdge::_internal_set_heading(float value) { - - _impl_.heading_ = value; +inline void Location_PathEdge::clear_heading() { + if (_internal_has_heading()) { + _impl_.has_heading_.heading_ = 0; + clear_has_has_heading(); + } +} +inline float Location_PathEdge::_internal_heading() const { + if (_internal_has_heading()) { + return _impl_.has_heading_.heading_; + } + return 0; +} +inline void Location_PathEdge::_internal_set_heading(float value) { + if (!_internal_has_heading()) { + clear_has_heading(); + set_has_heading(); + } + _impl_.has_heading_.heading_ = value; +} +inline float Location_PathEdge::heading() const { + // @@protoc_insertion_point(field_get:valhalla.Location.PathEdge.heading) + return _internal_heading(); } -inline void PathEdge::set_heading(float value) { +inline void Location_PathEdge::set_heading(float value) { _internal_set_heading(value); - // @@protoc_insertion_point(field_set:valhalla.PathEdge.heading) + // @@protoc_insertion_point(field_set:valhalla.Location.PathEdge.heading) } -// ------------------------------------------------------------------- - -// Correlation - -// repeated .valhalla.PathEdge edges = 1; -inline int Correlation::_internal_edges_size() const { - return _impl_.edges_.size(); +inline bool Location_PathEdge::has_has_graph_id() const { + return has_graph_id_case() != HAS_GRAPH_ID_NOT_SET; } -inline int Correlation::edges_size() const { - return _internal_edges_size(); +inline void Location_PathEdge::clear_has_has_graph_id() { + _impl_._oneof_case_[0] = HAS_GRAPH_ID_NOT_SET; } -inline void Correlation::clear_edges() { - _impl_.edges_.Clear(); +inline bool Location_PathEdge::has_has_percent_along() const { + return has_percent_along_case() != HAS_PERCENT_ALONG_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::mutable_edges(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Correlation.edges) - return _impl_.edges_.Mutable(index); +inline void Location_PathEdge::clear_has_has_percent_along() { + _impl_._oneof_case_[1] = HAS_PERCENT_ALONG_NOT_SET; } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >* -Correlation::mutable_edges() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Correlation.edges) - return &_impl_.edges_; +inline bool Location_PathEdge::has_has_side_of_street() const { + return has_side_of_street_case() != HAS_SIDE_OF_STREET_NOT_SET; } -inline const ::valhalla::PathEdge& Correlation::_internal_edges(int index) const { - return _impl_.edges_.Get(index); +inline void Location_PathEdge::clear_has_has_side_of_street() { + _impl_._oneof_case_[2] = HAS_SIDE_OF_STREET_NOT_SET; } -inline const ::valhalla::PathEdge& Correlation::edges(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.edges) - return _internal_edges(index); +inline bool Location_PathEdge::has_has_distance() const { + return has_distance_case() != HAS_DISTANCE_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::_internal_add_edges() { - return _impl_.edges_.Add(); +inline void Location_PathEdge::clear_has_has_distance() { + _impl_._oneof_case_[3] = HAS_DISTANCE_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::add_edges() { - ::valhalla::PathEdge* _add = _internal_add_edges(); - // @@protoc_insertion_point(field_add:valhalla.Correlation.edges) - return _add; +inline bool Location_PathEdge::has_has_minimum_reachability() const { + return has_minimum_reachability_case() != HAS_MINIMUM_REACHABILITY_NOT_SET; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >& -Correlation::edges() const { - // @@protoc_insertion_point(field_list:valhalla.Correlation.edges) - return _impl_.edges_; +inline void Location_PathEdge::clear_has_has_minimum_reachability() { + _impl_._oneof_case_[4] = HAS_MINIMUM_REACHABILITY_NOT_SET; } - -// repeated .valhalla.PathEdge filtered_edges = 2; -inline int Correlation::_internal_filtered_edges_size() const { - return _impl_.filtered_edges_.size(); +inline bool Location_PathEdge::has_has_begin_node() const { + return has_begin_node_case() != HAS_BEGIN_NODE_NOT_SET; } -inline int Correlation::filtered_edges_size() const { - return _internal_filtered_edges_size(); +inline void Location_PathEdge::clear_has_has_begin_node() { + _impl_._oneof_case_[5] = HAS_BEGIN_NODE_NOT_SET; } -inline void Correlation::clear_filtered_edges() { - _impl_.filtered_edges_.Clear(); +inline bool Location_PathEdge::has_has_end_node() const { + return has_end_node_case() != HAS_END_NODE_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::mutable_filtered_edges(int index) { - // @@protoc_insertion_point(field_mutable:valhalla.Correlation.filtered_edges) - return _impl_.filtered_edges_.Mutable(index); +inline void Location_PathEdge::clear_has_has_end_node() { + _impl_._oneof_case_[6] = HAS_END_NODE_NOT_SET; } -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >* -Correlation::mutable_filtered_edges() { - // @@protoc_insertion_point(field_mutable_list:valhalla.Correlation.filtered_edges) - return &_impl_.filtered_edges_; +inline bool Location_PathEdge::has_has_outbound_reach() const { + return has_outbound_reach_case() != HAS_OUTBOUND_REACH_NOT_SET; } -inline const ::valhalla::PathEdge& Correlation::_internal_filtered_edges(int index) const { - return _impl_.filtered_edges_.Get(index); +inline void Location_PathEdge::clear_has_has_outbound_reach() { + _impl_._oneof_case_[7] = HAS_OUTBOUND_REACH_NOT_SET; } -inline const ::valhalla::PathEdge& Correlation::filtered_edges(int index) const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.filtered_edges) - return _internal_filtered_edges(index); +inline bool Location_PathEdge::has_has_inbound_reach() const { + return has_inbound_reach_case() != HAS_INBOUND_REACH_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::_internal_add_filtered_edges() { - return _impl_.filtered_edges_.Add(); +inline void Location_PathEdge::clear_has_has_inbound_reach() { + _impl_._oneof_case_[8] = HAS_INBOUND_REACH_NOT_SET; } -inline ::valhalla::PathEdge* Correlation::add_filtered_edges() { - ::valhalla::PathEdge* _add = _internal_add_filtered_edges(); - // @@protoc_insertion_point(field_add:valhalla.Correlation.filtered_edges) - return _add; +inline bool Location_PathEdge::has_has_heading() const { + return has_heading_case() != HAS_HEADING_NOT_SET; } -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::PathEdge >& -Correlation::filtered_edges() const { - // @@protoc_insertion_point(field_list:valhalla.Correlation.filtered_edges) - return _impl_.filtered_edges_; +inline void Location_PathEdge::clear_has_has_heading() { + _impl_._oneof_case_[9] = HAS_HEADING_NOT_SET; +} +inline Location_PathEdge::HasGraphIdCase Location_PathEdge::has_graph_id_case() const { + return Location_PathEdge::HasGraphIdCase(_impl_._oneof_case_[0]); +} +inline Location_PathEdge::HasPercentAlongCase Location_PathEdge::has_percent_along_case() const { + return Location_PathEdge::HasPercentAlongCase(_impl_._oneof_case_[1]); +} +inline Location_PathEdge::HasSideOfStreetCase Location_PathEdge::has_side_of_street_case() const { + return Location_PathEdge::HasSideOfStreetCase(_impl_._oneof_case_[2]); +} +inline Location_PathEdge::HasDistanceCase Location_PathEdge::has_distance_case() const { + return Location_PathEdge::HasDistanceCase(_impl_._oneof_case_[3]); +} +inline Location_PathEdge::HasMinimumReachabilityCase Location_PathEdge::has_minimum_reachability_case() const { + return Location_PathEdge::HasMinimumReachabilityCase(_impl_._oneof_case_[4]); +} +inline Location_PathEdge::HasBeginNodeCase Location_PathEdge::has_begin_node_case() const { + return Location_PathEdge::HasBeginNodeCase(_impl_._oneof_case_[5]); +} +inline Location_PathEdge::HasEndNodeCase Location_PathEdge::has_end_node_case() const { + return Location_PathEdge::HasEndNodeCase(_impl_._oneof_case_[6]); +} +inline Location_PathEdge::HasOutboundReachCase Location_PathEdge::has_outbound_reach_case() const { + return Location_PathEdge::HasOutboundReachCase(_impl_._oneof_case_[7]); +} +inline Location_PathEdge::HasInboundReachCase Location_PathEdge::has_inbound_reach_case() const { + return Location_PathEdge::HasInboundReachCase(_impl_._oneof_case_[8]); +} +inline Location_PathEdge::HasHeadingCase Location_PathEdge::has_heading_case() const { + return Location_PathEdge::HasHeadingCase(_impl_._oneof_case_[9]); } +// ------------------------------------------------------------------- + +// Location_SearchFilter -// uint32 original_index = 3; -inline void Correlation::clear_original_index() { - _impl_.original_index_ = 0u; +// .valhalla.RoadClass min_road_class = 1; +inline bool Location_SearchFilter::_internal_has_min_road_class() const { + return has_min_road_class_case() == kMinRoadClass; } -inline uint32_t Correlation::_internal_original_index() const { - return _impl_.original_index_; +inline bool Location_SearchFilter::has_min_road_class() const { + return _internal_has_min_road_class(); } -inline uint32_t Correlation::original_index() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.original_index) - return _internal_original_index(); +inline void Location_SearchFilter::set_has_min_road_class() { + _impl_._oneof_case_[0] = kMinRoadClass; } -inline void Correlation::_internal_set_original_index(uint32_t value) { - - _impl_.original_index_ = value; +inline void Location_SearchFilter::clear_min_road_class() { + if (_internal_has_min_road_class()) { + _impl_.has_min_road_class_.min_road_class_ = 0; + clear_has_has_min_road_class(); + } } -inline void Correlation::set_original_index(uint32_t value) { - _internal_set_original_index(value); - // @@protoc_insertion_point(field_set:valhalla.Correlation.original_index) +inline ::valhalla::RoadClass Location_SearchFilter::_internal_min_road_class() const { + if (_internal_has_min_road_class()) { + return static_cast< ::valhalla::RoadClass >(_impl_.has_min_road_class_.min_road_class_); + } + return static_cast< ::valhalla::RoadClass >(0); +} +inline ::valhalla::RoadClass Location_SearchFilter::min_road_class() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.min_road_class) + return _internal_min_road_class(); +} +inline void Location_SearchFilter::_internal_set_min_road_class(::valhalla::RoadClass value) { + if (!_internal_has_min_road_class()) { + clear_has_min_road_class(); + set_has_min_road_class(); + } + _impl_.has_min_road_class_.min_road_class_ = value; +} +inline void Location_SearchFilter::set_min_road_class(::valhalla::RoadClass value) { + _internal_set_min_road_class(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.min_road_class) } -// .valhalla.LatLng projected_ll = 4; -inline bool Correlation::_internal_has_projected_ll() const { - return this != internal_default_instance() && _impl_.projected_ll_ != nullptr; +// .valhalla.RoadClass max_road_class = 2; +inline bool Location_SearchFilter::_internal_has_max_road_class() const { + return has_max_road_class_case() == kMaxRoadClass; } -inline bool Correlation::has_projected_ll() const { - return _internal_has_projected_ll(); +inline bool Location_SearchFilter::has_max_road_class() const { + return _internal_has_max_road_class(); } -inline void Correlation::clear_projected_ll() { - if (GetArenaForAllocation() == nullptr && _impl_.projected_ll_ != nullptr) { - delete _impl_.projected_ll_; +inline void Location_SearchFilter::set_has_max_road_class() { + _impl_._oneof_case_[1] = kMaxRoadClass; +} +inline void Location_SearchFilter::clear_max_road_class() { + if (_internal_has_max_road_class()) { + _impl_.has_max_road_class_.max_road_class_ = 0; + clear_has_has_max_road_class(); } - _impl_.projected_ll_ = nullptr; } -inline const ::valhalla::LatLng& Correlation::_internal_projected_ll() const { - const ::valhalla::LatLng* p = _impl_.projected_ll_; - return p != nullptr ? *p : reinterpret_cast( - ::valhalla::_LatLng_default_instance_); +inline ::valhalla::RoadClass Location_SearchFilter::_internal_max_road_class() const { + if (_internal_has_max_road_class()) { + return static_cast< ::valhalla::RoadClass >(_impl_.has_max_road_class_.max_road_class_); + } + return static_cast< ::valhalla::RoadClass >(0); } -inline const ::valhalla::LatLng& Correlation::projected_ll() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.projected_ll) - return _internal_projected_ll(); +inline ::valhalla::RoadClass Location_SearchFilter::max_road_class() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.max_road_class) + return _internal_max_road_class(); } -inline void Correlation::unsafe_arena_set_allocated_projected_ll( - ::valhalla::LatLng* projected_ll) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.projected_ll_); +inline void Location_SearchFilter::_internal_set_max_road_class(::valhalla::RoadClass value) { + if (!_internal_has_max_road_class()) { + clear_has_max_road_class(); + set_has_max_road_class(); } - _impl_.projected_ll_ = projected_ll; - if (projected_ll) { - - } else { - + _impl_.has_max_road_class_.max_road_class_ = value; +} +inline void Location_SearchFilter::set_max_road_class(::valhalla::RoadClass value) { + _internal_set_max_road_class(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.max_road_class) +} + +// bool exclude_tunnel = 3; +inline bool Location_SearchFilter::_internal_has_exclude_tunnel() const { + return has_exclude_tunnel_case() == kExcludeTunnel; +} +inline bool Location_SearchFilter::has_exclude_tunnel() const { + return _internal_has_exclude_tunnel(); +} +inline void Location_SearchFilter::set_has_exclude_tunnel() { + _impl_._oneof_case_[2] = kExcludeTunnel; +} +inline void Location_SearchFilter::clear_exclude_tunnel() { + if (_internal_has_exclude_tunnel()) { + _impl_.has_exclude_tunnel_.exclude_tunnel_ = false; + clear_has_has_exclude_tunnel(); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Correlation.projected_ll) } -inline ::valhalla::LatLng* Correlation::release_projected_ll() { - - ::valhalla::LatLng* temp = _impl_.projected_ll_; - _impl_.projected_ll_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); +inline bool Location_SearchFilter::_internal_exclude_tunnel() const { + if (_internal_has_exclude_tunnel()) { + return _impl_.has_exclude_tunnel_.exclude_tunnel_; } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; + return false; } -inline ::valhalla::LatLng* Correlation::unsafe_arena_release_projected_ll() { - // @@protoc_insertion_point(field_release:valhalla.Correlation.projected_ll) - - ::valhalla::LatLng* temp = _impl_.projected_ll_; - _impl_.projected_ll_ = nullptr; - return temp; +inline void Location_SearchFilter::_internal_set_exclude_tunnel(bool value) { + if (!_internal_has_exclude_tunnel()) { + clear_has_exclude_tunnel(); + set_has_exclude_tunnel(); + } + _impl_.has_exclude_tunnel_.exclude_tunnel_ = value; +} +inline bool Location_SearchFilter::exclude_tunnel() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.exclude_tunnel) + return _internal_exclude_tunnel(); +} +inline void Location_SearchFilter::set_exclude_tunnel(bool value) { + _internal_set_exclude_tunnel(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.exclude_tunnel) +} + +// bool exclude_bridge = 4; +inline bool Location_SearchFilter::_internal_has_exclude_bridge() const { + return has_exclude_bridge_case() == kExcludeBridge; +} +inline bool Location_SearchFilter::has_exclude_bridge() const { + return _internal_has_exclude_bridge(); +} +inline void Location_SearchFilter::set_has_exclude_bridge() { + _impl_._oneof_case_[3] = kExcludeBridge; +} +inline void Location_SearchFilter::clear_exclude_bridge() { + if (_internal_has_exclude_bridge()) { + _impl_.has_exclude_bridge_.exclude_bridge_ = false; + clear_has_has_exclude_bridge(); + } +} +inline bool Location_SearchFilter::_internal_exclude_bridge() const { + if (_internal_has_exclude_bridge()) { + return _impl_.has_exclude_bridge_.exclude_bridge_; + } + return false; +} +inline void Location_SearchFilter::_internal_set_exclude_bridge(bool value) { + if (!_internal_has_exclude_bridge()) { + clear_has_exclude_bridge(); + set_has_exclude_bridge(); + } + _impl_.has_exclude_bridge_.exclude_bridge_ = value; +} +inline bool Location_SearchFilter::exclude_bridge() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.exclude_bridge) + return _internal_exclude_bridge(); +} +inline void Location_SearchFilter::set_exclude_bridge(bool value) { + _internal_set_exclude_bridge(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.exclude_bridge) +} + +// bool exclude_ramp = 5; +inline bool Location_SearchFilter::_internal_has_exclude_ramp() const { + return has_exclude_ramp_case() == kExcludeRamp; +} +inline bool Location_SearchFilter::has_exclude_ramp() const { + return _internal_has_exclude_ramp(); +} +inline void Location_SearchFilter::set_has_exclude_ramp() { + _impl_._oneof_case_[4] = kExcludeRamp; } -inline ::valhalla::LatLng* Correlation::_internal_mutable_projected_ll() { - - if (_impl_.projected_ll_ == nullptr) { - auto* p = CreateMaybeMessage<::valhalla::LatLng>(GetArenaForAllocation()); - _impl_.projected_ll_ = p; +inline void Location_SearchFilter::clear_exclude_ramp() { + if (_internal_has_exclude_ramp()) { + _impl_.has_exclude_ramp_.exclude_ramp_ = false; + clear_has_has_exclude_ramp(); } - return _impl_.projected_ll_; -} -inline ::valhalla::LatLng* Correlation::mutable_projected_ll() { - ::valhalla::LatLng* _msg = _internal_mutable_projected_ll(); - // @@protoc_insertion_point(field_mutable:valhalla.Correlation.projected_ll) - return _msg; } -inline void Correlation::set_allocated_projected_ll(::valhalla::LatLng* projected_ll) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.projected_ll_; +inline bool Location_SearchFilter::_internal_exclude_ramp() const { + if (_internal_has_exclude_ramp()) { + return _impl_.has_exclude_ramp_.exclude_ramp_; } - if (projected_ll) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(projected_ll); - if (message_arena != submessage_arena) { - projected_ll = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, projected_ll, submessage_arena); - } - - } else { - + return false; +} +inline void Location_SearchFilter::_internal_set_exclude_ramp(bool value) { + if (!_internal_has_exclude_ramp()) { + clear_has_exclude_ramp(); + set_has_exclude_ramp(); } - _impl_.projected_ll_ = projected_ll; - // @@protoc_insertion_point(field_set_allocated:valhalla.Correlation.projected_ll) + _impl_.has_exclude_ramp_.exclude_ramp_ = value; +} +inline bool Location_SearchFilter::exclude_ramp() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.exclude_ramp) + return _internal_exclude_ramp(); +} +inline void Location_SearchFilter::set_exclude_ramp(bool value) { + _internal_set_exclude_ramp(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.exclude_ramp) } -// uint32 leg_shape_index = 5; -inline void Correlation::clear_leg_shape_index() { - _impl_.leg_shape_index_ = 0u; +// bool exclude_closures = 6; +inline bool Location_SearchFilter::_internal_has_exclude_closures() const { + return has_exclude_closures_case() == kExcludeClosures; } -inline uint32_t Correlation::_internal_leg_shape_index() const { - return _impl_.leg_shape_index_; +inline bool Location_SearchFilter::has_exclude_closures() const { + return _internal_has_exclude_closures(); } -inline uint32_t Correlation::leg_shape_index() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.leg_shape_index) - return _internal_leg_shape_index(); +inline void Location_SearchFilter::set_has_exclude_closures() { + _impl_._oneof_case_[5] = kExcludeClosures; } -inline void Correlation::_internal_set_leg_shape_index(uint32_t value) { - - _impl_.leg_shape_index_ = value; +inline void Location_SearchFilter::clear_exclude_closures() { + if (_internal_has_exclude_closures()) { + _impl_.has_exclude_closures_.exclude_closures_ = false; + clear_has_has_exclude_closures(); + } } -inline void Correlation::set_leg_shape_index(uint32_t value) { - _internal_set_leg_shape_index(value); - // @@protoc_insertion_point(field_set:valhalla.Correlation.leg_shape_index) +inline bool Location_SearchFilter::_internal_exclude_closures() const { + if (_internal_has_exclude_closures()) { + return _impl_.has_exclude_closures_.exclude_closures_; + } + return false; +} +inline void Location_SearchFilter::_internal_set_exclude_closures(bool value) { + if (!_internal_has_exclude_closures()) { + clear_has_exclude_closures(); + set_has_exclude_closures(); + } + _impl_.has_exclude_closures_.exclude_closures_ = value; +} +inline bool Location_SearchFilter::exclude_closures() const { + // @@protoc_insertion_point(field_get:valhalla.Location.SearchFilter.exclude_closures) + return _internal_exclude_closures(); +} +inline void Location_SearchFilter::set_exclude_closures(bool value) { + _internal_set_exclude_closures(value); + // @@protoc_insertion_point(field_set:valhalla.Location.SearchFilter.exclude_closures) } -// double distance_from_leg_origin = 6; -inline void Correlation::clear_distance_from_leg_origin() { - _impl_.distance_from_leg_origin_ = 0; +inline bool Location_SearchFilter::has_has_min_road_class() const { + return has_min_road_class_case() != HAS_MIN_ROAD_CLASS_NOT_SET; } -inline double Correlation::_internal_distance_from_leg_origin() const { - return _impl_.distance_from_leg_origin_; +inline void Location_SearchFilter::clear_has_has_min_road_class() { + _impl_._oneof_case_[0] = HAS_MIN_ROAD_CLASS_NOT_SET; } -inline double Correlation::distance_from_leg_origin() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.distance_from_leg_origin) - return _internal_distance_from_leg_origin(); +inline bool Location_SearchFilter::has_has_max_road_class() const { + return has_max_road_class_case() != HAS_MAX_ROAD_CLASS_NOT_SET; } -inline void Correlation::_internal_set_distance_from_leg_origin(double value) { - - _impl_.distance_from_leg_origin_ = value; +inline void Location_SearchFilter::clear_has_has_max_road_class() { + _impl_._oneof_case_[1] = HAS_MAX_ROAD_CLASS_NOT_SET; } -inline void Correlation::set_distance_from_leg_origin(double value) { - _internal_set_distance_from_leg_origin(value); - // @@protoc_insertion_point(field_set:valhalla.Correlation.distance_from_leg_origin) +inline bool Location_SearchFilter::has_has_exclude_tunnel() const { + return has_exclude_tunnel_case() != HAS_EXCLUDE_TUNNEL_NOT_SET; } - -// uint32 route_index = 7; -inline void Correlation::clear_route_index() { - _impl_.route_index_ = 0u; +inline void Location_SearchFilter::clear_has_has_exclude_tunnel() { + _impl_._oneof_case_[2] = HAS_EXCLUDE_TUNNEL_NOT_SET; } -inline uint32_t Correlation::_internal_route_index() const { - return _impl_.route_index_; +inline bool Location_SearchFilter::has_has_exclude_bridge() const { + return has_exclude_bridge_case() != HAS_EXCLUDE_BRIDGE_NOT_SET; } -inline uint32_t Correlation::route_index() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.route_index) - return _internal_route_index(); +inline void Location_SearchFilter::clear_has_has_exclude_bridge() { + _impl_._oneof_case_[3] = HAS_EXCLUDE_BRIDGE_NOT_SET; } -inline void Correlation::_internal_set_route_index(uint32_t value) { - - _impl_.route_index_ = value; +inline bool Location_SearchFilter::has_has_exclude_ramp() const { + return has_exclude_ramp_case() != HAS_EXCLUDE_RAMP_NOT_SET; } -inline void Correlation::set_route_index(uint32_t value) { - _internal_set_route_index(value); - // @@protoc_insertion_point(field_set:valhalla.Correlation.route_index) +inline void Location_SearchFilter::clear_has_has_exclude_ramp() { + _impl_._oneof_case_[4] = HAS_EXCLUDE_RAMP_NOT_SET; } - -// uint32 waypoint_index = 8; -inline void Correlation::clear_waypoint_index() { - _impl_.waypoint_index_ = 0u; +inline bool Location_SearchFilter::has_has_exclude_closures() const { + return has_exclude_closures_case() != HAS_EXCLUDE_CLOSURES_NOT_SET; } -inline uint32_t Correlation::_internal_waypoint_index() const { - return _impl_.waypoint_index_; +inline void Location_SearchFilter::clear_has_has_exclude_closures() { + _impl_._oneof_case_[5] = HAS_EXCLUDE_CLOSURES_NOT_SET; } -inline uint32_t Correlation::waypoint_index() const { - // @@protoc_insertion_point(field_get:valhalla.Correlation.waypoint_index) - return _internal_waypoint_index(); +inline Location_SearchFilter::HasMinRoadClassCase Location_SearchFilter::has_min_road_class_case() const { + return Location_SearchFilter::HasMinRoadClassCase(_impl_._oneof_case_[0]); } -inline void Correlation::_internal_set_waypoint_index(uint32_t value) { - - _impl_.waypoint_index_ = value; +inline Location_SearchFilter::HasMaxRoadClassCase Location_SearchFilter::has_max_road_class_case() const { + return Location_SearchFilter::HasMaxRoadClassCase(_impl_._oneof_case_[1]); } -inline void Correlation::set_waypoint_index(uint32_t value) { - _internal_set_waypoint_index(value); - // @@protoc_insertion_point(field_set:valhalla.Correlation.waypoint_index) +inline Location_SearchFilter::HasExcludeTunnelCase Location_SearchFilter::has_exclude_tunnel_case() const { + return Location_SearchFilter::HasExcludeTunnelCase(_impl_._oneof_case_[2]); +} +inline Location_SearchFilter::HasExcludeBridgeCase Location_SearchFilter::has_exclude_bridge_case() const { + return Location_SearchFilter::HasExcludeBridgeCase(_impl_._oneof_case_[3]); +} +inline Location_SearchFilter::HasExcludeRampCase Location_SearchFilter::has_exclude_ramp_case() const { + return Location_SearchFilter::HasExcludeRampCase(_impl_._oneof_case_[4]); +} +inline Location_SearchFilter::HasExcludeClosuresCase Location_SearchFilter::has_exclude_closures_case() const { + return Location_SearchFilter::HasExcludeClosuresCase(_impl_._oneof_case_[5]); } - // ------------------------------------------------------------------- // Location @@ -5286,19 +6732,37 @@ inline void Location::set_allocated_ll(::valhalla::LatLng* ll) { } // .valhalla.Location.Type type = 2; +inline bool Location::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool Location::has_type() const { + return _internal_has_type(); +} +inline void Location::set_has_type() { + _impl_._oneof_case_[0] = kType; +} inline void Location::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::Location_Type Location::_internal_type() const { - return static_cast< ::valhalla::Location_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::Location_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::Location_Type >(0); } inline ::valhalla::Location_Type Location::type() const { // @@protoc_insertion_point(field_get:valhalla.Location.type) return _internal_type(); } inline void Location::_internal_set_type(::valhalla::Location_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void Location::set_type(::valhalla::Location_Type value) { _internal_set_type(value); @@ -5313,7 +6777,7 @@ inline bool Location::has_heading() const { return _internal_has_heading(); } inline void Location::set_has_heading() { - _impl_._oneof_case_[0] = kHeading; + _impl_._oneof_case_[1] = kHeading; } inline void Location::clear_heading() { if (_internal_has_heading()) { @@ -5344,18 +6808,33 @@ inline void Location::set_heading(uint32_t value) { } // string name = 4; +inline bool Location::_internal_has_name() const { + return has_name_case() == kName; +} +inline bool Location::has_name() const { + return _internal_has_name(); +} +inline void Location::set_has_name() { + _impl_._oneof_case_[2] = kName; +} inline void Location::clear_name() { - _impl_.name_.ClearToEmpty(); + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } } inline const std::string& Location::name() const { // @@protoc_insertion_point(field_get:valhalla.Location.name) return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void Location::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Location::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Location.name) } inline std::string* Location::mutable_name() { @@ -5364,48 +6843,75 @@ inline std::string* Location::mutable_name() { return _s; } inline const std::string& Location::_internal_name() const { - return _impl_.name_.Get(); + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Location::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } inline std::string* Location::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } inline std::string* Location::release_name() { // @@protoc_insertion_point(field_release:valhalla.Location.name) - return _impl_.name_.Release(); + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } inline void Location::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - + if (has_has_name()) { + clear_has_name(); } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.Location.name) } // string street = 5; +inline bool Location::_internal_has_street() const { + return has_street_case() == kStreet; +} +inline bool Location::has_street() const { + return _internal_has_street(); +} +inline void Location::set_has_street() { + _impl_._oneof_case_[3] = kStreet; +} inline void Location::clear_street() { - _impl_.street_.ClearToEmpty(); + if (_internal_has_street()) { + _impl_.has_street_.street_.Destroy(); + clear_has_has_street(); + } } inline const std::string& Location::street() const { // @@protoc_insertion_point(field_get:valhalla.Location.street) return _internal_street(); } template -inline PROTOBUF_ALWAYS_INLINE -void Location::set_street(ArgT0&& arg0, ArgT... args) { - - _impl_.street_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Location::set_street(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_street()) { + clear_has_street(); + set_has_street(); + _impl_.has_street_.street_.InitDefault(); + } + _impl_.has_street_.street_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Location.street) } inline std::string* Location::mutable_street() { @@ -5414,48 +6920,537 @@ inline std::string* Location::mutable_street() { return _s; } inline const std::string& Location::_internal_street() const { - return _impl_.street_.Get(); + if (_internal_has_street()) { + return _impl_.has_street_.street_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Location::_internal_set_street(const std::string& value) { - - _impl_.street_.Set(value, GetArenaForAllocation()); + if (!_internal_has_street()) { + clear_has_street(); + set_has_street(); + _impl_.has_street_.street_.InitDefault(); + } + _impl_.has_street_.street_.Set(value, GetArenaForAllocation()); } inline std::string* Location::_internal_mutable_street() { - - return _impl_.street_.Mutable(GetArenaForAllocation()); + if (!_internal_has_street()) { + clear_has_street(); + set_has_street(); + _impl_.has_street_.street_.InitDefault(); + } + return _impl_.has_street_.street_.Mutable( GetArenaForAllocation()); } inline std::string* Location::release_street() { // @@protoc_insertion_point(field_release:valhalla.Location.street) - return _impl_.street_.Release(); + if (_internal_has_street()) { + clear_has_has_street(); + return _impl_.has_street_.street_.Release(); + } else { + return nullptr; + } } inline void Location::set_allocated_street(std::string* street) { + if (has_has_street()) { + clear_has_street(); + } if (street != nullptr) { - + set_has_street(); + _impl_.has_street_.street_.InitAllocated(street, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.street) +} + +// string city = 6; +inline bool Location::_internal_has_city() const { + return has_city_case() == kCity; +} +inline bool Location::has_city() const { + return _internal_has_city(); +} +inline void Location::set_has_city() { + _impl_._oneof_case_[4] = kCity; +} +inline void Location::clear_city() { + if (_internal_has_city()) { + _impl_.has_city_.city_.Destroy(); + clear_has_has_city(); + } +} +inline const std::string& Location::city() const { + // @@protoc_insertion_point(field_get:valhalla.Location.city) + return _internal_city(); +} +template +inline void Location::set_city(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_city()) { + clear_has_city(); + set_has_city(); + _impl_.has_city_.city_.InitDefault(); + } + _impl_.has_city_.city_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.city) +} +inline std::string* Location::mutable_city() { + std::string* _s = _internal_mutable_city(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.city) + return _s; +} +inline const std::string& Location::_internal_city() const { + if (_internal_has_city()) { + return _impl_.has_city_.city_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_city(const std::string& value) { + if (!_internal_has_city()) { + clear_has_city(); + set_has_city(); + _impl_.has_city_.city_.InitDefault(); + } + _impl_.has_city_.city_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_city() { + if (!_internal_has_city()) { + clear_has_city(); + set_has_city(); + _impl_.has_city_.city_.InitDefault(); + } + return _impl_.has_city_.city_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_city() { + // @@protoc_insertion_point(field_release:valhalla.Location.city) + if (_internal_has_city()) { + clear_has_has_city(); + return _impl_.has_city_.city_.Release(); } else { - + return nullptr; } - _impl_.street_.SetAllocated(street, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.street_.IsDefault()) { - _impl_.street_.Set("", GetArenaForAllocation()); +} +inline void Location::set_allocated_city(std::string* city) { + if (has_has_city()) { + clear_has_city(); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:valhalla.Location.street) + if (city != nullptr) { + set_has_city(); + _impl_.has_city_.city_.InitAllocated(city, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.city) +} + +// string state = 7; +inline bool Location::_internal_has_state() const { + return has_state_case() == kState; +} +inline bool Location::has_state() const { + return _internal_has_state(); +} +inline void Location::set_has_state() { + _impl_._oneof_case_[5] = kState; +} +inline void Location::clear_state() { + if (_internal_has_state()) { + _impl_.has_state_.state_.Destroy(); + clear_has_has_state(); + } +} +inline const std::string& Location::state() const { + // @@protoc_insertion_point(field_get:valhalla.Location.state) + return _internal_state(); +} +template +inline void Location::set_state(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_state()) { + clear_has_state(); + set_has_state(); + _impl_.has_state_.state_.InitDefault(); + } + _impl_.has_state_.state_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.state) +} +inline std::string* Location::mutable_state() { + std::string* _s = _internal_mutable_state(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.state) + return _s; +} +inline const std::string& Location::_internal_state() const { + if (_internal_has_state()) { + return _impl_.has_state_.state_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_state(const std::string& value) { + if (!_internal_has_state()) { + clear_has_state(); + set_has_state(); + _impl_.has_state_.state_.InitDefault(); + } + _impl_.has_state_.state_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_state() { + if (!_internal_has_state()) { + clear_has_state(); + set_has_state(); + _impl_.has_state_.state_.InitDefault(); + } + return _impl_.has_state_.state_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_state() { + // @@protoc_insertion_point(field_release:valhalla.Location.state) + if (_internal_has_state()) { + clear_has_has_state(); + return _impl_.has_state_.state_.Release(); + } else { + return nullptr; + } +} +inline void Location::set_allocated_state(std::string* state) { + if (has_has_state()) { + clear_has_state(); + } + if (state != nullptr) { + set_has_state(); + _impl_.has_state_.state_.InitAllocated(state, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.state) +} + +// string postal_code = 8; +inline bool Location::_internal_has_postal_code() const { + return has_postal_code_case() == kPostalCode; +} +inline bool Location::has_postal_code() const { + return _internal_has_postal_code(); +} +inline void Location::set_has_postal_code() { + _impl_._oneof_case_[6] = kPostalCode; +} +inline void Location::clear_postal_code() { + if (_internal_has_postal_code()) { + _impl_.has_postal_code_.postal_code_.Destroy(); + clear_has_has_postal_code(); + } +} +inline const std::string& Location::postal_code() const { + // @@protoc_insertion_point(field_get:valhalla.Location.postal_code) + return _internal_postal_code(); +} +template +inline void Location::set_postal_code(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_postal_code()) { + clear_has_postal_code(); + set_has_postal_code(); + _impl_.has_postal_code_.postal_code_.InitDefault(); + } + _impl_.has_postal_code_.postal_code_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.postal_code) +} +inline std::string* Location::mutable_postal_code() { + std::string* _s = _internal_mutable_postal_code(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.postal_code) + return _s; +} +inline const std::string& Location::_internal_postal_code() const { + if (_internal_has_postal_code()) { + return _impl_.has_postal_code_.postal_code_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_postal_code(const std::string& value) { + if (!_internal_has_postal_code()) { + clear_has_postal_code(); + set_has_postal_code(); + _impl_.has_postal_code_.postal_code_.InitDefault(); + } + _impl_.has_postal_code_.postal_code_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_postal_code() { + if (!_internal_has_postal_code()) { + clear_has_postal_code(); + set_has_postal_code(); + _impl_.has_postal_code_.postal_code_.InitDefault(); + } + return _impl_.has_postal_code_.postal_code_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_postal_code() { + // @@protoc_insertion_point(field_release:valhalla.Location.postal_code) + if (_internal_has_postal_code()) { + clear_has_has_postal_code(); + return _impl_.has_postal_code_.postal_code_.Release(); + } else { + return nullptr; + } +} +inline void Location::set_allocated_postal_code(std::string* postal_code) { + if (has_has_postal_code()) { + clear_has_postal_code(); + } + if (postal_code != nullptr) { + set_has_postal_code(); + _impl_.has_postal_code_.postal_code_.InitAllocated(postal_code, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.postal_code) +} + +// string country = 9; +inline bool Location::_internal_has_country() const { + return has_country_case() == kCountry; +} +inline bool Location::has_country() const { + return _internal_has_country(); +} +inline void Location::set_has_country() { + _impl_._oneof_case_[7] = kCountry; +} +inline void Location::clear_country() { + if (_internal_has_country()) { + _impl_.has_country_.country_.Destroy(); + clear_has_has_country(); + } +} +inline const std::string& Location::country() const { + // @@protoc_insertion_point(field_get:valhalla.Location.country) + return _internal_country(); +} +template +inline void Location::set_country(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_country()) { + clear_has_country(); + set_has_country(); + _impl_.has_country_.country_.InitDefault(); + } + _impl_.has_country_.country_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.country) +} +inline std::string* Location::mutable_country() { + std::string* _s = _internal_mutable_country(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.country) + return _s; +} +inline const std::string& Location::_internal_country() const { + if (_internal_has_country()) { + return _impl_.has_country_.country_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_country(const std::string& value) { + if (!_internal_has_country()) { + clear_has_country(); + set_has_country(); + _impl_.has_country_.country_.InitDefault(); + } + _impl_.has_country_.country_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_country() { + if (!_internal_has_country()) { + clear_has_country(); + set_has_country(); + _impl_.has_country_.country_.InitDefault(); + } + return _impl_.has_country_.country_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_country() { + // @@protoc_insertion_point(field_release:valhalla.Location.country) + if (_internal_has_country()) { + clear_has_has_country(); + return _impl_.has_country_.country_.Release(); + } else { + return nullptr; + } +} +inline void Location::set_allocated_country(std::string* country) { + if (has_has_country()) { + clear_has_country(); + } + if (country != nullptr) { + set_has_country(); + _impl_.has_country_.country_.InitAllocated(country, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.country) +} + +// string phone = 10; +inline bool Location::_internal_has_phone() const { + return has_phone_case() == kPhone; +} +inline bool Location::has_phone() const { + return _internal_has_phone(); +} +inline void Location::set_has_phone() { + _impl_._oneof_case_[8] = kPhone; +} +inline void Location::clear_phone() { + if (_internal_has_phone()) { + _impl_.has_phone_.phone_.Destroy(); + clear_has_has_phone(); + } +} +inline const std::string& Location::phone() const { + // @@protoc_insertion_point(field_get:valhalla.Location.phone) + return _internal_phone(); +} +template +inline void Location::set_phone(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_phone()) { + clear_has_phone(); + set_has_phone(); + _impl_.has_phone_.phone_.InitDefault(); + } + _impl_.has_phone_.phone_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.phone) +} +inline std::string* Location::mutable_phone() { + std::string* _s = _internal_mutable_phone(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.phone) + return _s; +} +inline const std::string& Location::_internal_phone() const { + if (_internal_has_phone()) { + return _impl_.has_phone_.phone_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_phone(const std::string& value) { + if (!_internal_has_phone()) { + clear_has_phone(); + set_has_phone(); + _impl_.has_phone_.phone_.InitDefault(); + } + _impl_.has_phone_.phone_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_phone() { + if (!_internal_has_phone()) { + clear_has_phone(); + set_has_phone(); + _impl_.has_phone_.phone_.InitDefault(); + } + return _impl_.has_phone_.phone_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_phone() { + // @@protoc_insertion_point(field_release:valhalla.Location.phone) + if (_internal_has_phone()) { + clear_has_has_phone(); + return _impl_.has_phone_.phone_.Release(); + } else { + return nullptr; + } +} +inline void Location::set_allocated_phone(std::string* phone) { + if (has_has_phone()) { + clear_has_phone(); + } + if (phone != nullptr) { + set_has_phone(); + _impl_.has_phone_.phone_.InitAllocated(phone, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.phone) +} + +// string url = 11; +inline bool Location::_internal_has_url() const { + return has_url_case() == kUrl; +} +inline bool Location::has_url() const { + return _internal_has_url(); +} +inline void Location::set_has_url() { + _impl_._oneof_case_[9] = kUrl; +} +inline void Location::clear_url() { + if (_internal_has_url()) { + _impl_.has_url_.url_.Destroy(); + clear_has_has_url(); + } +} +inline const std::string& Location::url() const { + // @@protoc_insertion_point(field_get:valhalla.Location.url) + return _internal_url(); +} +template +inline void Location::set_url(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_url()) { + clear_has_url(); + set_has_url(); + _impl_.has_url_.url_.InitDefault(); + } + _impl_.has_url_.url_.Set( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:valhalla.Location.url) +} +inline std::string* Location::mutable_url() { + std::string* _s = _internal_mutable_url(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.url) + return _s; +} +inline const std::string& Location::_internal_url() const { + if (_internal_has_url()) { + return _impl_.has_url_.url_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void Location::_internal_set_url(const std::string& value) { + if (!_internal_has_url()) { + clear_has_url(); + set_has_url(); + _impl_.has_url_.url_.InitDefault(); + } + _impl_.has_url_.url_.Set(value, GetArenaForAllocation()); +} +inline std::string* Location::_internal_mutable_url() { + if (!_internal_has_url()) { + clear_has_url(); + set_has_url(); + _impl_.has_url_.url_.InitDefault(); + } + return _impl_.has_url_.url_.Mutable( GetArenaForAllocation()); +} +inline std::string* Location::release_url() { + // @@protoc_insertion_point(field_release:valhalla.Location.url) + if (_internal_has_url()) { + clear_has_has_url(); + return _impl_.has_url_.url_.Release(); + } else { + return nullptr; + } +} +inline void Location::set_allocated_url(std::string* url) { + if (has_has_url()) { + clear_has_url(); + } + if (url != nullptr) { + set_has_url(); + _impl_.has_url_.url_.InitAllocated(url, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.url) } // string date_time = 12; +inline bool Location::_internal_has_date_time() const { + return has_date_time_case() == kDateTime; +} +inline bool Location::has_date_time() const { + return _internal_has_date_time(); +} +inline void Location::set_has_date_time() { + _impl_._oneof_case_[10] = kDateTime; +} inline void Location::clear_date_time() { - _impl_.date_time_.ClearToEmpty(); + if (_internal_has_date_time()) { + _impl_.has_date_time_.date_time_.Destroy(); + clear_has_has_date_time(); + } } inline const std::string& Location::date_time() const { // @@protoc_insertion_point(field_get:valhalla.Location.date_time) return _internal_date_time(); } template -inline PROTOBUF_ALWAYS_INLINE -void Location::set_date_time(ArgT0&& arg0, ArgT... args) { - - _impl_.date_time_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Location::set_date_time(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_date_time()) { + clear_has_date_time(); + set_has_date_time(); + _impl_.has_date_time_.date_time_.InitDefault(); + } + _impl_.has_date_time_.date_time_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Location.date_time) } inline std::string* Location::mutable_date_time() { @@ -5464,49 +7459,79 @@ inline std::string* Location::mutable_date_time() { return _s; } inline const std::string& Location::_internal_date_time() const { - return _impl_.date_time_.Get(); + if (_internal_has_date_time()) { + return _impl_.has_date_time_.date_time_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Location::_internal_set_date_time(const std::string& value) { - - _impl_.date_time_.Set(value, GetArenaForAllocation()); + if (!_internal_has_date_time()) { + clear_has_date_time(); + set_has_date_time(); + _impl_.has_date_time_.date_time_.InitDefault(); + } + _impl_.has_date_time_.date_time_.Set(value, GetArenaForAllocation()); } inline std::string* Location::_internal_mutable_date_time() { - - return _impl_.date_time_.Mutable(GetArenaForAllocation()); + if (!_internal_has_date_time()) { + clear_has_date_time(); + set_has_date_time(); + _impl_.has_date_time_.date_time_.InitDefault(); + } + return _impl_.has_date_time_.date_time_.Mutable( GetArenaForAllocation()); } inline std::string* Location::release_date_time() { // @@protoc_insertion_point(field_release:valhalla.Location.date_time) - return _impl_.date_time_.Release(); + if (_internal_has_date_time()) { + clear_has_has_date_time(); + return _impl_.has_date_time_.date_time_.Release(); + } else { + return nullptr; + } } inline void Location::set_allocated_date_time(std::string* date_time) { - if (date_time != nullptr) { - - } else { - + if (has_has_date_time()) { + clear_has_date_time(); } - _impl_.date_time_.SetAllocated(date_time, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.date_time_.IsDefault()) { - _impl_.date_time_.Set("", GetArenaForAllocation()); + if (date_time != nullptr) { + set_has_date_time(); + _impl_.has_date_time_.date_time_.InitAllocated(date_time, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.Location.date_time) } // .valhalla.Location.SideOfStreet side_of_street = 13; +inline bool Location::_internal_has_side_of_street() const { + return has_side_of_street_case() == kSideOfStreet; +} +inline bool Location::has_side_of_street() const { + return _internal_has_side_of_street(); +} +inline void Location::set_has_side_of_street() { + _impl_._oneof_case_[11] = kSideOfStreet; +} inline void Location::clear_side_of_street() { - _impl_.side_of_street_ = 0; + if (_internal_has_side_of_street()) { + _impl_.has_side_of_street_.side_of_street_ = 0; + clear_has_has_side_of_street(); + } } inline ::valhalla::Location_SideOfStreet Location::_internal_side_of_street() const { - return static_cast< ::valhalla::Location_SideOfStreet >(_impl_.side_of_street_); + if (_internal_has_side_of_street()) { + return static_cast< ::valhalla::Location_SideOfStreet >(_impl_.has_side_of_street_.side_of_street_); + } + return static_cast< ::valhalla::Location_SideOfStreet >(0); } inline ::valhalla::Location_SideOfStreet Location::side_of_street() const { // @@protoc_insertion_point(field_get:valhalla.Location.side_of_street) return _internal_side_of_street(); } inline void Location::_internal_set_side_of_street(::valhalla::Location_SideOfStreet value) { - - _impl_.side_of_street_ = value; + if (!_internal_has_side_of_street()) { + clear_has_side_of_street(); + set_has_side_of_street(); + } + _impl_.has_side_of_street_.side_of_street_ = value; } inline void Location::set_side_of_street(::valhalla::Location_SideOfStreet value) { _internal_set_side_of_street(value); @@ -5521,7 +7546,7 @@ inline bool Location::has_heading_tolerance() const { return _internal_has_heading_tolerance(); } inline void Location::set_has_heading_tolerance() { - _impl_._oneof_case_[1] = kHeadingTolerance; + _impl_._oneof_case_[12] = kHeadingTolerance; } inline void Location::clear_heading_tolerance() { if (_internal_has_heading_tolerance()) { @@ -5559,7 +7584,7 @@ inline bool Location::has_node_snap_tolerance() const { return _internal_has_node_snap_tolerance(); } inline void Location::set_has_node_snap_tolerance() { - _impl_._oneof_case_[2] = kNodeSnapTolerance; + _impl_._oneof_case_[13] = kNodeSnapTolerance; } inline void Location::clear_node_snap_tolerance() { if (_internal_has_node_snap_tolerance()) { @@ -5589,6 +7614,44 @@ inline void Location::set_node_snap_tolerance(uint32_t value) { // @@protoc_insertion_point(field_set:valhalla.Location.node_snap_tolerance) } +// uint64 way_id = 16; +inline bool Location::_internal_has_way_id() const { + return has_way_id_case() == kWayId; +} +inline bool Location::has_way_id() const { + return _internal_has_way_id(); +} +inline void Location::set_has_way_id() { + _impl_._oneof_case_[14] = kWayId; +} +inline void Location::clear_way_id() { + if (_internal_has_way_id()) { + _impl_.has_way_id_.way_id_ = uint64_t{0u}; + clear_has_has_way_id(); + } +} +inline uint64_t Location::_internal_way_id() const { + if (_internal_has_way_id()) { + return _impl_.has_way_id_.way_id_; + } + return uint64_t{0u}; +} +inline void Location::_internal_set_way_id(uint64_t value) { + if (!_internal_has_way_id()) { + clear_has_way_id(); + set_has_way_id(); + } + _impl_.has_way_id_.way_id_ = value; +} +inline uint64_t Location::way_id() const { + // @@protoc_insertion_point(field_get:valhalla.Location.way_id) + return _internal_way_id(); +} +inline void Location::set_way_id(uint64_t value) { + _internal_set_way_id(value); + // @@protoc_insertion_point(field_set:valhalla.Location.way_id) +} + // uint32 minimum_reachability = 17; inline bool Location::_internal_has_minimum_reachability() const { return has_minimum_reachability_case() == kMinimumReachability; @@ -5597,7 +7660,7 @@ inline bool Location::has_minimum_reachability() const { return _internal_has_minimum_reachability(); } inline void Location::set_has_minimum_reachability() { - _impl_._oneof_case_[3] = kMinimumReachability; + _impl_._oneof_case_[15] = kMinimumReachability; } inline void Location::clear_minimum_reachability() { if (_internal_has_minimum_reachability()) { @@ -5635,7 +7698,7 @@ inline bool Location::has_radius() const { return _internal_has_radius(); } inline void Location::set_has_radius() { - _impl_._oneof_case_[4] = kRadius; + _impl_._oneof_case_[16] = kRadius; } inline void Location::clear_radius() { if (_internal_has_radius()) { @@ -5673,7 +7736,7 @@ inline bool Location::has_accuracy() const { return _internal_has_accuracy(); } inline void Location::set_has_accuracy() { - _impl_._oneof_case_[5] = kAccuracy; + _impl_._oneof_case_[17] = kAccuracy; } inline void Location::clear_accuracy() { if (_internal_has_accuracy()) { @@ -5711,7 +7774,7 @@ inline bool Location::has_time() const { return _internal_has_time(); } inline void Location::set_has_time() { - _impl_._oneof_case_[6] = kTime; + _impl_._oneof_case_[18] = kTime; } inline void Location::clear_time() { if (_internal_has_time()) { @@ -5742,46 +7805,366 @@ inline void Location::set_time(double value) { } // bool skip_ranking_candidates = 21; +inline bool Location::_internal_has_skip_ranking_candidates() const { + return has_skip_ranking_candidates_case() == kSkipRankingCandidates; +} +inline bool Location::has_skip_ranking_candidates() const { + return _internal_has_skip_ranking_candidates(); +} +inline void Location::set_has_skip_ranking_candidates() { + _impl_._oneof_case_[19] = kSkipRankingCandidates; +} inline void Location::clear_skip_ranking_candidates() { - _impl_.skip_ranking_candidates_ = false; + if (_internal_has_skip_ranking_candidates()) { + _impl_.has_skip_ranking_candidates_.skip_ranking_candidates_ = false; + clear_has_has_skip_ranking_candidates(); + } } inline bool Location::_internal_skip_ranking_candidates() const { - return _impl_.skip_ranking_candidates_; + if (_internal_has_skip_ranking_candidates()) { + return _impl_.has_skip_ranking_candidates_.skip_ranking_candidates_; + } + return false; +} +inline void Location::_internal_set_skip_ranking_candidates(bool value) { + if (!_internal_has_skip_ranking_candidates()) { + clear_has_skip_ranking_candidates(); + set_has_skip_ranking_candidates(); + } + _impl_.has_skip_ranking_candidates_.skip_ranking_candidates_ = value; } inline bool Location::skip_ranking_candidates() const { // @@protoc_insertion_point(field_get:valhalla.Location.skip_ranking_candidates) return _internal_skip_ranking_candidates(); } -inline void Location::_internal_set_skip_ranking_candidates(bool value) { - - _impl_.skip_ranking_candidates_ = value; -} inline void Location::set_skip_ranking_candidates(bool value) { _internal_set_skip_ranking_candidates(value); // @@protoc_insertion_point(field_set:valhalla.Location.skip_ranking_candidates) } -// .valhalla.Location.PreferredSide preferred_side = 22; +// repeated .valhalla.Location.PathEdge path_edges = 22; +inline int Location::_internal_path_edges_size() const { + return _impl_.path_edges_.size(); +} +inline int Location::path_edges_size() const { + return _internal_path_edges_size(); +} +inline void Location::clear_path_edges() { + _impl_.path_edges_.Clear(); +} +inline ::valhalla::Location_PathEdge* Location::mutable_path_edges(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.Location.path_edges) + return _impl_.path_edges_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >* +Location::mutable_path_edges() { + // @@protoc_insertion_point(field_mutable_list:valhalla.Location.path_edges) + return &_impl_.path_edges_; +} +inline const ::valhalla::Location_PathEdge& Location::_internal_path_edges(int index) const { + return _impl_.path_edges_.Get(index); +} +inline const ::valhalla::Location_PathEdge& Location::path_edges(int index) const { + // @@protoc_insertion_point(field_get:valhalla.Location.path_edges) + return _internal_path_edges(index); +} +inline ::valhalla::Location_PathEdge* Location::_internal_add_path_edges() { + return _impl_.path_edges_.Add(); +} +inline ::valhalla::Location_PathEdge* Location::add_path_edges() { + ::valhalla::Location_PathEdge* _add = _internal_add_path_edges(); + // @@protoc_insertion_point(field_add:valhalla.Location.path_edges) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >& +Location::path_edges() const { + // @@protoc_insertion_point(field_list:valhalla.Location.path_edges) + return _impl_.path_edges_; +} + +// repeated .valhalla.Location.PathEdge filtered_edges = 23; +inline int Location::_internal_filtered_edges_size() const { + return _impl_.filtered_edges_.size(); +} +inline int Location::filtered_edges_size() const { + return _internal_filtered_edges_size(); +} +inline void Location::clear_filtered_edges() { + _impl_.filtered_edges_.Clear(); +} +inline ::valhalla::Location_PathEdge* Location::mutable_filtered_edges(int index) { + // @@protoc_insertion_point(field_mutable:valhalla.Location.filtered_edges) + return _impl_.filtered_edges_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >* +Location::mutable_filtered_edges() { + // @@protoc_insertion_point(field_mutable_list:valhalla.Location.filtered_edges) + return &_impl_.filtered_edges_; +} +inline const ::valhalla::Location_PathEdge& Location::_internal_filtered_edges(int index) const { + return _impl_.filtered_edges_.Get(index); +} +inline const ::valhalla::Location_PathEdge& Location::filtered_edges(int index) const { + // @@protoc_insertion_point(field_get:valhalla.Location.filtered_edges) + return _internal_filtered_edges(index); +} +inline ::valhalla::Location_PathEdge* Location::_internal_add_filtered_edges() { + return _impl_.filtered_edges_.Add(); +} +inline ::valhalla::Location_PathEdge* Location::add_filtered_edges() { + ::valhalla::Location_PathEdge* _add = _internal_add_filtered_edges(); + // @@protoc_insertion_point(field_add:valhalla.Location.filtered_edges) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::valhalla::Location_PathEdge >& +Location::filtered_edges() const { + // @@protoc_insertion_point(field_list:valhalla.Location.filtered_edges) + return _impl_.filtered_edges_; +} + +// uint32 original_index = 24; +inline bool Location::_internal_has_original_index() const { + return has_original_index_case() == kOriginalIndex; +} +inline bool Location::has_original_index() const { + return _internal_has_original_index(); +} +inline void Location::set_has_original_index() { + _impl_._oneof_case_[20] = kOriginalIndex; +} +inline void Location::clear_original_index() { + if (_internal_has_original_index()) { + _impl_.has_original_index_.original_index_ = 0u; + clear_has_has_original_index(); + } +} +inline uint32_t Location::_internal_original_index() const { + if (_internal_has_original_index()) { + return _impl_.has_original_index_.original_index_; + } + return 0u; +} +inline void Location::_internal_set_original_index(uint32_t value) { + if (!_internal_has_original_index()) { + clear_has_original_index(); + set_has_original_index(); + } + _impl_.has_original_index_.original_index_ = value; +} +inline uint32_t Location::original_index() const { + // @@protoc_insertion_point(field_get:valhalla.Location.original_index) + return _internal_original_index(); +} +inline void Location::set_original_index(uint32_t value) { + _internal_set_original_index(value); + // @@protoc_insertion_point(field_set:valhalla.Location.original_index) +} + +// .valhalla.LatLng projected_ll = 25; +inline bool Location::_internal_has_projected_ll() const { + return this != internal_default_instance() && _impl_.projected_ll_ != nullptr; +} +inline bool Location::has_projected_ll() const { + return _internal_has_projected_ll(); +} +inline void Location::clear_projected_ll() { + if (GetArenaForAllocation() == nullptr && _impl_.projected_ll_ != nullptr) { + delete _impl_.projected_ll_; + } + _impl_.projected_ll_ = nullptr; +} +inline const ::valhalla::LatLng& Location::_internal_projected_ll() const { + const ::valhalla::LatLng* p = _impl_.projected_ll_; + return p != nullptr ? *p : reinterpret_cast( + ::valhalla::_LatLng_default_instance_); +} +inline const ::valhalla::LatLng& Location::projected_ll() const { + // @@protoc_insertion_point(field_get:valhalla.Location.projected_ll) + return _internal_projected_ll(); +} +inline void Location::unsafe_arena_set_allocated_projected_ll( + ::valhalla::LatLng* projected_ll) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.projected_ll_); + } + _impl_.projected_ll_ = projected_ll; + if (projected_ll) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Location.projected_ll) +} +inline ::valhalla::LatLng* Location::release_projected_ll() { + + ::valhalla::LatLng* temp = _impl_.projected_ll_; + _impl_.projected_ll_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::valhalla::LatLng* Location::unsafe_arena_release_projected_ll() { + // @@protoc_insertion_point(field_release:valhalla.Location.projected_ll) + + ::valhalla::LatLng* temp = _impl_.projected_ll_; + _impl_.projected_ll_ = nullptr; + return temp; +} +inline ::valhalla::LatLng* Location::_internal_mutable_projected_ll() { + + if (_impl_.projected_ll_ == nullptr) { + auto* p = CreateMaybeMessage<::valhalla::LatLng>(GetArenaForAllocation()); + _impl_.projected_ll_ = p; + } + return _impl_.projected_ll_; +} +inline ::valhalla::LatLng* Location::mutable_projected_ll() { + ::valhalla::LatLng* _msg = _internal_mutable_projected_ll(); + // @@protoc_insertion_point(field_mutable:valhalla.Location.projected_ll) + return _msg; +} +inline void Location::set_allocated_projected_ll(::valhalla::LatLng* projected_ll) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.projected_ll_; + } + if (projected_ll) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(projected_ll); + if (message_arena != submessage_arena) { + projected_ll = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, projected_ll, submessage_arena); + } + + } else { + + } + _impl_.projected_ll_ = projected_ll; + // @@protoc_insertion_point(field_set_allocated:valhalla.Location.projected_ll) +} + +// uint32 leg_shape_index = 35; +inline bool Location::_internal_has_leg_shape_index() const { + return has_leg_shape_index_case() == kLegShapeIndex; +} +inline bool Location::has_leg_shape_index() const { + return _internal_has_leg_shape_index(); +} +inline void Location::set_has_leg_shape_index() { + _impl_._oneof_case_[21] = kLegShapeIndex; +} +inline void Location::clear_leg_shape_index() { + if (_internal_has_leg_shape_index()) { + _impl_.has_leg_shape_index_.leg_shape_index_ = 0u; + clear_has_has_leg_shape_index(); + } +} +inline uint32_t Location::_internal_leg_shape_index() const { + if (_internal_has_leg_shape_index()) { + return _impl_.has_leg_shape_index_.leg_shape_index_; + } + return 0u; +} +inline void Location::_internal_set_leg_shape_index(uint32_t value) { + if (!_internal_has_leg_shape_index()) { + clear_has_leg_shape_index(); + set_has_leg_shape_index(); + } + _impl_.has_leg_shape_index_.leg_shape_index_ = value; +} +inline uint32_t Location::leg_shape_index() const { + // @@protoc_insertion_point(field_get:valhalla.Location.leg_shape_index) + return _internal_leg_shape_index(); +} +inline void Location::set_leg_shape_index(uint32_t value) { + _internal_set_leg_shape_index(value); + // @@protoc_insertion_point(field_set:valhalla.Location.leg_shape_index) +} + +// double distance_from_leg_origin = 36; +inline bool Location::_internal_has_distance_from_leg_origin() const { + return has_distance_from_leg_origin_case() == kDistanceFromLegOrigin; +} +inline bool Location::has_distance_from_leg_origin() const { + return _internal_has_distance_from_leg_origin(); +} +inline void Location::set_has_distance_from_leg_origin() { + _impl_._oneof_case_[22] = kDistanceFromLegOrigin; +} +inline void Location::clear_distance_from_leg_origin() { + if (_internal_has_distance_from_leg_origin()) { + _impl_.has_distance_from_leg_origin_.distance_from_leg_origin_ = 0; + clear_has_has_distance_from_leg_origin(); + } +} +inline double Location::_internal_distance_from_leg_origin() const { + if (_internal_has_distance_from_leg_origin()) { + return _impl_.has_distance_from_leg_origin_.distance_from_leg_origin_; + } + return 0; +} +inline void Location::_internal_set_distance_from_leg_origin(double value) { + if (!_internal_has_distance_from_leg_origin()) { + clear_has_distance_from_leg_origin(); + set_has_distance_from_leg_origin(); + } + _impl_.has_distance_from_leg_origin_.distance_from_leg_origin_ = value; +} +inline double Location::distance_from_leg_origin() const { + // @@protoc_insertion_point(field_get:valhalla.Location.distance_from_leg_origin) + return _internal_distance_from_leg_origin(); +} +inline void Location::set_distance_from_leg_origin(double value) { + _internal_set_distance_from_leg_origin(value); + // @@protoc_insertion_point(field_set:valhalla.Location.distance_from_leg_origin) +} + +// .valhalla.Location.PreferredSide preferred_side = 26; +inline bool Location::_internal_has_preferred_side() const { + return has_preferred_side_case() == kPreferredSide; +} +inline bool Location::has_preferred_side() const { + return _internal_has_preferred_side(); +} +inline void Location::set_has_preferred_side() { + _impl_._oneof_case_[23] = kPreferredSide; +} inline void Location::clear_preferred_side() { - _impl_.preferred_side_ = 0; + if (_internal_has_preferred_side()) { + _impl_.has_preferred_side_.preferred_side_ = 0; + clear_has_has_preferred_side(); + } } inline ::valhalla::Location_PreferredSide Location::_internal_preferred_side() const { - return static_cast< ::valhalla::Location_PreferredSide >(_impl_.preferred_side_); + if (_internal_has_preferred_side()) { + return static_cast< ::valhalla::Location_PreferredSide >(_impl_.has_preferred_side_.preferred_side_); + } + return static_cast< ::valhalla::Location_PreferredSide >(0); } inline ::valhalla::Location_PreferredSide Location::preferred_side() const { // @@protoc_insertion_point(field_get:valhalla.Location.preferred_side) return _internal_preferred_side(); } inline void Location::_internal_set_preferred_side(::valhalla::Location_PreferredSide value) { - - _impl_.preferred_side_ = value; + if (!_internal_has_preferred_side()) { + clear_has_preferred_side(); + set_has_preferred_side(); + } + _impl_.has_preferred_side_.preferred_side_ = value; } inline void Location::set_preferred_side(::valhalla::Location_PreferredSide value) { _internal_set_preferred_side(value); // @@protoc_insertion_point(field_set:valhalla.Location.preferred_side) } -// .valhalla.LatLng display_ll = 23; +// .valhalla.LatLng display_ll = 27; inline bool Location::_internal_has_display_ll() const { return this != internal_default_instance() && _impl_.display_ll_ != nullptr; } @@ -5871,7 +8254,7 @@ inline void Location::set_allocated_display_ll(::valhalla::LatLng* display_ll) { // @@protoc_insertion_point(field_set_allocated:valhalla.Location.display_ll) } -// uint32 search_cutoff = 24; +// uint32 search_cutoff = 28; inline bool Location::_internal_has_search_cutoff() const { return has_search_cutoff_case() == kSearchCutoff; } @@ -5879,7 +8262,7 @@ inline bool Location::has_search_cutoff() const { return _internal_has_search_cutoff(); } inline void Location::set_has_search_cutoff() { - _impl_._oneof_case_[7] = kSearchCutoff; + _impl_._oneof_case_[24] = kSearchCutoff; } inline void Location::clear_search_cutoff() { if (_internal_has_search_cutoff()) { @@ -5909,7 +8292,7 @@ inline void Location::set_search_cutoff(uint32_t value) { // @@protoc_insertion_point(field_set:valhalla.Location.search_cutoff) } -// uint32 street_side_tolerance = 25; +// uint32 street_side_tolerance = 29; inline bool Location::_internal_has_street_side_tolerance() const { return has_street_side_tolerance_case() == kStreetSideTolerance; } @@ -5917,7 +8300,7 @@ inline bool Location::has_street_side_tolerance() const { return _internal_has_street_side_tolerance(); } inline void Location::set_has_street_side_tolerance() { - _impl_._oneof_case_[8] = kStreetSideTolerance; + _impl_._oneof_case_[25] = kStreetSideTolerance; } inline void Location::clear_street_side_tolerance() { if (_internal_has_street_side_tolerance()) { @@ -5947,7 +8330,83 @@ inline void Location::set_street_side_tolerance(uint32_t value) { // @@protoc_insertion_point(field_set:valhalla.Location.street_side_tolerance) } -// .valhalla.SearchFilter search_filter = 26; +// uint32 route_index = 30; +inline bool Location::_internal_has_route_index() const { + return has_route_index_case() == kRouteIndex; +} +inline bool Location::has_route_index() const { + return _internal_has_route_index(); +} +inline void Location::set_has_route_index() { + _impl_._oneof_case_[26] = kRouteIndex; +} +inline void Location::clear_route_index() { + if (_internal_has_route_index()) { + _impl_.has_route_index_.route_index_ = 0u; + clear_has_has_route_index(); + } +} +inline uint32_t Location::_internal_route_index() const { + if (_internal_has_route_index()) { + return _impl_.has_route_index_.route_index_; + } + return 0u; +} +inline void Location::_internal_set_route_index(uint32_t value) { + if (!_internal_has_route_index()) { + clear_has_route_index(); + set_has_route_index(); + } + _impl_.has_route_index_.route_index_ = value; +} +inline uint32_t Location::route_index() const { + // @@protoc_insertion_point(field_get:valhalla.Location.route_index) + return _internal_route_index(); +} +inline void Location::set_route_index(uint32_t value) { + _internal_set_route_index(value); + // @@protoc_insertion_point(field_set:valhalla.Location.route_index) +} + +// uint32 waypoint_index = 31; +inline bool Location::_internal_has_waypoint_index() const { + return has_waypoint_index_case() == kWaypointIndex; +} +inline bool Location::has_waypoint_index() const { + return _internal_has_waypoint_index(); +} +inline void Location::set_has_waypoint_index() { + _impl_._oneof_case_[27] = kWaypointIndex; +} +inline void Location::clear_waypoint_index() { + if (_internal_has_waypoint_index()) { + _impl_.has_waypoint_index_.waypoint_index_ = 0u; + clear_has_has_waypoint_index(); + } +} +inline uint32_t Location::_internal_waypoint_index() const { + if (_internal_has_waypoint_index()) { + return _impl_.has_waypoint_index_.waypoint_index_; + } + return 0u; +} +inline void Location::_internal_set_waypoint_index(uint32_t value) { + if (!_internal_has_waypoint_index()) { + clear_has_waypoint_index(); + set_has_waypoint_index(); + } + _impl_.has_waypoint_index_.waypoint_index_ = value; +} +inline uint32_t Location::waypoint_index() const { + // @@protoc_insertion_point(field_get:valhalla.Location.waypoint_index) + return _internal_waypoint_index(); +} +inline void Location::set_waypoint_index(uint32_t value) { + _internal_set_waypoint_index(value); + // @@protoc_insertion_point(field_set:valhalla.Location.waypoint_index) +} + +// .valhalla.Location.SearchFilter search_filter = 32; inline bool Location::_internal_has_search_filter() const { return this != internal_default_instance() && _impl_.search_filter_ != nullptr; } @@ -5960,17 +8419,17 @@ inline void Location::clear_search_filter() { } _impl_.search_filter_ = nullptr; } -inline const ::valhalla::SearchFilter& Location::_internal_search_filter() const { - const ::valhalla::SearchFilter* p = _impl_.search_filter_; - return p != nullptr ? *p : reinterpret_cast( - ::valhalla::_SearchFilter_default_instance_); +inline const ::valhalla::Location_SearchFilter& Location::_internal_search_filter() const { + const ::valhalla::Location_SearchFilter* p = _impl_.search_filter_; + return p != nullptr ? *p : reinterpret_cast( + ::valhalla::_Location_SearchFilter_default_instance_); } -inline const ::valhalla::SearchFilter& Location::search_filter() const { +inline const ::valhalla::Location_SearchFilter& Location::search_filter() const { // @@protoc_insertion_point(field_get:valhalla.Location.search_filter) return _internal_search_filter(); } inline void Location::unsafe_arena_set_allocated_search_filter( - ::valhalla::SearchFilter* search_filter) { + ::valhalla::Location_SearchFilter* search_filter) { if (GetArenaForAllocation() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.search_filter_); } @@ -5982,9 +8441,9 @@ inline void Location::unsafe_arena_set_allocated_search_filter( } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Location.search_filter) } -inline ::valhalla::SearchFilter* Location::release_search_filter() { +inline ::valhalla::Location_SearchFilter* Location::release_search_filter() { - ::valhalla::SearchFilter* temp = _impl_.search_filter_; + ::valhalla::Location_SearchFilter* temp = _impl_.search_filter_; _impl_.search_filter_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); @@ -5997,27 +8456,27 @@ inline ::valhalla::SearchFilter* Location::release_search_filter() { #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline ::valhalla::SearchFilter* Location::unsafe_arena_release_search_filter() { +inline ::valhalla::Location_SearchFilter* Location::unsafe_arena_release_search_filter() { // @@protoc_insertion_point(field_release:valhalla.Location.search_filter) - ::valhalla::SearchFilter* temp = _impl_.search_filter_; + ::valhalla::Location_SearchFilter* temp = _impl_.search_filter_; _impl_.search_filter_ = nullptr; return temp; } -inline ::valhalla::SearchFilter* Location::_internal_mutable_search_filter() { +inline ::valhalla::Location_SearchFilter* Location::_internal_mutable_search_filter() { if (_impl_.search_filter_ == nullptr) { - auto* p = CreateMaybeMessage<::valhalla::SearchFilter>(GetArenaForAllocation()); + auto* p = CreateMaybeMessage<::valhalla::Location_SearchFilter>(GetArenaForAllocation()); _impl_.search_filter_ = p; } return _impl_.search_filter_; } -inline ::valhalla::SearchFilter* Location::mutable_search_filter() { - ::valhalla::SearchFilter* _msg = _internal_mutable_search_filter(); +inline ::valhalla::Location_SearchFilter* Location::mutable_search_filter() { + ::valhalla::Location_SearchFilter* _msg = _internal_mutable_search_filter(); // @@protoc_insertion_point(field_mutable:valhalla.Location.search_filter) return _msg; } -inline void Location::set_allocated_search_filter(::valhalla::SearchFilter* search_filter) { +inline void Location::set_allocated_search_filter(::valhalla::Location_SearchFilter* search_filter) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { delete _impl_.search_filter_; @@ -6037,7 +8496,7 @@ inline void Location::set_allocated_search_filter(::valhalla::SearchFilter* sear // @@protoc_insertion_point(field_set_allocated:valhalla.Location.search_filter) } -// uint32 street_side_max_distance = 27; +// uint32 street_side_max_distance = 33; inline bool Location::_internal_has_street_side_max_distance() const { return has_street_side_max_distance_case() == kStreetSideMaxDistance; } @@ -6045,7 +8504,7 @@ inline bool Location::has_street_side_max_distance() const { return _internal_has_street_side_max_distance(); } inline void Location::set_has_street_side_max_distance() { - _impl_._oneof_case_[9] = kStreetSideMaxDistance; + _impl_._oneof_case_[28] = kStreetSideMaxDistance; } inline void Location::clear_street_side_max_distance() { if (_internal_has_street_side_max_distance()) { @@ -6075,7 +8534,7 @@ inline void Location::set_street_side_max_distance(uint32_t value) { // @@protoc_insertion_point(field_set:valhalla.Location.street_side_max_distance) } -// int32 preferred_layer = 28; +// int32 preferred_layer = 34; inline bool Location::_internal_has_preferred_layer() const { return has_preferred_layer_case() == kPreferredLayer; } @@ -6083,7 +8542,7 @@ inline bool Location::has_preferred_layer() const { return _internal_has_preferred_layer(); } inline void Location::set_has_preferred_layer() { - _impl_._oneof_case_[10] = kPreferredLayer; + _impl_._oneof_case_[29] = kPreferredLayer; } inline void Location::clear_preferred_layer() { if (_internal_has_preferred_layer()) { @@ -6113,232 +8572,308 @@ inline void Location::set_preferred_layer(int32_t value) { // @@protoc_insertion_point(field_set:valhalla.Location.preferred_layer) } -// float waiting_secs = 29; -inline void Location::clear_waiting_secs() { - _impl_.waiting_secs_ = 0; +inline bool Location::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; } -inline float Location::_internal_waiting_secs() const { - return _impl_.waiting_secs_; +inline void Location::clear_has_has_type() { + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; } -inline float Location::waiting_secs() const { - // @@protoc_insertion_point(field_get:valhalla.Location.waiting_secs) - return _internal_waiting_secs(); +inline bool Location::has_has_heading() const { + return has_heading_case() != HAS_HEADING_NOT_SET; } -inline void Location::_internal_set_waiting_secs(float value) { - - _impl_.waiting_secs_ = value; +inline void Location::clear_has_has_heading() { + _impl_._oneof_case_[1] = HAS_HEADING_NOT_SET; } -inline void Location::set_waiting_secs(float value) { - _internal_set_waiting_secs(value); - // @@protoc_insertion_point(field_set:valhalla.Location.waiting_secs) +inline bool Location::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; } - -// .valhalla.Correlation correlation = 90; -inline bool Location::_internal_has_correlation() const { - return this != internal_default_instance() && _impl_.correlation_ != nullptr; +inline void Location::clear_has_has_name() { + _impl_._oneof_case_[2] = HAS_NAME_NOT_SET; } -inline bool Location::has_correlation() const { - return _internal_has_correlation(); +inline bool Location::has_has_street() const { + return has_street_case() != HAS_STREET_NOT_SET; } -inline void Location::clear_correlation() { - if (GetArenaForAllocation() == nullptr && _impl_.correlation_ != nullptr) { - delete _impl_.correlation_; - } - _impl_.correlation_ = nullptr; +inline void Location::clear_has_has_street() { + _impl_._oneof_case_[3] = HAS_STREET_NOT_SET; } -inline const ::valhalla::Correlation& Location::_internal_correlation() const { - const ::valhalla::Correlation* p = _impl_.correlation_; - return p != nullptr ? *p : reinterpret_cast( - ::valhalla::_Correlation_default_instance_); +inline bool Location::has_has_city() const { + return has_city_case() != HAS_CITY_NOT_SET; } -inline const ::valhalla::Correlation& Location::correlation() const { - // @@protoc_insertion_point(field_get:valhalla.Location.correlation) - return _internal_correlation(); +inline void Location::clear_has_has_city() { + _impl_._oneof_case_[4] = HAS_CITY_NOT_SET; } -inline void Location::unsafe_arena_set_allocated_correlation( - ::valhalla::Correlation* correlation) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.correlation_); - } - _impl_.correlation_ = correlation; - if (correlation) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:valhalla.Location.correlation) +inline bool Location::has_has_state() const { + return has_state_case() != HAS_STATE_NOT_SET; } -inline ::valhalla::Correlation* Location::release_correlation() { - - ::valhalla::Correlation* temp = _impl_.correlation_; - _impl_.correlation_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - if (GetArenaForAllocation() == nullptr) { delete old; } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return temp; +inline void Location::clear_has_has_state() { + _impl_._oneof_case_[5] = HAS_STATE_NOT_SET; } -inline ::valhalla::Correlation* Location::unsafe_arena_release_correlation() { - // @@protoc_insertion_point(field_release:valhalla.Location.correlation) - - ::valhalla::Correlation* temp = _impl_.correlation_; - _impl_.correlation_ = nullptr; - return temp; +inline bool Location::has_has_postal_code() const { + return has_postal_code_case() != HAS_POSTAL_CODE_NOT_SET; } -inline ::valhalla::Correlation* Location::_internal_mutable_correlation() { - - if (_impl_.correlation_ == nullptr) { - auto* p = CreateMaybeMessage<::valhalla::Correlation>(GetArenaForAllocation()); - _impl_.correlation_ = p; - } - return _impl_.correlation_; +inline void Location::clear_has_has_postal_code() { + _impl_._oneof_case_[6] = HAS_POSTAL_CODE_NOT_SET; +} +inline bool Location::has_has_country() const { + return has_country_case() != HAS_COUNTRY_NOT_SET; +} +inline void Location::clear_has_has_country() { + _impl_._oneof_case_[7] = HAS_COUNTRY_NOT_SET; +} +inline bool Location::has_has_phone() const { + return has_phone_case() != HAS_PHONE_NOT_SET; +} +inline void Location::clear_has_has_phone() { + _impl_._oneof_case_[8] = HAS_PHONE_NOT_SET; +} +inline bool Location::has_has_url() const { + return has_url_case() != HAS_URL_NOT_SET; } -inline ::valhalla::Correlation* Location::mutable_correlation() { - ::valhalla::Correlation* _msg = _internal_mutable_correlation(); - // @@protoc_insertion_point(field_mutable:valhalla.Location.correlation) - return _msg; +inline void Location::clear_has_has_url() { + _impl_._oneof_case_[9] = HAS_URL_NOT_SET; } -inline void Location::set_allocated_correlation(::valhalla::Correlation* correlation) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete _impl_.correlation_; - } - if (correlation) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(correlation); - if (message_arena != submessage_arena) { - correlation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, correlation, submessage_arena); - } - - } else { - - } - _impl_.correlation_ = correlation; - // @@protoc_insertion_point(field_set_allocated:valhalla.Location.correlation) +inline bool Location::has_has_date_time() const { + return has_date_time_case() != HAS_DATE_TIME_NOT_SET; } - -inline bool Location::has_has_heading() const { - return has_heading_case() != HAS_HEADING_NOT_SET; +inline void Location::clear_has_has_date_time() { + _impl_._oneof_case_[10] = HAS_DATE_TIME_NOT_SET; } -inline void Location::clear_has_has_heading() { - _impl_._oneof_case_[0] = HAS_HEADING_NOT_SET; +inline bool Location::has_has_side_of_street() const { + return has_side_of_street_case() != HAS_SIDE_OF_STREET_NOT_SET; +} +inline void Location::clear_has_has_side_of_street() { + _impl_._oneof_case_[11] = HAS_SIDE_OF_STREET_NOT_SET; } inline bool Location::has_has_heading_tolerance() const { return has_heading_tolerance_case() != HAS_HEADING_TOLERANCE_NOT_SET; } inline void Location::clear_has_has_heading_tolerance() { - _impl_._oneof_case_[1] = HAS_HEADING_TOLERANCE_NOT_SET; + _impl_._oneof_case_[12] = HAS_HEADING_TOLERANCE_NOT_SET; } inline bool Location::has_has_node_snap_tolerance() const { return has_node_snap_tolerance_case() != HAS_NODE_SNAP_TOLERANCE_NOT_SET; } inline void Location::clear_has_has_node_snap_tolerance() { - _impl_._oneof_case_[2] = HAS_NODE_SNAP_TOLERANCE_NOT_SET; + _impl_._oneof_case_[13] = HAS_NODE_SNAP_TOLERANCE_NOT_SET; +} +inline bool Location::has_has_way_id() const { + return has_way_id_case() != HAS_WAY_ID_NOT_SET; +} +inline void Location::clear_has_has_way_id() { + _impl_._oneof_case_[14] = HAS_WAY_ID_NOT_SET; } inline bool Location::has_has_minimum_reachability() const { return has_minimum_reachability_case() != HAS_MINIMUM_REACHABILITY_NOT_SET; } inline void Location::clear_has_has_minimum_reachability() { - _impl_._oneof_case_[3] = HAS_MINIMUM_REACHABILITY_NOT_SET; + _impl_._oneof_case_[15] = HAS_MINIMUM_REACHABILITY_NOT_SET; } inline bool Location::has_has_radius() const { return has_radius_case() != HAS_RADIUS_NOT_SET; } inline void Location::clear_has_has_radius() { - _impl_._oneof_case_[4] = HAS_RADIUS_NOT_SET; + _impl_._oneof_case_[16] = HAS_RADIUS_NOT_SET; } inline bool Location::has_has_accuracy() const { return has_accuracy_case() != HAS_ACCURACY_NOT_SET; } inline void Location::clear_has_has_accuracy() { - _impl_._oneof_case_[5] = HAS_ACCURACY_NOT_SET; + _impl_._oneof_case_[17] = HAS_ACCURACY_NOT_SET; } inline bool Location::has_has_time() const { return has_time_case() != HAS_TIME_NOT_SET; } inline void Location::clear_has_has_time() { - _impl_._oneof_case_[6] = HAS_TIME_NOT_SET; + _impl_._oneof_case_[18] = HAS_TIME_NOT_SET; +} +inline bool Location::has_has_skip_ranking_candidates() const { + return has_skip_ranking_candidates_case() != HAS_SKIP_RANKING_CANDIDATES_NOT_SET; +} +inline void Location::clear_has_has_skip_ranking_candidates() { + _impl_._oneof_case_[19] = HAS_SKIP_RANKING_CANDIDATES_NOT_SET; +} +inline bool Location::has_has_original_index() const { + return has_original_index_case() != HAS_ORIGINAL_INDEX_NOT_SET; +} +inline void Location::clear_has_has_original_index() { + _impl_._oneof_case_[20] = HAS_ORIGINAL_INDEX_NOT_SET; +} +inline bool Location::has_has_leg_shape_index() const { + return has_leg_shape_index_case() != HAS_LEG_SHAPE_INDEX_NOT_SET; +} +inline void Location::clear_has_has_leg_shape_index() { + _impl_._oneof_case_[21] = HAS_LEG_SHAPE_INDEX_NOT_SET; +} +inline bool Location::has_has_distance_from_leg_origin() const { + return has_distance_from_leg_origin_case() != HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET; +} +inline void Location::clear_has_has_distance_from_leg_origin() { + _impl_._oneof_case_[22] = HAS_DISTANCE_FROM_LEG_ORIGIN_NOT_SET; +} +inline bool Location::has_has_preferred_side() const { + return has_preferred_side_case() != HAS_PREFERRED_SIDE_NOT_SET; +} +inline void Location::clear_has_has_preferred_side() { + _impl_._oneof_case_[23] = HAS_PREFERRED_SIDE_NOT_SET; } inline bool Location::has_has_search_cutoff() const { return has_search_cutoff_case() != HAS_SEARCH_CUTOFF_NOT_SET; } inline void Location::clear_has_has_search_cutoff() { - _impl_._oneof_case_[7] = HAS_SEARCH_CUTOFF_NOT_SET; + _impl_._oneof_case_[24] = HAS_SEARCH_CUTOFF_NOT_SET; } inline bool Location::has_has_street_side_tolerance() const { return has_street_side_tolerance_case() != HAS_STREET_SIDE_TOLERANCE_NOT_SET; } inline void Location::clear_has_has_street_side_tolerance() { - _impl_._oneof_case_[8] = HAS_STREET_SIDE_TOLERANCE_NOT_SET; + _impl_._oneof_case_[25] = HAS_STREET_SIDE_TOLERANCE_NOT_SET; +} +inline bool Location::has_has_route_index() const { + return has_route_index_case() != HAS_ROUTE_INDEX_NOT_SET; +} +inline void Location::clear_has_has_route_index() { + _impl_._oneof_case_[26] = HAS_ROUTE_INDEX_NOT_SET; +} +inline bool Location::has_has_waypoint_index() const { + return has_waypoint_index_case() != HAS_WAYPOINT_INDEX_NOT_SET; +} +inline void Location::clear_has_has_waypoint_index() { + _impl_._oneof_case_[27] = HAS_WAYPOINT_INDEX_NOT_SET; } inline bool Location::has_has_street_side_max_distance() const { return has_street_side_max_distance_case() != HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET; } inline void Location::clear_has_has_street_side_max_distance() { - _impl_._oneof_case_[9] = HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET; + _impl_._oneof_case_[28] = HAS_STREET_SIDE_MAX_DISTANCE_NOT_SET; } inline bool Location::has_has_preferred_layer() const { return has_preferred_layer_case() != HAS_PREFERRED_LAYER_NOT_SET; } inline void Location::clear_has_has_preferred_layer() { - _impl_._oneof_case_[10] = HAS_PREFERRED_LAYER_NOT_SET; + _impl_._oneof_case_[29] = HAS_PREFERRED_LAYER_NOT_SET; +} +inline Location::HasTypeCase Location::has_type_case() const { + return Location::HasTypeCase(_impl_._oneof_case_[0]); } inline Location::HasHeadingCase Location::has_heading_case() const { - return Location::HasHeadingCase(_impl_._oneof_case_[0]); + return Location::HasHeadingCase(_impl_._oneof_case_[1]); +} +inline Location::HasNameCase Location::has_name_case() const { + return Location::HasNameCase(_impl_._oneof_case_[2]); +} +inline Location::HasStreetCase Location::has_street_case() const { + return Location::HasStreetCase(_impl_._oneof_case_[3]); +} +inline Location::HasCityCase Location::has_city_case() const { + return Location::HasCityCase(_impl_._oneof_case_[4]); +} +inline Location::HasStateCase Location::has_state_case() const { + return Location::HasStateCase(_impl_._oneof_case_[5]); +} +inline Location::HasPostalCodeCase Location::has_postal_code_case() const { + return Location::HasPostalCodeCase(_impl_._oneof_case_[6]); +} +inline Location::HasCountryCase Location::has_country_case() const { + return Location::HasCountryCase(_impl_._oneof_case_[7]); +} +inline Location::HasPhoneCase Location::has_phone_case() const { + return Location::HasPhoneCase(_impl_._oneof_case_[8]); +} +inline Location::HasUrlCase Location::has_url_case() const { + return Location::HasUrlCase(_impl_._oneof_case_[9]); +} +inline Location::HasDateTimeCase Location::has_date_time_case() const { + return Location::HasDateTimeCase(_impl_._oneof_case_[10]); +} +inline Location::HasSideOfStreetCase Location::has_side_of_street_case() const { + return Location::HasSideOfStreetCase(_impl_._oneof_case_[11]); } inline Location::HasHeadingToleranceCase Location::has_heading_tolerance_case() const { - return Location::HasHeadingToleranceCase(_impl_._oneof_case_[1]); + return Location::HasHeadingToleranceCase(_impl_._oneof_case_[12]); } inline Location::HasNodeSnapToleranceCase Location::has_node_snap_tolerance_case() const { - return Location::HasNodeSnapToleranceCase(_impl_._oneof_case_[2]); + return Location::HasNodeSnapToleranceCase(_impl_._oneof_case_[13]); +} +inline Location::HasWayIdCase Location::has_way_id_case() const { + return Location::HasWayIdCase(_impl_._oneof_case_[14]); } inline Location::HasMinimumReachabilityCase Location::has_minimum_reachability_case() const { - return Location::HasMinimumReachabilityCase(_impl_._oneof_case_[3]); + return Location::HasMinimumReachabilityCase(_impl_._oneof_case_[15]); } inline Location::HasRadiusCase Location::has_radius_case() const { - return Location::HasRadiusCase(_impl_._oneof_case_[4]); + return Location::HasRadiusCase(_impl_._oneof_case_[16]); } inline Location::HasAccuracyCase Location::has_accuracy_case() const { - return Location::HasAccuracyCase(_impl_._oneof_case_[5]); + return Location::HasAccuracyCase(_impl_._oneof_case_[17]); } inline Location::HasTimeCase Location::has_time_case() const { - return Location::HasTimeCase(_impl_._oneof_case_[6]); + return Location::HasTimeCase(_impl_._oneof_case_[18]); +} +inline Location::HasSkipRankingCandidatesCase Location::has_skip_ranking_candidates_case() const { + return Location::HasSkipRankingCandidatesCase(_impl_._oneof_case_[19]); +} +inline Location::HasOriginalIndexCase Location::has_original_index_case() const { + return Location::HasOriginalIndexCase(_impl_._oneof_case_[20]); +} +inline Location::HasLegShapeIndexCase Location::has_leg_shape_index_case() const { + return Location::HasLegShapeIndexCase(_impl_._oneof_case_[21]); +} +inline Location::HasDistanceFromLegOriginCase Location::has_distance_from_leg_origin_case() const { + return Location::HasDistanceFromLegOriginCase(_impl_._oneof_case_[22]); +} +inline Location::HasPreferredSideCase Location::has_preferred_side_case() const { + return Location::HasPreferredSideCase(_impl_._oneof_case_[23]); } inline Location::HasSearchCutoffCase Location::has_search_cutoff_case() const { - return Location::HasSearchCutoffCase(_impl_._oneof_case_[7]); + return Location::HasSearchCutoffCase(_impl_._oneof_case_[24]); } inline Location::HasStreetSideToleranceCase Location::has_street_side_tolerance_case() const { - return Location::HasStreetSideToleranceCase(_impl_._oneof_case_[8]); + return Location::HasStreetSideToleranceCase(_impl_._oneof_case_[25]); +} +inline Location::HasRouteIndexCase Location::has_route_index_case() const { + return Location::HasRouteIndexCase(_impl_._oneof_case_[26]); +} +inline Location::HasWaypointIndexCase Location::has_waypoint_index_case() const { + return Location::HasWaypointIndexCase(_impl_._oneof_case_[27]); } inline Location::HasStreetSideMaxDistanceCase Location::has_street_side_max_distance_case() const { - return Location::HasStreetSideMaxDistanceCase(_impl_._oneof_case_[9]); + return Location::HasStreetSideMaxDistanceCase(_impl_._oneof_case_[28]); } inline Location::HasPreferredLayerCase Location::has_preferred_layer_case() const { - return Location::HasPreferredLayerCase(_impl_._oneof_case_[10]); + return Location::HasPreferredLayerCase(_impl_._oneof_case_[29]); } // ------------------------------------------------------------------- // TransitEgressInfo // string onestop_id = 1; +inline bool TransitEgressInfo::_internal_has_onestop_id() const { + return has_onestop_id_case() == kOnestopId; +} +inline bool TransitEgressInfo::has_onestop_id() const { + return _internal_has_onestop_id(); +} +inline void TransitEgressInfo::set_has_onestop_id() { + _impl_._oneof_case_[0] = kOnestopId; +} inline void TransitEgressInfo::clear_onestop_id() { - _impl_.onestop_id_.ClearToEmpty(); + if (_internal_has_onestop_id()) { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + clear_has_has_onestop_id(); + } } inline const std::string& TransitEgressInfo::onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitEgressInfo.onestop_id) return _internal_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitEgressInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitEgressInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitEgressInfo.onestop_id) } inline std::string* TransitEgressInfo::mutable_onestop_id() { @@ -6347,48 +8882,75 @@ inline std::string* TransitEgressInfo::mutable_onestop_id() { return _s; } inline const std::string& TransitEgressInfo::_internal_onestop_id() const { - return _impl_.onestop_id_.Get(); + if (_internal_has_onestop_id()) { + return _impl_.has_onestop_id_.onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitEgressInfo::_internal_set_onestop_id(const std::string& value) { - - _impl_.onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitEgressInfo::_internal_mutable_onestop_id() { - - return _impl_.onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + return _impl_.has_onestop_id_.onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitEgressInfo::release_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitEgressInfo.onestop_id) - return _impl_.onestop_id_.Release(); + if (_internal_has_onestop_id()) { + clear_has_has_onestop_id(); + return _impl_.has_onestop_id_.onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitEgressInfo::set_allocated_onestop_id(std::string* onestop_id) { - if (onestop_id != nullptr) { - - } else { - + if (has_has_onestop_id()) { + clear_has_onestop_id(); } - _impl_.onestop_id_.SetAllocated(onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.onestop_id_.IsDefault()) { - _impl_.onestop_id_.Set("", GetArenaForAllocation()); + if (onestop_id != nullptr) { + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitAllocated(onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitEgressInfo.onestop_id) } // string name = 2; +inline bool TransitEgressInfo::_internal_has_name() const { + return has_name_case() == kName; +} +inline bool TransitEgressInfo::has_name() const { + return _internal_has_name(); +} +inline void TransitEgressInfo::set_has_name() { + _impl_._oneof_case_[1] = kName; +} inline void TransitEgressInfo::clear_name() { - _impl_.name_.ClearToEmpty(); + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } } inline const std::string& TransitEgressInfo::name() const { // @@protoc_insertion_point(field_get:valhalla.TransitEgressInfo.name) return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitEgressInfo::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitEgressInfo::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitEgressInfo.name) } inline std::string* TransitEgressInfo::mutable_name() { @@ -6397,32 +8959,44 @@ inline std::string* TransitEgressInfo::mutable_name() { return _s; } inline const std::string& TransitEgressInfo::_internal_name() const { - return _impl_.name_.Get(); + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitEgressInfo::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitEgressInfo::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitEgressInfo::release_name() { // @@protoc_insertion_point(field_release:valhalla.TransitEgressInfo.name) - return _impl_.name_.Release(); + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } inline void TransitEgressInfo::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - + if (has_has_name()) { + clear_has_name(); } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitEgressInfo.name) } @@ -6516,23 +9090,56 @@ inline void TransitEgressInfo::set_allocated_ll(::valhalla::LatLng* ll) { // @@protoc_insertion_point(field_set_allocated:valhalla.TransitEgressInfo.ll) } +inline bool TransitEgressInfo::has_has_onestop_id() const { + return has_onestop_id_case() != HAS_ONESTOP_ID_NOT_SET; +} +inline void TransitEgressInfo::clear_has_has_onestop_id() { + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} +inline bool TransitEgressInfo::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; +} +inline void TransitEgressInfo::clear_has_has_name() { + _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; +} +inline TransitEgressInfo::HasOnestopIdCase TransitEgressInfo::has_onestop_id_case() const { + return TransitEgressInfo::HasOnestopIdCase(_impl_._oneof_case_[0]); +} +inline TransitEgressInfo::HasNameCase TransitEgressInfo::has_name_case() const { + return TransitEgressInfo::HasNameCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // TransitStationInfo // string onestop_id = 1; +inline bool TransitStationInfo::_internal_has_onestop_id() const { + return has_onestop_id_case() == kOnestopId; +} +inline bool TransitStationInfo::has_onestop_id() const { + return _internal_has_onestop_id(); +} +inline void TransitStationInfo::set_has_onestop_id() { + _impl_._oneof_case_[0] = kOnestopId; +} inline void TransitStationInfo::clear_onestop_id() { - _impl_.onestop_id_.ClearToEmpty(); + if (_internal_has_onestop_id()) { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + clear_has_has_onestop_id(); + } } inline const std::string& TransitStationInfo::onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitStationInfo.onestop_id) return _internal_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitStationInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitStationInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitStationInfo.onestop_id) } inline std::string* TransitStationInfo::mutable_onestop_id() { @@ -6541,48 +9148,75 @@ inline std::string* TransitStationInfo::mutable_onestop_id() { return _s; } inline const std::string& TransitStationInfo::_internal_onestop_id() const { - return _impl_.onestop_id_.Get(); + if (_internal_has_onestop_id()) { + return _impl_.has_onestop_id_.onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitStationInfo::_internal_set_onestop_id(const std::string& value) { - - _impl_.onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitStationInfo::_internal_mutable_onestop_id() { - - return _impl_.onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + return _impl_.has_onestop_id_.onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitStationInfo::release_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitStationInfo.onestop_id) - return _impl_.onestop_id_.Release(); + if (_internal_has_onestop_id()) { + clear_has_has_onestop_id(); + return _impl_.has_onestop_id_.onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitStationInfo::set_allocated_onestop_id(std::string* onestop_id) { - if (onestop_id != nullptr) { - - } else { - + if (has_has_onestop_id()) { + clear_has_onestop_id(); } - _impl_.onestop_id_.SetAllocated(onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.onestop_id_.IsDefault()) { - _impl_.onestop_id_.Set("", GetArenaForAllocation()); + if (onestop_id != nullptr) { + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitAllocated(onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitStationInfo.onestop_id) } // string name = 2; +inline bool TransitStationInfo::_internal_has_name() const { + return has_name_case() == kName; +} +inline bool TransitStationInfo::has_name() const { + return _internal_has_name(); +} +inline void TransitStationInfo::set_has_name() { + _impl_._oneof_case_[1] = kName; +} inline void TransitStationInfo::clear_name() { - _impl_.name_.ClearToEmpty(); + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } } inline const std::string& TransitStationInfo::name() const { // @@protoc_insertion_point(field_get:valhalla.TransitStationInfo.name) return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitStationInfo::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitStationInfo::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitStationInfo.name) } inline std::string* TransitStationInfo::mutable_name() { @@ -6591,32 +9225,44 @@ inline std::string* TransitStationInfo::mutable_name() { return _s; } inline const std::string& TransitStationInfo::_internal_name() const { - return _impl_.name_.Get(); + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitStationInfo::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitStationInfo::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitStationInfo::release_name() { // @@protoc_insertion_point(field_release:valhalla.TransitStationInfo.name) - return _impl_.name_.Release(); + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } inline void TransitStationInfo::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - + if (has_has_name()) { + clear_has_name(); } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitStationInfo.name) } @@ -6710,23 +9356,56 @@ inline void TransitStationInfo::set_allocated_ll(::valhalla::LatLng* ll) { // @@protoc_insertion_point(field_set_allocated:valhalla.TransitStationInfo.ll) } +inline bool TransitStationInfo::has_has_onestop_id() const { + return has_onestop_id_case() != HAS_ONESTOP_ID_NOT_SET; +} +inline void TransitStationInfo::clear_has_has_onestop_id() { + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} +inline bool TransitStationInfo::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; +} +inline void TransitStationInfo::clear_has_has_name() { + _impl_._oneof_case_[1] = HAS_NAME_NOT_SET; +} +inline TransitStationInfo::HasOnestopIdCase TransitStationInfo::has_onestop_id_case() const { + return TransitStationInfo::HasOnestopIdCase(_impl_._oneof_case_[0]); +} +inline TransitStationInfo::HasNameCase TransitStationInfo::has_name_case() const { + return TransitStationInfo::HasNameCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // BikeShareStationInfo // string name = 1; +inline bool BikeShareStationInfo::_internal_has_name() const { + return has_name_case() == kName; +} +inline bool BikeShareStationInfo::has_name() const { + return _internal_has_name(); +} +inline void BikeShareStationInfo::set_has_name() { + _impl_._oneof_case_[0] = kName; +} inline void BikeShareStationInfo::clear_name() { - _impl_.name_.ClearToEmpty(); + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } } inline const std::string& BikeShareStationInfo::name() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.name) return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void BikeShareStationInfo::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void BikeShareStationInfo::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.name) } inline std::string* BikeShareStationInfo::mutable_name() { @@ -6735,48 +9414,75 @@ inline std::string* BikeShareStationInfo::mutable_name() { return _s; } inline const std::string& BikeShareStationInfo::_internal_name() const { - return _impl_.name_.Get(); + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void BikeShareStationInfo::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::release_name() { // @@protoc_insertion_point(field_release:valhalla.BikeShareStationInfo.name) - return _impl_.name_.Release(); + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } inline void BikeShareStationInfo::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - + if (has_has_name()) { + clear_has_name(); } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.BikeShareStationInfo.name) } // string ref = 2; +inline bool BikeShareStationInfo::_internal_has_ref() const { + return has_ref_case() == kRef; +} +inline bool BikeShareStationInfo::has_ref() const { + return _internal_has_ref(); +} +inline void BikeShareStationInfo::set_has_ref() { + _impl_._oneof_case_[1] = kRef; +} inline void BikeShareStationInfo::clear_ref() { - _impl_.ref_.ClearToEmpty(); + if (_internal_has_ref()) { + _impl_.has_ref_.ref_.Destroy(); + clear_has_has_ref(); + } } inline const std::string& BikeShareStationInfo::ref() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.ref) return _internal_ref(); } template -inline PROTOBUF_ALWAYS_INLINE -void BikeShareStationInfo::set_ref(ArgT0&& arg0, ArgT... args) { - - _impl_.ref_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void BikeShareStationInfo::set_ref(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_ref()) { + clear_has_ref(); + set_has_ref(); + _impl_.has_ref_.ref_.InitDefault(); + } + _impl_.has_ref_.ref_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.ref) } inline std::string* BikeShareStationInfo::mutable_ref() { @@ -6785,68 +9491,113 @@ inline std::string* BikeShareStationInfo::mutable_ref() { return _s; } inline const std::string& BikeShareStationInfo::_internal_ref() const { - return _impl_.ref_.Get(); + if (_internal_has_ref()) { + return _impl_.has_ref_.ref_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void BikeShareStationInfo::_internal_set_ref(const std::string& value) { - - _impl_.ref_.Set(value, GetArenaForAllocation()); + if (!_internal_has_ref()) { + clear_has_ref(); + set_has_ref(); + _impl_.has_ref_.ref_.InitDefault(); + } + _impl_.has_ref_.ref_.Set(value, GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::_internal_mutable_ref() { - - return _impl_.ref_.Mutable(GetArenaForAllocation()); + if (!_internal_has_ref()) { + clear_has_ref(); + set_has_ref(); + _impl_.has_ref_.ref_.InitDefault(); + } + return _impl_.has_ref_.ref_.Mutable( GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::release_ref() { // @@protoc_insertion_point(field_release:valhalla.BikeShareStationInfo.ref) - return _impl_.ref_.Release(); + if (_internal_has_ref()) { + clear_has_has_ref(); + return _impl_.has_ref_.ref_.Release(); + } else { + return nullptr; + } } inline void BikeShareStationInfo::set_allocated_ref(std::string* ref) { - if (ref != nullptr) { - - } else { - + if (has_has_ref()) { + clear_has_ref(); } - _impl_.ref_.SetAllocated(ref, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.ref_.IsDefault()) { - _impl_.ref_.Set("", GetArenaForAllocation()); + if (ref != nullptr) { + set_has_ref(); + _impl_.has_ref_.ref_.InitAllocated(ref, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.BikeShareStationInfo.ref) } // uint32 capacity = 3; +inline bool BikeShareStationInfo::_internal_has_capacity() const { + return has_capacity_case() == kCapacity; +} +inline bool BikeShareStationInfo::has_capacity() const { + return _internal_has_capacity(); +} +inline void BikeShareStationInfo::set_has_capacity() { + _impl_._oneof_case_[2] = kCapacity; +} inline void BikeShareStationInfo::clear_capacity() { - _impl_.capacity_ = 0u; + if (_internal_has_capacity()) { + _impl_.has_capacity_.capacity_ = 0u; + clear_has_has_capacity(); + } } inline uint32_t BikeShareStationInfo::_internal_capacity() const { - return _impl_.capacity_; + if (_internal_has_capacity()) { + return _impl_.has_capacity_.capacity_; + } + return 0u; +} +inline void BikeShareStationInfo::_internal_set_capacity(uint32_t value) { + if (!_internal_has_capacity()) { + clear_has_capacity(); + set_has_capacity(); + } + _impl_.has_capacity_.capacity_ = value; } inline uint32_t BikeShareStationInfo::capacity() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.capacity) return _internal_capacity(); } -inline void BikeShareStationInfo::_internal_set_capacity(uint32_t value) { - - _impl_.capacity_ = value; -} inline void BikeShareStationInfo::set_capacity(uint32_t value) { _internal_set_capacity(value); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.capacity) } // string network = 4; +inline bool BikeShareStationInfo::_internal_has_network() const { + return has_network_case() == kNetwork; +} +inline bool BikeShareStationInfo::has_network() const { + return _internal_has_network(); +} +inline void BikeShareStationInfo::set_has_network() { + _impl_._oneof_case_[3] = kNetwork; +} inline void BikeShareStationInfo::clear_network() { - _impl_.network_.ClearToEmpty(); + if (_internal_has_network()) { + _impl_.has_network_.network_.Destroy(); + clear_has_has_network(); + } } inline const std::string& BikeShareStationInfo::network() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.network) return _internal_network(); } template -inline PROTOBUF_ALWAYS_INLINE -void BikeShareStationInfo::set_network(ArgT0&& arg0, ArgT... args) { - - _impl_.network_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void BikeShareStationInfo::set_network(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_network()) { + clear_has_network(); + set_has_network(); + _impl_.has_network_.network_.InitDefault(); + } + _impl_.has_network_.network_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.network) } inline std::string* BikeShareStationInfo::mutable_network() { @@ -6855,48 +9606,75 @@ inline std::string* BikeShareStationInfo::mutable_network() { return _s; } inline const std::string& BikeShareStationInfo::_internal_network() const { - return _impl_.network_.Get(); + if (_internal_has_network()) { + return _impl_.has_network_.network_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void BikeShareStationInfo::_internal_set_network(const std::string& value) { - - _impl_.network_.Set(value, GetArenaForAllocation()); + if (!_internal_has_network()) { + clear_has_network(); + set_has_network(); + _impl_.has_network_.network_.InitDefault(); + } + _impl_.has_network_.network_.Set(value, GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::_internal_mutable_network() { - - return _impl_.network_.Mutable(GetArenaForAllocation()); + if (!_internal_has_network()) { + clear_has_network(); + set_has_network(); + _impl_.has_network_.network_.InitDefault(); + } + return _impl_.has_network_.network_.Mutable( GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::release_network() { // @@protoc_insertion_point(field_release:valhalla.BikeShareStationInfo.network) - return _impl_.network_.Release(); + if (_internal_has_network()) { + clear_has_has_network(); + return _impl_.has_network_.network_.Release(); + } else { + return nullptr; + } } inline void BikeShareStationInfo::set_allocated_network(std::string* network) { - if (network != nullptr) { - - } else { - + if (has_has_network()) { + clear_has_network(); } - _impl_.network_.SetAllocated(network, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.network_.IsDefault()) { - _impl_.network_.Set("", GetArenaForAllocation()); + if (network != nullptr) { + set_has_network(); + _impl_.has_network_.network_.InitAllocated(network, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.BikeShareStationInfo.network) } // string operator = 5; +inline bool BikeShareStationInfo::_internal_has_operator_() const { + return has_operator__case() == kOperator; +} +inline bool BikeShareStationInfo::has_operator_() const { + return _internal_has_operator_(); +} +inline void BikeShareStationInfo::set_has_operator_() { + _impl_._oneof_case_[4] = kOperator; +} inline void BikeShareStationInfo::clear_operator_() { - _impl_.operator__.ClearToEmpty(); + if (_internal_has_operator_()) { + _impl_.has_operator__.operator__.Destroy(); + clear_has_has_operator_(); + } } inline const std::string& BikeShareStationInfo::operator_() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.operator) return _internal_operator_(); } template -inline PROTOBUF_ALWAYS_INLINE -void BikeShareStationInfo::set_operator_(ArgT0&& arg0, ArgT... args) { - - _impl_.operator__.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void BikeShareStationInfo::set_operator_(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_operator_()) { + clear_has_operator_(); + set_has_operator_(); + _impl_.has_operator__.operator__.InitDefault(); + } + _impl_.has_operator__.operator__.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.operator) } inline std::string* BikeShareStationInfo::mutable_operator_() { @@ -6905,93 +9683,222 @@ inline std::string* BikeShareStationInfo::mutable_operator_() { return _s; } inline const std::string& BikeShareStationInfo::_internal_operator_() const { - return _impl_.operator__.Get(); + if (_internal_has_operator_()) { + return _impl_.has_operator__.operator__.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void BikeShareStationInfo::_internal_set_operator_(const std::string& value) { - - _impl_.operator__.Set(value, GetArenaForAllocation()); + if (!_internal_has_operator_()) { + clear_has_operator_(); + set_has_operator_(); + _impl_.has_operator__.operator__.InitDefault(); + } + _impl_.has_operator__.operator__.Set(value, GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::_internal_mutable_operator_() { - - return _impl_.operator__.Mutable(GetArenaForAllocation()); + if (!_internal_has_operator_()) { + clear_has_operator_(); + set_has_operator_(); + _impl_.has_operator__.operator__.InitDefault(); + } + return _impl_.has_operator__.operator__.Mutable( GetArenaForAllocation()); } inline std::string* BikeShareStationInfo::release_operator_() { // @@protoc_insertion_point(field_release:valhalla.BikeShareStationInfo.operator) - return _impl_.operator__.Release(); + if (_internal_has_operator_()) { + clear_has_has_operator_(); + return _impl_.has_operator__.operator__.Release(); + } else { + return nullptr; + } } inline void BikeShareStationInfo::set_allocated_operator_(std::string* operator_) { - if (operator_ != nullptr) { - - } else { - + if (has_has_operator_()) { + clear_has_operator_(); } - _impl_.operator__.SetAllocated(operator_, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.operator__.IsDefault()) { - _impl_.operator__.Set("", GetArenaForAllocation()); + if (operator_ != nullptr) { + set_has_operator_(); + _impl_.has_operator__.operator__.InitAllocated(operator_, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.BikeShareStationInfo.operator) } // float rent_cost = 6; +inline bool BikeShareStationInfo::_internal_has_rent_cost() const { + return has_rent_cost_case() == kRentCost; +} +inline bool BikeShareStationInfo::has_rent_cost() const { + return _internal_has_rent_cost(); +} +inline void BikeShareStationInfo::set_has_rent_cost() { + _impl_._oneof_case_[5] = kRentCost; +} inline void BikeShareStationInfo::clear_rent_cost() { - _impl_.rent_cost_ = 0; + if (_internal_has_rent_cost()) { + _impl_.has_rent_cost_.rent_cost_ = 0; + clear_has_has_rent_cost(); + } } inline float BikeShareStationInfo::_internal_rent_cost() const { - return _impl_.rent_cost_; + if (_internal_has_rent_cost()) { + return _impl_.has_rent_cost_.rent_cost_; + } + return 0; +} +inline void BikeShareStationInfo::_internal_set_rent_cost(float value) { + if (!_internal_has_rent_cost()) { + clear_has_rent_cost(); + set_has_rent_cost(); + } + _impl_.has_rent_cost_.rent_cost_ = value; } inline float BikeShareStationInfo::rent_cost() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.rent_cost) return _internal_rent_cost(); } -inline void BikeShareStationInfo::_internal_set_rent_cost(float value) { - - _impl_.rent_cost_ = value; -} inline void BikeShareStationInfo::set_rent_cost(float value) { _internal_set_rent_cost(value); // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.rent_cost) } // float return_cost = 7; +inline bool BikeShareStationInfo::_internal_has_return_cost() const { + return has_return_cost_case() == kReturnCost; +} +inline bool BikeShareStationInfo::has_return_cost() const { + return _internal_has_return_cost(); +} +inline void BikeShareStationInfo::set_has_return_cost() { + _impl_._oneof_case_[6] = kReturnCost; +} inline void BikeShareStationInfo::clear_return_cost() { - _impl_.return_cost_ = 0; + if (_internal_has_return_cost()) { + _impl_.has_return_cost_.return_cost_ = 0; + clear_has_has_return_cost(); + } } inline float BikeShareStationInfo::_internal_return_cost() const { - return _impl_.return_cost_; + if (_internal_has_return_cost()) { + return _impl_.has_return_cost_.return_cost_; + } + return 0; +} +inline void BikeShareStationInfo::_internal_set_return_cost(float value) { + if (!_internal_has_return_cost()) { + clear_has_return_cost(); + set_has_return_cost(); + } + _impl_.has_return_cost_.return_cost_ = value; } inline float BikeShareStationInfo::return_cost() const { // @@protoc_insertion_point(field_get:valhalla.BikeShareStationInfo.return_cost) return _internal_return_cost(); } -inline void BikeShareStationInfo::_internal_set_return_cost(float value) { - - _impl_.return_cost_ = value; +inline void BikeShareStationInfo::set_return_cost(float value) { + _internal_set_return_cost(value); + // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.return_cost) +} + +inline bool BikeShareStationInfo::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_name() { + _impl_._oneof_case_[0] = HAS_NAME_NOT_SET; +} +inline bool BikeShareStationInfo::has_has_ref() const { + return has_ref_case() != HAS_REF_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_ref() { + _impl_._oneof_case_[1] = HAS_REF_NOT_SET; +} +inline bool BikeShareStationInfo::has_has_capacity() const { + return has_capacity_case() != HAS_CAPACITY_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_capacity() { + _impl_._oneof_case_[2] = HAS_CAPACITY_NOT_SET; +} +inline bool BikeShareStationInfo::has_has_network() const { + return has_network_case() != HAS_NETWORK_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_network() { + _impl_._oneof_case_[3] = HAS_NETWORK_NOT_SET; +} +inline bool BikeShareStationInfo::has_has_operator_() const { + return has_operator__case() != HAS_OPERATOR__NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_operator_() { + _impl_._oneof_case_[4] = HAS_OPERATOR__NOT_SET; +} +inline bool BikeShareStationInfo::has_has_rent_cost() const { + return has_rent_cost_case() != HAS_RENT_COST_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_rent_cost() { + _impl_._oneof_case_[5] = HAS_RENT_COST_NOT_SET; +} +inline bool BikeShareStationInfo::has_has_return_cost() const { + return has_return_cost_case() != HAS_RETURN_COST_NOT_SET; +} +inline void BikeShareStationInfo::clear_has_has_return_cost() { + _impl_._oneof_case_[6] = HAS_RETURN_COST_NOT_SET; +} +inline BikeShareStationInfo::HasNameCase BikeShareStationInfo::has_name_case() const { + return BikeShareStationInfo::HasNameCase(_impl_._oneof_case_[0]); +} +inline BikeShareStationInfo::HasRefCase BikeShareStationInfo::has_ref_case() const { + return BikeShareStationInfo::HasRefCase(_impl_._oneof_case_[1]); +} +inline BikeShareStationInfo::HasCapacityCase BikeShareStationInfo::has_capacity_case() const { + return BikeShareStationInfo::HasCapacityCase(_impl_._oneof_case_[2]); +} +inline BikeShareStationInfo::HasNetworkCase BikeShareStationInfo::has_network_case() const { + return BikeShareStationInfo::HasNetworkCase(_impl_._oneof_case_[3]); +} +inline BikeShareStationInfo::HasOperatorCase BikeShareStationInfo::has_operator__case() const { + return BikeShareStationInfo::HasOperatorCase(_impl_._oneof_case_[4]); +} +inline BikeShareStationInfo::HasRentCostCase BikeShareStationInfo::has_rent_cost_case() const { + return BikeShareStationInfo::HasRentCostCase(_impl_._oneof_case_[5]); } -inline void BikeShareStationInfo::set_return_cost(float value) { - _internal_set_return_cost(value); - // @@protoc_insertion_point(field_set:valhalla.BikeShareStationInfo.return_cost) +inline BikeShareStationInfo::HasReturnCostCase BikeShareStationInfo::has_return_cost_case() const { + return BikeShareStationInfo::HasReturnCostCase(_impl_._oneof_case_[6]); } - // ------------------------------------------------------------------- // TransitPlatformInfo // .valhalla.TransitPlatformInfo.Type type = 1; +inline bool TransitPlatformInfo::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool TransitPlatformInfo::has_type() const { + return _internal_has_type(); +} +inline void TransitPlatformInfo::set_has_type() { + _impl_._oneof_case_[0] = kType; +} inline void TransitPlatformInfo::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::TransitPlatformInfo_Type TransitPlatformInfo::_internal_type() const { - return static_cast< ::valhalla::TransitPlatformInfo_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::TransitPlatformInfo_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::TransitPlatformInfo_Type >(0); } inline ::valhalla::TransitPlatformInfo_Type TransitPlatformInfo::type() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.type) return _internal_type(); } inline void TransitPlatformInfo::_internal_set_type(::valhalla::TransitPlatformInfo_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void TransitPlatformInfo::set_type(::valhalla::TransitPlatformInfo_Type value) { _internal_set_type(value); @@ -6999,18 +9906,33 @@ inline void TransitPlatformInfo::set_type(::valhalla::TransitPlatformInfo_Type v } // string onestop_id = 2; +inline bool TransitPlatformInfo::_internal_has_onestop_id() const { + return has_onestop_id_case() == kOnestopId; +} +inline bool TransitPlatformInfo::has_onestop_id() const { + return _internal_has_onestop_id(); +} +inline void TransitPlatformInfo::set_has_onestop_id() { + _impl_._oneof_case_[1] = kOnestopId; +} inline void TransitPlatformInfo::clear_onestop_id() { - _impl_.onestop_id_.ClearToEmpty(); + if (_internal_has_onestop_id()) { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + clear_has_has_onestop_id(); + } } inline const std::string& TransitPlatformInfo::onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.onestop_id) return _internal_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.onestop_id) } inline std::string* TransitPlatformInfo::mutable_onestop_id() { @@ -7019,48 +9941,75 @@ inline std::string* TransitPlatformInfo::mutable_onestop_id() { return _s; } inline const std::string& TransitPlatformInfo::_internal_onestop_id() const { - return _impl_.onestop_id_.Get(); + if (_internal_has_onestop_id()) { + return _impl_.has_onestop_id_.onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_onestop_id(const std::string& value) { - - _impl_.onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_onestop_id() { - - return _impl_.onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + return _impl_.has_onestop_id_.onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.onestop_id) - return _impl_.onestop_id_.Release(); + if (_internal_has_onestop_id()) { + clear_has_has_onestop_id(); + return _impl_.has_onestop_id_.onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_onestop_id(std::string* onestop_id) { - if (onestop_id != nullptr) { - - } else { - + if (has_has_onestop_id()) { + clear_has_onestop_id(); } - _impl_.onestop_id_.SetAllocated(onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.onestop_id_.IsDefault()) { - _impl_.onestop_id_.Set("", GetArenaForAllocation()); + if (onestop_id != nullptr) { + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitAllocated(onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.onestop_id) } // string name = 3; +inline bool TransitPlatformInfo::_internal_has_name() const { + return has_name_case() == kName; +} +inline bool TransitPlatformInfo::has_name() const { + return _internal_has_name(); +} +inline void TransitPlatformInfo::set_has_name() { + _impl_._oneof_case_[2] = kName; +} inline void TransitPlatformInfo::clear_name() { - _impl_.name_.ClearToEmpty(); + if (_internal_has_name()) { + _impl_.has_name_.name_.Destroy(); + clear_has_has_name(); + } } inline const std::string& TransitPlatformInfo::name() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.name) return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.name) } inline std::string* TransitPlatformInfo::mutable_name() { @@ -7069,48 +10018,75 @@ inline std::string* TransitPlatformInfo::mutable_name() { return _s; } inline const std::string& TransitPlatformInfo::_internal_name() const { - return _impl_.name_.Get(); + if (_internal_has_name()) { + return _impl_.has_name_.name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + _impl_.has_name_.name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_name()) { + clear_has_name(); + set_has_name(); + _impl_.has_name_.name_.InitDefault(); + } + return _impl_.has_name_.name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_name() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.name) - return _impl_.name_.Release(); + if (_internal_has_name()) { + clear_has_has_name(); + return _impl_.has_name_.name_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - + if (has_has_name()) { + clear_has_name(); } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (name != nullptr) { + set_has_name(); + _impl_.has_name_.name_.InitAllocated(name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.name) } // string arrival_date_time = 4; +inline bool TransitPlatformInfo::_internal_has_arrival_date_time() const { + return has_arrival_date_time_case() == kArrivalDateTime; +} +inline bool TransitPlatformInfo::has_arrival_date_time() const { + return _internal_has_arrival_date_time(); +} +inline void TransitPlatformInfo::set_has_arrival_date_time() { + _impl_._oneof_case_[3] = kArrivalDateTime; +} inline void TransitPlatformInfo::clear_arrival_date_time() { - _impl_.arrival_date_time_.ClearToEmpty(); + if (_internal_has_arrival_date_time()) { + _impl_.has_arrival_date_time_.arrival_date_time_.Destroy(); + clear_has_has_arrival_date_time(); + } } inline const std::string& TransitPlatformInfo::arrival_date_time() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.arrival_date_time) return _internal_arrival_date_time(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_arrival_date_time(ArgT0&& arg0, ArgT... args) { - - _impl_.arrival_date_time_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_arrival_date_time(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_arrival_date_time()) { + clear_has_arrival_date_time(); + set_has_arrival_date_time(); + _impl_.has_arrival_date_time_.arrival_date_time_.InitDefault(); + } + _impl_.has_arrival_date_time_.arrival_date_time_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.arrival_date_time) } inline std::string* TransitPlatformInfo::mutable_arrival_date_time() { @@ -7119,48 +10095,75 @@ inline std::string* TransitPlatformInfo::mutable_arrival_date_time() { return _s; } inline const std::string& TransitPlatformInfo::_internal_arrival_date_time() const { - return _impl_.arrival_date_time_.Get(); + if (_internal_has_arrival_date_time()) { + return _impl_.has_arrival_date_time_.arrival_date_time_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_arrival_date_time(const std::string& value) { - - _impl_.arrival_date_time_.Set(value, GetArenaForAllocation()); + if (!_internal_has_arrival_date_time()) { + clear_has_arrival_date_time(); + set_has_arrival_date_time(); + _impl_.has_arrival_date_time_.arrival_date_time_.InitDefault(); + } + _impl_.has_arrival_date_time_.arrival_date_time_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_arrival_date_time() { - - return _impl_.arrival_date_time_.Mutable(GetArenaForAllocation()); + if (!_internal_has_arrival_date_time()) { + clear_has_arrival_date_time(); + set_has_arrival_date_time(); + _impl_.has_arrival_date_time_.arrival_date_time_.InitDefault(); + } + return _impl_.has_arrival_date_time_.arrival_date_time_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_arrival_date_time() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.arrival_date_time) - return _impl_.arrival_date_time_.Release(); + if (_internal_has_arrival_date_time()) { + clear_has_has_arrival_date_time(); + return _impl_.has_arrival_date_time_.arrival_date_time_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_arrival_date_time(std::string* arrival_date_time) { - if (arrival_date_time != nullptr) { - - } else { - + if (has_has_arrival_date_time()) { + clear_has_arrival_date_time(); } - _impl_.arrival_date_time_.SetAllocated(arrival_date_time, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.arrival_date_time_.IsDefault()) { - _impl_.arrival_date_time_.Set("", GetArenaForAllocation()); + if (arrival_date_time != nullptr) { + set_has_arrival_date_time(); + _impl_.has_arrival_date_time_.arrival_date_time_.InitAllocated(arrival_date_time, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.arrival_date_time) } // string departure_date_time = 5; +inline bool TransitPlatformInfo::_internal_has_departure_date_time() const { + return has_departure_date_time_case() == kDepartureDateTime; +} +inline bool TransitPlatformInfo::has_departure_date_time() const { + return _internal_has_departure_date_time(); +} +inline void TransitPlatformInfo::set_has_departure_date_time() { + _impl_._oneof_case_[4] = kDepartureDateTime; +} inline void TransitPlatformInfo::clear_departure_date_time() { - _impl_.departure_date_time_.ClearToEmpty(); + if (_internal_has_departure_date_time()) { + _impl_.has_departure_date_time_.departure_date_time_.Destroy(); + clear_has_has_departure_date_time(); + } } inline const std::string& TransitPlatformInfo::departure_date_time() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.departure_date_time) return _internal_departure_date_time(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_departure_date_time(ArgT0&& arg0, ArgT... args) { - - _impl_.departure_date_time_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_departure_date_time(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_departure_date_time()) { + clear_has_departure_date_time(); + set_has_departure_date_time(); + _impl_.has_departure_date_time_.departure_date_time_.InitDefault(); + } + _impl_.has_departure_date_time_.departure_date_time_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.departure_date_time) } inline std::string* TransitPlatformInfo::mutable_departure_date_time() { @@ -7169,50 +10172,80 @@ inline std::string* TransitPlatformInfo::mutable_departure_date_time() { return _s; } inline const std::string& TransitPlatformInfo::_internal_departure_date_time() const { - return _impl_.departure_date_time_.Get(); + if (_internal_has_departure_date_time()) { + return _impl_.has_departure_date_time_.departure_date_time_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_departure_date_time(const std::string& value) { - - _impl_.departure_date_time_.Set(value, GetArenaForAllocation()); + if (!_internal_has_departure_date_time()) { + clear_has_departure_date_time(); + set_has_departure_date_time(); + _impl_.has_departure_date_time_.departure_date_time_.InitDefault(); + } + _impl_.has_departure_date_time_.departure_date_time_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_departure_date_time() { - - return _impl_.departure_date_time_.Mutable(GetArenaForAllocation()); + if (!_internal_has_departure_date_time()) { + clear_has_departure_date_time(); + set_has_departure_date_time(); + _impl_.has_departure_date_time_.departure_date_time_.InitDefault(); + } + return _impl_.has_departure_date_time_.departure_date_time_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_departure_date_time() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.departure_date_time) - return _impl_.departure_date_time_.Release(); + if (_internal_has_departure_date_time()) { + clear_has_has_departure_date_time(); + return _impl_.has_departure_date_time_.departure_date_time_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_departure_date_time(std::string* departure_date_time) { - if (departure_date_time != nullptr) { - - } else { - + if (has_has_departure_date_time()) { + clear_has_departure_date_time(); } - _impl_.departure_date_time_.SetAllocated(departure_date_time, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.departure_date_time_.IsDefault()) { - _impl_.departure_date_time_.Set("", GetArenaForAllocation()); + if (departure_date_time != nullptr) { + set_has_departure_date_time(); + _impl_.has_departure_date_time_.departure_date_time_.InitAllocated(departure_date_time, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.departure_date_time) } // bool assumed_schedule = 6; +inline bool TransitPlatformInfo::_internal_has_assumed_schedule() const { + return has_assumed_schedule_case() == kAssumedSchedule; +} +inline bool TransitPlatformInfo::has_assumed_schedule() const { + return _internal_has_assumed_schedule(); +} +inline void TransitPlatformInfo::set_has_assumed_schedule() { + _impl_._oneof_case_[5] = kAssumedSchedule; +} inline void TransitPlatformInfo::clear_assumed_schedule() { - _impl_.assumed_schedule_ = false; + if (_internal_has_assumed_schedule()) { + _impl_.has_assumed_schedule_.assumed_schedule_ = false; + clear_has_has_assumed_schedule(); + } } inline bool TransitPlatformInfo::_internal_assumed_schedule() const { - return _impl_.assumed_schedule_; + if (_internal_has_assumed_schedule()) { + return _impl_.has_assumed_schedule_.assumed_schedule_; + } + return false; +} +inline void TransitPlatformInfo::_internal_set_assumed_schedule(bool value) { + if (!_internal_has_assumed_schedule()) { + clear_has_assumed_schedule(); + set_has_assumed_schedule(); + } + _impl_.has_assumed_schedule_.assumed_schedule_ = value; } inline bool TransitPlatformInfo::assumed_schedule() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.assumed_schedule) return _internal_assumed_schedule(); } -inline void TransitPlatformInfo::_internal_set_assumed_schedule(bool value) { - - _impl_.assumed_schedule_ = value; -} inline void TransitPlatformInfo::set_assumed_schedule(bool value) { _internal_set_assumed_schedule(value); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.assumed_schedule) @@ -7309,18 +10342,33 @@ inline void TransitPlatformInfo::set_allocated_ll(::valhalla::LatLng* ll) { } // string station_onestop_id = 8; +inline bool TransitPlatformInfo::_internal_has_station_onestop_id() const { + return has_station_onestop_id_case() == kStationOnestopId; +} +inline bool TransitPlatformInfo::has_station_onestop_id() const { + return _internal_has_station_onestop_id(); +} +inline void TransitPlatformInfo::set_has_station_onestop_id() { + _impl_._oneof_case_[6] = kStationOnestopId; +} inline void TransitPlatformInfo::clear_station_onestop_id() { - _impl_.station_onestop_id_.ClearToEmpty(); + if (_internal_has_station_onestop_id()) { + _impl_.has_station_onestop_id_.station_onestop_id_.Destroy(); + clear_has_has_station_onestop_id(); + } } inline const std::string& TransitPlatformInfo::station_onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.station_onestop_id) return _internal_station_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_station_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.station_onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_station_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_station_onestop_id()) { + clear_has_station_onestop_id(); + set_has_station_onestop_id(); + _impl_.has_station_onestop_id_.station_onestop_id_.InitDefault(); + } + _impl_.has_station_onestop_id_.station_onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.station_onestop_id) } inline std::string* TransitPlatformInfo::mutable_station_onestop_id() { @@ -7329,48 +10377,75 @@ inline std::string* TransitPlatformInfo::mutable_station_onestop_id() { return _s; } inline const std::string& TransitPlatformInfo::_internal_station_onestop_id() const { - return _impl_.station_onestop_id_.Get(); + if (_internal_has_station_onestop_id()) { + return _impl_.has_station_onestop_id_.station_onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_station_onestop_id(const std::string& value) { - - _impl_.station_onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_station_onestop_id()) { + clear_has_station_onestop_id(); + set_has_station_onestop_id(); + _impl_.has_station_onestop_id_.station_onestop_id_.InitDefault(); + } + _impl_.has_station_onestop_id_.station_onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_station_onestop_id() { - - return _impl_.station_onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_station_onestop_id()) { + clear_has_station_onestop_id(); + set_has_station_onestop_id(); + _impl_.has_station_onestop_id_.station_onestop_id_.InitDefault(); + } + return _impl_.has_station_onestop_id_.station_onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_station_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.station_onestop_id) - return _impl_.station_onestop_id_.Release(); + if (_internal_has_station_onestop_id()) { + clear_has_has_station_onestop_id(); + return _impl_.has_station_onestop_id_.station_onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_station_onestop_id(std::string* station_onestop_id) { - if (station_onestop_id != nullptr) { - - } else { - + if (has_has_station_onestop_id()) { + clear_has_station_onestop_id(); } - _impl_.station_onestop_id_.SetAllocated(station_onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.station_onestop_id_.IsDefault()) { - _impl_.station_onestop_id_.Set("", GetArenaForAllocation()); + if (station_onestop_id != nullptr) { + set_has_station_onestop_id(); + _impl_.has_station_onestop_id_.station_onestop_id_.InitAllocated(station_onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.station_onestop_id) } // string station_name = 9; +inline bool TransitPlatformInfo::_internal_has_station_name() const { + return has_station_name_case() == kStationName; +} +inline bool TransitPlatformInfo::has_station_name() const { + return _internal_has_station_name(); +} +inline void TransitPlatformInfo::set_has_station_name() { + _impl_._oneof_case_[7] = kStationName; +} inline void TransitPlatformInfo::clear_station_name() { - _impl_.station_name_.ClearToEmpty(); + if (_internal_has_station_name()) { + _impl_.has_station_name_.station_name_.Destroy(); + clear_has_has_station_name(); + } } inline const std::string& TransitPlatformInfo::station_name() const { // @@protoc_insertion_point(field_get:valhalla.TransitPlatformInfo.station_name) return _internal_station_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitPlatformInfo::set_station_name(ArgT0&& arg0, ArgT... args) { - - _impl_.station_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitPlatformInfo::set_station_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_station_name()) { + clear_has_station_name(); + set_has_station_name(); + _impl_.has_station_name_.station_name_.InitDefault(); + } + _impl_.has_station_name_.station_name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitPlatformInfo.station_name) } inline std::string* TransitPlatformInfo::mutable_station_name() { @@ -7379,52 +10454,151 @@ inline std::string* TransitPlatformInfo::mutable_station_name() { return _s; } inline const std::string& TransitPlatformInfo::_internal_station_name() const { - return _impl_.station_name_.Get(); + if (_internal_has_station_name()) { + return _impl_.has_station_name_.station_name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitPlatformInfo::_internal_set_station_name(const std::string& value) { - - _impl_.station_name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_station_name()) { + clear_has_station_name(); + set_has_station_name(); + _impl_.has_station_name_.station_name_.InitDefault(); + } + _impl_.has_station_name_.station_name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::_internal_mutable_station_name() { - - return _impl_.station_name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_station_name()) { + clear_has_station_name(); + set_has_station_name(); + _impl_.has_station_name_.station_name_.InitDefault(); + } + return _impl_.has_station_name_.station_name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitPlatformInfo::release_station_name() { // @@protoc_insertion_point(field_release:valhalla.TransitPlatformInfo.station_name) - return _impl_.station_name_.Release(); + if (_internal_has_station_name()) { + clear_has_has_station_name(); + return _impl_.has_station_name_.station_name_.Release(); + } else { + return nullptr; + } } inline void TransitPlatformInfo::set_allocated_station_name(std::string* station_name) { - if (station_name != nullptr) { - - } else { - + if (has_has_station_name()) { + clear_has_station_name(); } - _impl_.station_name_.SetAllocated(station_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.station_name_.IsDefault()) { - _impl_.station_name_.Set("", GetArenaForAllocation()); + if (station_name != nullptr) { + set_has_station_name(); + _impl_.has_station_name_.station_name_.InitAllocated(station_name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitPlatformInfo.station_name) } +inline bool TransitPlatformInfo::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_type() { + _impl_._oneof_case_[0] = HAS_TYPE_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_onestop_id() const { + return has_onestop_id_case() != HAS_ONESTOP_ID_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_onestop_id() { + _impl_._oneof_case_[1] = HAS_ONESTOP_ID_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_name() const { + return has_name_case() != HAS_NAME_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_name() { + _impl_._oneof_case_[2] = HAS_NAME_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_arrival_date_time() const { + return has_arrival_date_time_case() != HAS_ARRIVAL_DATE_TIME_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_arrival_date_time() { + _impl_._oneof_case_[3] = HAS_ARRIVAL_DATE_TIME_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_departure_date_time() const { + return has_departure_date_time_case() != HAS_DEPARTURE_DATE_TIME_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_departure_date_time() { + _impl_._oneof_case_[4] = HAS_DEPARTURE_DATE_TIME_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_assumed_schedule() const { + return has_assumed_schedule_case() != HAS_ASSUMED_SCHEDULE_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_assumed_schedule() { + _impl_._oneof_case_[5] = HAS_ASSUMED_SCHEDULE_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_station_onestop_id() const { + return has_station_onestop_id_case() != HAS_STATION_ONESTOP_ID_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_station_onestop_id() { + _impl_._oneof_case_[6] = HAS_STATION_ONESTOP_ID_NOT_SET; +} +inline bool TransitPlatformInfo::has_has_station_name() const { + return has_station_name_case() != HAS_STATION_NAME_NOT_SET; +} +inline void TransitPlatformInfo::clear_has_has_station_name() { + _impl_._oneof_case_[7] = HAS_STATION_NAME_NOT_SET; +} +inline TransitPlatformInfo::HasTypeCase TransitPlatformInfo::has_type_case() const { + return TransitPlatformInfo::HasTypeCase(_impl_._oneof_case_[0]); +} +inline TransitPlatformInfo::HasOnestopIdCase TransitPlatformInfo::has_onestop_id_case() const { + return TransitPlatformInfo::HasOnestopIdCase(_impl_._oneof_case_[1]); +} +inline TransitPlatformInfo::HasNameCase TransitPlatformInfo::has_name_case() const { + return TransitPlatformInfo::HasNameCase(_impl_._oneof_case_[2]); +} +inline TransitPlatformInfo::HasArrivalDateTimeCase TransitPlatformInfo::has_arrival_date_time_case() const { + return TransitPlatformInfo::HasArrivalDateTimeCase(_impl_._oneof_case_[3]); +} +inline TransitPlatformInfo::HasDepartureDateTimeCase TransitPlatformInfo::has_departure_date_time_case() const { + return TransitPlatformInfo::HasDepartureDateTimeCase(_impl_._oneof_case_[4]); +} +inline TransitPlatformInfo::HasAssumedScheduleCase TransitPlatformInfo::has_assumed_schedule_case() const { + return TransitPlatformInfo::HasAssumedScheduleCase(_impl_._oneof_case_[5]); +} +inline TransitPlatformInfo::HasStationOnestopIdCase TransitPlatformInfo::has_station_onestop_id_case() const { + return TransitPlatformInfo::HasStationOnestopIdCase(_impl_._oneof_case_[6]); +} +inline TransitPlatformInfo::HasStationNameCase TransitPlatformInfo::has_station_name_case() const { + return TransitPlatformInfo::HasStationNameCase(_impl_._oneof_case_[7]); +} // ------------------------------------------------------------------- // TransitRouteInfo // string onestop_id = 1; +inline bool TransitRouteInfo::_internal_has_onestop_id() const { + return has_onestop_id_case() == kOnestopId; +} +inline bool TransitRouteInfo::has_onestop_id() const { + return _internal_has_onestop_id(); +} +inline void TransitRouteInfo::set_has_onestop_id() { + _impl_._oneof_case_[0] = kOnestopId; +} inline void TransitRouteInfo::clear_onestop_id() { - _impl_.onestop_id_.ClearToEmpty(); + if (_internal_has_onestop_id()) { + _impl_.has_onestop_id_.onestop_id_.Destroy(); + clear_has_has_onestop_id(); + } } inline const std::string& TransitRouteInfo::onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.onestop_id) return _internal_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.onestop_id) } inline std::string* TransitRouteInfo::mutable_onestop_id() { @@ -7433,88 +10607,151 @@ inline std::string* TransitRouteInfo::mutable_onestop_id() { return _s; } inline const std::string& TransitRouteInfo::_internal_onestop_id() const { - return _impl_.onestop_id_.Get(); + if (_internal_has_onestop_id()) { + return _impl_.has_onestop_id_.onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_onestop_id(const std::string& value) { - - _impl_.onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + _impl_.has_onestop_id_.onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_onestop_id() { - - return _impl_.onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_onestop_id()) { + clear_has_onestop_id(); + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitDefault(); + } + return _impl_.has_onestop_id_.onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.onestop_id) - return _impl_.onestop_id_.Release(); + if (_internal_has_onestop_id()) { + clear_has_has_onestop_id(); + return _impl_.has_onestop_id_.onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_onestop_id(std::string* onestop_id) { - if (onestop_id != nullptr) { - - } else { - + if (has_has_onestop_id()) { + clear_has_onestop_id(); } - _impl_.onestop_id_.SetAllocated(onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.onestop_id_.IsDefault()) { - _impl_.onestop_id_.Set("", GetArenaForAllocation()); + if (onestop_id != nullptr) { + set_has_onestop_id(); + _impl_.has_onestop_id_.onestop_id_.InitAllocated(onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.onestop_id) } // uint32 block_id = 2; +inline bool TransitRouteInfo::_internal_has_block_id() const { + return has_block_id_case() == kBlockId; +} +inline bool TransitRouteInfo::has_block_id() const { + return _internal_has_block_id(); +} +inline void TransitRouteInfo::set_has_block_id() { + _impl_._oneof_case_[1] = kBlockId; +} inline void TransitRouteInfo::clear_block_id() { - _impl_.block_id_ = 0u; + if (_internal_has_block_id()) { + _impl_.has_block_id_.block_id_ = 0u; + clear_has_has_block_id(); + } } inline uint32_t TransitRouteInfo::_internal_block_id() const { - return _impl_.block_id_; + if (_internal_has_block_id()) { + return _impl_.has_block_id_.block_id_; + } + return 0u; +} +inline void TransitRouteInfo::_internal_set_block_id(uint32_t value) { + if (!_internal_has_block_id()) { + clear_has_block_id(); + set_has_block_id(); + } + _impl_.has_block_id_.block_id_ = value; } inline uint32_t TransitRouteInfo::block_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.block_id) return _internal_block_id(); } -inline void TransitRouteInfo::_internal_set_block_id(uint32_t value) { - - _impl_.block_id_ = value; -} inline void TransitRouteInfo::set_block_id(uint32_t value) { _internal_set_block_id(value); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.block_id) } // uint32 trip_id = 3; +inline bool TransitRouteInfo::_internal_has_trip_id() const { + return has_trip_id_case() == kTripId; +} +inline bool TransitRouteInfo::has_trip_id() const { + return _internal_has_trip_id(); +} +inline void TransitRouteInfo::set_has_trip_id() { + _impl_._oneof_case_[2] = kTripId; +} inline void TransitRouteInfo::clear_trip_id() { - _impl_.trip_id_ = 0u; + if (_internal_has_trip_id()) { + _impl_.has_trip_id_.trip_id_ = 0u; + clear_has_has_trip_id(); + } } inline uint32_t TransitRouteInfo::_internal_trip_id() const { - return _impl_.trip_id_; + if (_internal_has_trip_id()) { + return _impl_.has_trip_id_.trip_id_; + } + return 0u; +} +inline void TransitRouteInfo::_internal_set_trip_id(uint32_t value) { + if (!_internal_has_trip_id()) { + clear_has_trip_id(); + set_has_trip_id(); + } + _impl_.has_trip_id_.trip_id_ = value; } inline uint32_t TransitRouteInfo::trip_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.trip_id) return _internal_trip_id(); } -inline void TransitRouteInfo::_internal_set_trip_id(uint32_t value) { - - _impl_.trip_id_ = value; -} inline void TransitRouteInfo::set_trip_id(uint32_t value) { _internal_set_trip_id(value); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.trip_id) } // string short_name = 4; +inline bool TransitRouteInfo::_internal_has_short_name() const { + return has_short_name_case() == kShortName; +} +inline bool TransitRouteInfo::has_short_name() const { + return _internal_has_short_name(); +} +inline void TransitRouteInfo::set_has_short_name() { + _impl_._oneof_case_[3] = kShortName; +} inline void TransitRouteInfo::clear_short_name() { - _impl_.short_name_.ClearToEmpty(); + if (_internal_has_short_name()) { + _impl_.has_short_name_.short_name_.Destroy(); + clear_has_has_short_name(); + } } inline const std::string& TransitRouteInfo::short_name() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.short_name) return _internal_short_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_short_name(ArgT0&& arg0, ArgT... args) { - - _impl_.short_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_short_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_short_name()) { + clear_has_short_name(); + set_has_short_name(); + _impl_.has_short_name_.short_name_.InitDefault(); + } + _impl_.has_short_name_.short_name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.short_name) } inline std::string* TransitRouteInfo::mutable_short_name() { @@ -7523,48 +10760,75 @@ inline std::string* TransitRouteInfo::mutable_short_name() { return _s; } inline const std::string& TransitRouteInfo::_internal_short_name() const { - return _impl_.short_name_.Get(); + if (_internal_has_short_name()) { + return _impl_.has_short_name_.short_name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_short_name(const std::string& value) { - - _impl_.short_name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_short_name()) { + clear_has_short_name(); + set_has_short_name(); + _impl_.has_short_name_.short_name_.InitDefault(); + } + _impl_.has_short_name_.short_name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_short_name() { - - return _impl_.short_name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_short_name()) { + clear_has_short_name(); + set_has_short_name(); + _impl_.has_short_name_.short_name_.InitDefault(); + } + return _impl_.has_short_name_.short_name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_short_name() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.short_name) - return _impl_.short_name_.Release(); + if (_internal_has_short_name()) { + clear_has_has_short_name(); + return _impl_.has_short_name_.short_name_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_short_name(std::string* short_name) { - if (short_name != nullptr) { - - } else { - + if (has_has_short_name()) { + clear_has_short_name(); } - _impl_.short_name_.SetAllocated(short_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.short_name_.IsDefault()) { - _impl_.short_name_.Set("", GetArenaForAllocation()); + if (short_name != nullptr) { + set_has_short_name(); + _impl_.has_short_name_.short_name_.InitAllocated(short_name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.short_name) } // string long_name = 5; +inline bool TransitRouteInfo::_internal_has_long_name() const { + return has_long_name_case() == kLongName; +} +inline bool TransitRouteInfo::has_long_name() const { + return _internal_has_long_name(); +} +inline void TransitRouteInfo::set_has_long_name() { + _impl_._oneof_case_[4] = kLongName; +} inline void TransitRouteInfo::clear_long_name() { - _impl_.long_name_.ClearToEmpty(); + if (_internal_has_long_name()) { + _impl_.has_long_name_.long_name_.Destroy(); + clear_has_has_long_name(); + } } inline const std::string& TransitRouteInfo::long_name() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.long_name) return _internal_long_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_long_name(ArgT0&& arg0, ArgT... args) { - - _impl_.long_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_long_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_long_name()) { + clear_has_long_name(); + set_has_long_name(); + _impl_.has_long_name_.long_name_.InitDefault(); + } + _impl_.has_long_name_.long_name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.long_name) } inline std::string* TransitRouteInfo::mutable_long_name() { @@ -7573,48 +10837,75 @@ inline std::string* TransitRouteInfo::mutable_long_name() { return _s; } inline const std::string& TransitRouteInfo::_internal_long_name() const { - return _impl_.long_name_.Get(); + if (_internal_has_long_name()) { + return _impl_.has_long_name_.long_name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_long_name(const std::string& value) { - - _impl_.long_name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_long_name()) { + clear_has_long_name(); + set_has_long_name(); + _impl_.has_long_name_.long_name_.InitDefault(); + } + _impl_.has_long_name_.long_name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_long_name() { - - return _impl_.long_name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_long_name()) { + clear_has_long_name(); + set_has_long_name(); + _impl_.has_long_name_.long_name_.InitDefault(); + } + return _impl_.has_long_name_.long_name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_long_name() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.long_name) - return _impl_.long_name_.Release(); + if (_internal_has_long_name()) { + clear_has_has_long_name(); + return _impl_.has_long_name_.long_name_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_long_name(std::string* long_name) { - if (long_name != nullptr) { - - } else { - + if (has_has_long_name()) { + clear_has_long_name(); } - _impl_.long_name_.SetAllocated(long_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.long_name_.IsDefault()) { - _impl_.long_name_.Set("", GetArenaForAllocation()); + if (long_name != nullptr) { + set_has_long_name(); + _impl_.has_long_name_.long_name_.InitAllocated(long_name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.long_name) } // string headsign = 6; +inline bool TransitRouteInfo::_internal_has_headsign() const { + return has_headsign_case() == kHeadsign; +} +inline bool TransitRouteInfo::has_headsign() const { + return _internal_has_headsign(); +} +inline void TransitRouteInfo::set_has_headsign() { + _impl_._oneof_case_[5] = kHeadsign; +} inline void TransitRouteInfo::clear_headsign() { - _impl_.headsign_.ClearToEmpty(); + if (_internal_has_headsign()) { + _impl_.has_headsign_.headsign_.Destroy(); + clear_has_has_headsign(); + } } inline const std::string& TransitRouteInfo::headsign() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.headsign) return _internal_headsign(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_headsign(ArgT0&& arg0, ArgT... args) { - - _impl_.headsign_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_headsign(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_headsign()) { + clear_has_headsign(); + set_has_headsign(); + _impl_.has_headsign_.headsign_.InitDefault(); + } + _impl_.has_headsign_.headsign_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.headsign) } inline std::string* TransitRouteInfo::mutable_headsign() { @@ -7623,49 +10914,79 @@ inline std::string* TransitRouteInfo::mutable_headsign() { return _s; } inline const std::string& TransitRouteInfo::_internal_headsign() const { - return _impl_.headsign_.Get(); + if (_internal_has_headsign()) { + return _impl_.has_headsign_.headsign_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_headsign(const std::string& value) { - - _impl_.headsign_.Set(value, GetArenaForAllocation()); + if (!_internal_has_headsign()) { + clear_has_headsign(); + set_has_headsign(); + _impl_.has_headsign_.headsign_.InitDefault(); + } + _impl_.has_headsign_.headsign_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_headsign() { - - return _impl_.headsign_.Mutable(GetArenaForAllocation()); + if (!_internal_has_headsign()) { + clear_has_headsign(); + set_has_headsign(); + _impl_.has_headsign_.headsign_.InitDefault(); + } + return _impl_.has_headsign_.headsign_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_headsign() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.headsign) - return _impl_.headsign_.Release(); + if (_internal_has_headsign()) { + clear_has_has_headsign(); + return _impl_.has_headsign_.headsign_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_headsign(std::string* headsign) { - if (headsign != nullptr) { - - } else { - + if (has_has_headsign()) { + clear_has_headsign(); } - _impl_.headsign_.SetAllocated(headsign, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.headsign_.IsDefault()) { - _impl_.headsign_.Set("", GetArenaForAllocation()); + if (headsign != nullptr) { + set_has_headsign(); + _impl_.has_headsign_.headsign_.InitAllocated(headsign, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.headsign) } // uint32 color = 7; +inline bool TransitRouteInfo::_internal_has_color() const { + return has_color_case() == kColor; +} +inline bool TransitRouteInfo::has_color() const { + return _internal_has_color(); +} +inline void TransitRouteInfo::set_has_color() { + _impl_._oneof_case_[6] = kColor; +} inline void TransitRouteInfo::clear_color() { - _impl_.color_ = 0u; + if (_internal_has_color()) { + _impl_.has_color_.color_ = 0u; + clear_has_has_color(); + } } inline uint32_t TransitRouteInfo::_internal_color() const { - return _impl_.color_; + if (_internal_has_color()) { + return _impl_.has_color_.color_; + } + return 0u; +} +inline void TransitRouteInfo::_internal_set_color(uint32_t value) { + if (!_internal_has_color()) { + clear_has_color(); + set_has_color(); + } + _impl_.has_color_.color_ = value; } inline uint32_t TransitRouteInfo::color() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.color) - return _internal_color(); -} -inline void TransitRouteInfo::_internal_set_color(uint32_t value) { - - _impl_.color_ = value; + return _internal_color(); } inline void TransitRouteInfo::set_color(uint32_t value) { _internal_set_color(value); @@ -7673,38 +10994,71 @@ inline void TransitRouteInfo::set_color(uint32_t value) { } // uint32 text_color = 8; +inline bool TransitRouteInfo::_internal_has_text_color() const { + return has_text_color_case() == kTextColor; +} +inline bool TransitRouteInfo::has_text_color() const { + return _internal_has_text_color(); +} +inline void TransitRouteInfo::set_has_text_color() { + _impl_._oneof_case_[7] = kTextColor; +} inline void TransitRouteInfo::clear_text_color() { - _impl_.text_color_ = 0u; + if (_internal_has_text_color()) { + _impl_.has_text_color_.text_color_ = 0u; + clear_has_has_text_color(); + } } inline uint32_t TransitRouteInfo::_internal_text_color() const { - return _impl_.text_color_; + if (_internal_has_text_color()) { + return _impl_.has_text_color_.text_color_; + } + return 0u; +} +inline void TransitRouteInfo::_internal_set_text_color(uint32_t value) { + if (!_internal_has_text_color()) { + clear_has_text_color(); + set_has_text_color(); + } + _impl_.has_text_color_.text_color_ = value; } inline uint32_t TransitRouteInfo::text_color() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.text_color) return _internal_text_color(); } -inline void TransitRouteInfo::_internal_set_text_color(uint32_t value) { - - _impl_.text_color_ = value; -} inline void TransitRouteInfo::set_text_color(uint32_t value) { _internal_set_text_color(value); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.text_color) } // string description = 9; +inline bool TransitRouteInfo::_internal_has_description() const { + return has_description_case() == kDescription; +} +inline bool TransitRouteInfo::has_description() const { + return _internal_has_description(); +} +inline void TransitRouteInfo::set_has_description() { + _impl_._oneof_case_[8] = kDescription; +} inline void TransitRouteInfo::clear_description() { - _impl_.description_.ClearToEmpty(); + if (_internal_has_description()) { + _impl_.has_description_.description_.Destroy(); + clear_has_has_description(); + } } inline const std::string& TransitRouteInfo::description() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.description) return _internal_description(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_description(ArgT0&& arg0, ArgT... args) { - - _impl_.description_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_description(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + _impl_.has_description_.description_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.description) } inline std::string* TransitRouteInfo::mutable_description() { @@ -7713,48 +11067,75 @@ inline std::string* TransitRouteInfo::mutable_description() { return _s; } inline const std::string& TransitRouteInfo::_internal_description() const { - return _impl_.description_.Get(); + if (_internal_has_description()) { + return _impl_.has_description_.description_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_description(const std::string& value) { - - _impl_.description_.Set(value, GetArenaForAllocation()); + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + _impl_.has_description_.description_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_description() { - - return _impl_.description_.Mutable(GetArenaForAllocation()); + if (!_internal_has_description()) { + clear_has_description(); + set_has_description(); + _impl_.has_description_.description_.InitDefault(); + } + return _impl_.has_description_.description_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_description() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.description) - return _impl_.description_.Release(); + if (_internal_has_description()) { + clear_has_has_description(); + return _impl_.has_description_.description_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_description(std::string* description) { - if (description != nullptr) { - - } else { - + if (has_has_description()) { + clear_has_description(); } - _impl_.description_.SetAllocated(description, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.description_.IsDefault()) { - _impl_.description_.Set("", GetArenaForAllocation()); + if (description != nullptr) { + set_has_description(); + _impl_.has_description_.description_.InitAllocated(description, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.description) } // string operator_onestop_id = 10; +inline bool TransitRouteInfo::_internal_has_operator_onestop_id() const { + return has_operator_onestop_id_case() == kOperatorOnestopId; +} +inline bool TransitRouteInfo::has_operator_onestop_id() const { + return _internal_has_operator_onestop_id(); +} +inline void TransitRouteInfo::set_has_operator_onestop_id() { + _impl_._oneof_case_[9] = kOperatorOnestopId; +} inline void TransitRouteInfo::clear_operator_onestop_id() { - _impl_.operator_onestop_id_.ClearToEmpty(); + if (_internal_has_operator_onestop_id()) { + _impl_.has_operator_onestop_id_.operator_onestop_id_.Destroy(); + clear_has_has_operator_onestop_id(); + } } inline const std::string& TransitRouteInfo::operator_onestop_id() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.operator_onestop_id) return _internal_operator_onestop_id(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_operator_onestop_id(ArgT0&& arg0, ArgT... args) { - - _impl_.operator_onestop_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_operator_onestop_id(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_operator_onestop_id()) { + clear_has_operator_onestop_id(); + set_has_operator_onestop_id(); + _impl_.has_operator_onestop_id_.operator_onestop_id_.InitDefault(); + } + _impl_.has_operator_onestop_id_.operator_onestop_id_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.operator_onestop_id) } inline std::string* TransitRouteInfo::mutable_operator_onestop_id() { @@ -7763,48 +11144,75 @@ inline std::string* TransitRouteInfo::mutable_operator_onestop_id() { return _s; } inline const std::string& TransitRouteInfo::_internal_operator_onestop_id() const { - return _impl_.operator_onestop_id_.Get(); + if (_internal_has_operator_onestop_id()) { + return _impl_.has_operator_onestop_id_.operator_onestop_id_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_operator_onestop_id(const std::string& value) { - - _impl_.operator_onestop_id_.Set(value, GetArenaForAllocation()); + if (!_internal_has_operator_onestop_id()) { + clear_has_operator_onestop_id(); + set_has_operator_onestop_id(); + _impl_.has_operator_onestop_id_.operator_onestop_id_.InitDefault(); + } + _impl_.has_operator_onestop_id_.operator_onestop_id_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_operator_onestop_id() { - - return _impl_.operator_onestop_id_.Mutable(GetArenaForAllocation()); + if (!_internal_has_operator_onestop_id()) { + clear_has_operator_onestop_id(); + set_has_operator_onestop_id(); + _impl_.has_operator_onestop_id_.operator_onestop_id_.InitDefault(); + } + return _impl_.has_operator_onestop_id_.operator_onestop_id_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_operator_onestop_id() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.operator_onestop_id) - return _impl_.operator_onestop_id_.Release(); + if (_internal_has_operator_onestop_id()) { + clear_has_has_operator_onestop_id(); + return _impl_.has_operator_onestop_id_.operator_onestop_id_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_operator_onestop_id(std::string* operator_onestop_id) { - if (operator_onestop_id != nullptr) { - - } else { - + if (has_has_operator_onestop_id()) { + clear_has_operator_onestop_id(); } - _impl_.operator_onestop_id_.SetAllocated(operator_onestop_id, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.operator_onestop_id_.IsDefault()) { - _impl_.operator_onestop_id_.Set("", GetArenaForAllocation()); + if (operator_onestop_id != nullptr) { + set_has_operator_onestop_id(); + _impl_.has_operator_onestop_id_.operator_onestop_id_.InitAllocated(operator_onestop_id, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.operator_onestop_id) } // string operator_name = 11; +inline bool TransitRouteInfo::_internal_has_operator_name() const { + return has_operator_name_case() == kOperatorName; +} +inline bool TransitRouteInfo::has_operator_name() const { + return _internal_has_operator_name(); +} +inline void TransitRouteInfo::set_has_operator_name() { + _impl_._oneof_case_[10] = kOperatorName; +} inline void TransitRouteInfo::clear_operator_name() { - _impl_.operator_name_.ClearToEmpty(); + if (_internal_has_operator_name()) { + _impl_.has_operator_name_.operator_name_.Destroy(); + clear_has_has_operator_name(); + } } inline const std::string& TransitRouteInfo::operator_name() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.operator_name) return _internal_operator_name(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_operator_name(ArgT0&& arg0, ArgT... args) { - - _impl_.operator_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_operator_name(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_operator_name()) { + clear_has_operator_name(); + set_has_operator_name(); + _impl_.has_operator_name_.operator_name_.InitDefault(); + } + _impl_.has_operator_name_.operator_name_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.operator_name) } inline std::string* TransitRouteInfo::mutable_operator_name() { @@ -7813,48 +11221,75 @@ inline std::string* TransitRouteInfo::mutable_operator_name() { return _s; } inline const std::string& TransitRouteInfo::_internal_operator_name() const { - return _impl_.operator_name_.Get(); + if (_internal_has_operator_name()) { + return _impl_.has_operator_name_.operator_name_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_operator_name(const std::string& value) { - - _impl_.operator_name_.Set(value, GetArenaForAllocation()); + if (!_internal_has_operator_name()) { + clear_has_operator_name(); + set_has_operator_name(); + _impl_.has_operator_name_.operator_name_.InitDefault(); + } + _impl_.has_operator_name_.operator_name_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_operator_name() { - - return _impl_.operator_name_.Mutable(GetArenaForAllocation()); + if (!_internal_has_operator_name()) { + clear_has_operator_name(); + set_has_operator_name(); + _impl_.has_operator_name_.operator_name_.InitDefault(); + } + return _impl_.has_operator_name_.operator_name_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_operator_name() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.operator_name) - return _impl_.operator_name_.Release(); + if (_internal_has_operator_name()) { + clear_has_has_operator_name(); + return _impl_.has_operator_name_.operator_name_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_operator_name(std::string* operator_name) { - if (operator_name != nullptr) { - - } else { - + if (has_has_operator_name()) { + clear_has_operator_name(); } - _impl_.operator_name_.SetAllocated(operator_name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.operator_name_.IsDefault()) { - _impl_.operator_name_.Set("", GetArenaForAllocation()); + if (operator_name != nullptr) { + set_has_operator_name(); + _impl_.has_operator_name_.operator_name_.InitAllocated(operator_name, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.operator_name) } // string operator_url = 12; +inline bool TransitRouteInfo::_internal_has_operator_url() const { + return has_operator_url_case() == kOperatorUrl; +} +inline bool TransitRouteInfo::has_operator_url() const { + return _internal_has_operator_url(); +} +inline void TransitRouteInfo::set_has_operator_url() { + _impl_._oneof_case_[11] = kOperatorUrl; +} inline void TransitRouteInfo::clear_operator_url() { - _impl_.operator_url_.ClearToEmpty(); + if (_internal_has_operator_url()) { + _impl_.has_operator_url_.operator_url_.Destroy(); + clear_has_has_operator_url(); + } } inline const std::string& TransitRouteInfo::operator_url() const { // @@protoc_insertion_point(field_get:valhalla.TransitRouteInfo.operator_url) return _internal_operator_url(); } template -inline PROTOBUF_ALWAYS_INLINE -void TransitRouteInfo::set_operator_url(ArgT0&& arg0, ArgT... args) { - - _impl_.operator_url_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TransitRouteInfo::set_operator_url(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_operator_url()) { + clear_has_operator_url(); + set_has_operator_url(); + _impl_.has_operator_url_.operator_url_.InitDefault(); + } + _impl_.has_operator_url_.operator_url_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TransitRouteInfo.operator_url) } inline std::string* TransitRouteInfo::mutable_operator_url() { @@ -7863,32 +11298,44 @@ inline std::string* TransitRouteInfo::mutable_operator_url() { return _s; } inline const std::string& TransitRouteInfo::_internal_operator_url() const { - return _impl_.operator_url_.Get(); + if (_internal_has_operator_url()) { + return _impl_.has_operator_url_.operator_url_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TransitRouteInfo::_internal_set_operator_url(const std::string& value) { - - _impl_.operator_url_.Set(value, GetArenaForAllocation()); + if (!_internal_has_operator_url()) { + clear_has_operator_url(); + set_has_operator_url(); + _impl_.has_operator_url_.operator_url_.InitDefault(); + } + _impl_.has_operator_url_.operator_url_.Set(value, GetArenaForAllocation()); } inline std::string* TransitRouteInfo::_internal_mutable_operator_url() { - - return _impl_.operator_url_.Mutable(GetArenaForAllocation()); + if (!_internal_has_operator_url()) { + clear_has_operator_url(); + set_has_operator_url(); + _impl_.has_operator_url_.operator_url_.InitDefault(); + } + return _impl_.has_operator_url_.operator_url_.Mutable( GetArenaForAllocation()); } inline std::string* TransitRouteInfo::release_operator_url() { // @@protoc_insertion_point(field_release:valhalla.TransitRouteInfo.operator_url) - return _impl_.operator_url_.Release(); + if (_internal_has_operator_url()) { + clear_has_has_operator_url(); + return _impl_.has_operator_url_.operator_url_.Release(); + } else { + return nullptr; + } } inline void TransitRouteInfo::set_allocated_operator_url(std::string* operator_url) { - if (operator_url != nullptr) { - - } else { - + if (has_has_operator_url()) { + clear_has_operator_url(); } - _impl_.operator_url_.SetAllocated(operator_url, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.operator_url_.IsDefault()) { - _impl_.operator_url_.Set("", GetArenaForAllocation()); + if (operator_url != nullptr) { + set_has_operator_url(); + _impl_.has_operator_url_.operator_url_.InitAllocated(operator_url, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TransitRouteInfo.operator_url) } @@ -7932,24 +11379,150 @@ TransitRouteInfo::transit_stops() const { return _impl_.transit_stops_; } +inline bool TransitRouteInfo::has_has_onestop_id() const { + return has_onestop_id_case() != HAS_ONESTOP_ID_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_onestop_id() { + _impl_._oneof_case_[0] = HAS_ONESTOP_ID_NOT_SET; +} +inline bool TransitRouteInfo::has_has_block_id() const { + return has_block_id_case() != HAS_BLOCK_ID_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_block_id() { + _impl_._oneof_case_[1] = HAS_BLOCK_ID_NOT_SET; +} +inline bool TransitRouteInfo::has_has_trip_id() const { + return has_trip_id_case() != HAS_TRIP_ID_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_trip_id() { + _impl_._oneof_case_[2] = HAS_TRIP_ID_NOT_SET; +} +inline bool TransitRouteInfo::has_has_short_name() const { + return has_short_name_case() != HAS_SHORT_NAME_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_short_name() { + _impl_._oneof_case_[3] = HAS_SHORT_NAME_NOT_SET; +} +inline bool TransitRouteInfo::has_has_long_name() const { + return has_long_name_case() != HAS_LONG_NAME_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_long_name() { + _impl_._oneof_case_[4] = HAS_LONG_NAME_NOT_SET; +} +inline bool TransitRouteInfo::has_has_headsign() const { + return has_headsign_case() != HAS_HEADSIGN_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_headsign() { + _impl_._oneof_case_[5] = HAS_HEADSIGN_NOT_SET; +} +inline bool TransitRouteInfo::has_has_color() const { + return has_color_case() != HAS_COLOR_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_color() { + _impl_._oneof_case_[6] = HAS_COLOR_NOT_SET; +} +inline bool TransitRouteInfo::has_has_text_color() const { + return has_text_color_case() != HAS_TEXT_COLOR_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_text_color() { + _impl_._oneof_case_[7] = HAS_TEXT_COLOR_NOT_SET; +} +inline bool TransitRouteInfo::has_has_description() const { + return has_description_case() != HAS_DESCRIPTION_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_description() { + _impl_._oneof_case_[8] = HAS_DESCRIPTION_NOT_SET; +} +inline bool TransitRouteInfo::has_has_operator_onestop_id() const { + return has_operator_onestop_id_case() != HAS_OPERATOR_ONESTOP_ID_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_operator_onestop_id() { + _impl_._oneof_case_[9] = HAS_OPERATOR_ONESTOP_ID_NOT_SET; +} +inline bool TransitRouteInfo::has_has_operator_name() const { + return has_operator_name_case() != HAS_OPERATOR_NAME_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_operator_name() { + _impl_._oneof_case_[10] = HAS_OPERATOR_NAME_NOT_SET; +} +inline bool TransitRouteInfo::has_has_operator_url() const { + return has_operator_url_case() != HAS_OPERATOR_URL_NOT_SET; +} +inline void TransitRouteInfo::clear_has_has_operator_url() { + _impl_._oneof_case_[11] = HAS_OPERATOR_URL_NOT_SET; +} +inline TransitRouteInfo::HasOnestopIdCase TransitRouteInfo::has_onestop_id_case() const { + return TransitRouteInfo::HasOnestopIdCase(_impl_._oneof_case_[0]); +} +inline TransitRouteInfo::HasBlockIdCase TransitRouteInfo::has_block_id_case() const { + return TransitRouteInfo::HasBlockIdCase(_impl_._oneof_case_[1]); +} +inline TransitRouteInfo::HasTripIdCase TransitRouteInfo::has_trip_id_case() const { + return TransitRouteInfo::HasTripIdCase(_impl_._oneof_case_[2]); +} +inline TransitRouteInfo::HasShortNameCase TransitRouteInfo::has_short_name_case() const { + return TransitRouteInfo::HasShortNameCase(_impl_._oneof_case_[3]); +} +inline TransitRouteInfo::HasLongNameCase TransitRouteInfo::has_long_name_case() const { + return TransitRouteInfo::HasLongNameCase(_impl_._oneof_case_[4]); +} +inline TransitRouteInfo::HasHeadsignCase TransitRouteInfo::has_headsign_case() const { + return TransitRouteInfo::HasHeadsignCase(_impl_._oneof_case_[5]); +} +inline TransitRouteInfo::HasColorCase TransitRouteInfo::has_color_case() const { + return TransitRouteInfo::HasColorCase(_impl_._oneof_case_[6]); +} +inline TransitRouteInfo::HasTextColorCase TransitRouteInfo::has_text_color_case() const { + return TransitRouteInfo::HasTextColorCase(_impl_._oneof_case_[7]); +} +inline TransitRouteInfo::HasDescriptionCase TransitRouteInfo::has_description_case() const { + return TransitRouteInfo::HasDescriptionCase(_impl_._oneof_case_[8]); +} +inline TransitRouteInfo::HasOperatorOnestopIdCase TransitRouteInfo::has_operator_onestop_id_case() const { + return TransitRouteInfo::HasOperatorOnestopIdCase(_impl_._oneof_case_[9]); +} +inline TransitRouteInfo::HasOperatorNameCase TransitRouteInfo::has_operator_name_case() const { + return TransitRouteInfo::HasOperatorNameCase(_impl_._oneof_case_[10]); +} +inline TransitRouteInfo::HasOperatorUrlCase TransitRouteInfo::has_operator_url_case() const { + return TransitRouteInfo::HasOperatorUrlCase(_impl_._oneof_case_[11]); +} // ------------------------------------------------------------------- // Pronunciation // .valhalla.Pronunciation.Alphabet alphabet = 1; +inline bool Pronunciation::_internal_has_alphabet() const { + return has_alphabet_case() == kAlphabet; +} +inline bool Pronunciation::has_alphabet() const { + return _internal_has_alphabet(); +} +inline void Pronunciation::set_has_alphabet() { + _impl_._oneof_case_[0] = kAlphabet; +} inline void Pronunciation::clear_alphabet() { - _impl_.alphabet_ = 0; + if (_internal_has_alphabet()) { + _impl_.has_alphabet_.alphabet_ = 0; + clear_has_has_alphabet(); + } } inline ::valhalla::Pronunciation_Alphabet Pronunciation::_internal_alphabet() const { - return static_cast< ::valhalla::Pronunciation_Alphabet >(_impl_.alphabet_); + if (_internal_has_alphabet()) { + return static_cast< ::valhalla::Pronunciation_Alphabet >(_impl_.has_alphabet_.alphabet_); + } + return static_cast< ::valhalla::Pronunciation_Alphabet >(0); } inline ::valhalla::Pronunciation_Alphabet Pronunciation::alphabet() const { // @@protoc_insertion_point(field_get:valhalla.Pronunciation.alphabet) return _internal_alphabet(); } inline void Pronunciation::_internal_set_alphabet(::valhalla::Pronunciation_Alphabet value) { - - _impl_.alphabet_ = value; + if (!_internal_has_alphabet()) { + clear_has_alphabet(); + set_has_alphabet(); + } + _impl_.has_alphabet_.alphabet_ = value; } inline void Pronunciation::set_alphabet(::valhalla::Pronunciation_Alphabet value) { _internal_set_alphabet(value); @@ -7957,18 +11530,33 @@ inline void Pronunciation::set_alphabet(::valhalla::Pronunciation_Alphabet value } // string value = 2; +inline bool Pronunciation::_internal_has_value() const { + return has_value_case() == kValue; +} +inline bool Pronunciation::has_value() const { + return _internal_has_value(); +} +inline void Pronunciation::set_has_value() { + _impl_._oneof_case_[1] = kValue; +} inline void Pronunciation::clear_value() { - _impl_.value_.ClearToEmpty(); + if (_internal_has_value()) { + _impl_.has_value_.value_.Destroy(); + clear_has_has_value(); + } } inline const std::string& Pronunciation::value() const { // @@protoc_insertion_point(field_get:valhalla.Pronunciation.value) return _internal_value(); } template -inline PROTOBUF_ALWAYS_INLINE -void Pronunciation::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void Pronunciation::set_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.Pronunciation.value) } inline std::string* Pronunciation::mutable_value() { @@ -7977,52 +11565,97 @@ inline std::string* Pronunciation::mutable_value() { return _s; } inline const std::string& Pronunciation::_internal_value() const { - return _impl_.value_.Get(); + if (_internal_has_value()) { + return _impl_.has_value_.value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void Pronunciation::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.Set(value, GetArenaForAllocation()); } inline std::string* Pronunciation::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + return _impl_.has_value_.value_.Mutable( GetArenaForAllocation()); } inline std::string* Pronunciation::release_value() { // @@protoc_insertion_point(field_release:valhalla.Pronunciation.value) - return _impl_.value_.Release(); + if (_internal_has_value()) { + clear_has_has_value(); + return _impl_.has_value_.value_.Release(); + } else { + return nullptr; + } } inline void Pronunciation::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - + if (has_has_value()) { + clear_has_value(); } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); + if (value != nullptr) { + set_has_value(); + _impl_.has_value_.value_.InitAllocated(value, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.Pronunciation.value) } +inline bool Pronunciation::has_has_alphabet() const { + return has_alphabet_case() != HAS_ALPHABET_NOT_SET; +} +inline void Pronunciation::clear_has_has_alphabet() { + _impl_._oneof_case_[0] = HAS_ALPHABET_NOT_SET; +} +inline bool Pronunciation::has_has_value() const { + return has_value_case() != HAS_VALUE_NOT_SET; +} +inline void Pronunciation::clear_has_has_value() { + _impl_._oneof_case_[1] = HAS_VALUE_NOT_SET; +} +inline Pronunciation::HasAlphabetCase Pronunciation::has_alphabet_case() const { + return Pronunciation::HasAlphabetCase(_impl_._oneof_case_[0]); +} +inline Pronunciation::HasValueCase Pronunciation::has_value_case() const { + return Pronunciation::HasValueCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // StreetName // string value = 1; +inline bool StreetName::_internal_has_value() const { + return has_value_case() == kValue; +} +inline bool StreetName::has_value() const { + return _internal_has_value(); +} +inline void StreetName::set_has_value() { + _impl_._oneof_case_[0] = kValue; +} inline void StreetName::clear_value() { - _impl_.value_.ClearToEmpty(); + if (_internal_has_value()) { + _impl_.has_value_.value_.Destroy(); + clear_has_has_value(); + } } inline const std::string& StreetName::value() const { // @@protoc_insertion_point(field_get:valhalla.StreetName.value) return _internal_value(); } template -inline PROTOBUF_ALWAYS_INLINE -void StreetName::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.Set(static_cast(arg0), args..., GetArenaForAllocation()); +inline void StreetName::set_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.Set( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.StreetName.value) } inline std::string* StreetName::mutable_value() { @@ -8031,50 +11664,80 @@ inline std::string* StreetName::mutable_value() { return _s; } inline const std::string& StreetName::_internal_value() const { - return _impl_.value_.Get(); + if (_internal_has_value()) { + return _impl_.has_value_.value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void StreetName::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.Set(value, GetArenaForAllocation()); } inline std::string* StreetName::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + return _impl_.has_value_.value_.Mutable( GetArenaForAllocation()); } inline std::string* StreetName::release_value() { // @@protoc_insertion_point(field_release:valhalla.StreetName.value) - return _impl_.value_.Release(); + if (_internal_has_value()) { + clear_has_has_value(); + return _impl_.has_value_.value_.Release(); + } else { + return nullptr; + } } inline void StreetName::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - + if (has_has_value()) { + clear_has_value(); } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); + if (value != nullptr) { + set_has_value(); + _impl_.has_value_.value_.InitAllocated(value, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.StreetName.value) } // bool is_route_number = 2; +inline bool StreetName::_internal_has_is_route_number() const { + return has_is_route_number_case() == kIsRouteNumber; +} +inline bool StreetName::has_is_route_number() const { + return _internal_has_is_route_number(); +} +inline void StreetName::set_has_is_route_number() { + _impl_._oneof_case_[1] = kIsRouteNumber; +} inline void StreetName::clear_is_route_number() { - _impl_.is_route_number_ = false; + if (_internal_has_is_route_number()) { + _impl_.has_is_route_number_.is_route_number_ = false; + clear_has_has_is_route_number(); + } } inline bool StreetName::_internal_is_route_number() const { - return _impl_.is_route_number_; + if (_internal_has_is_route_number()) { + return _impl_.has_is_route_number_.is_route_number_; + } + return false; +} +inline void StreetName::_internal_set_is_route_number(bool value) { + if (!_internal_has_is_route_number()) { + clear_has_is_route_number(); + set_has_is_route_number(); + } + _impl_.has_is_route_number_.is_route_number_ = value; } inline bool StreetName::is_route_number() const { // @@protoc_insertion_point(field_get:valhalla.StreetName.is_route_number) return _internal_is_route_number(); } -inline void StreetName::_internal_set_is_route_number(bool value) { - - _impl_.is_route_number_ = value; -} inline void StreetName::set_is_route_number(bool value) { _internal_set_is_route_number(value); // @@protoc_insertion_point(field_set:valhalla.StreetName.is_route_number) @@ -8170,44 +11833,98 @@ inline void StreetName::set_allocated_pronunciation(::valhalla::Pronunciation* p // @@protoc_insertion_point(field_set_allocated:valhalla.StreetName.pronunciation) } +inline bool StreetName::has_has_value() const { + return has_value_case() != HAS_VALUE_NOT_SET; +} +inline void StreetName::clear_has_has_value() { + _impl_._oneof_case_[0] = HAS_VALUE_NOT_SET; +} +inline bool StreetName::has_has_is_route_number() const { + return has_is_route_number_case() != HAS_IS_ROUTE_NUMBER_NOT_SET; +} +inline void StreetName::clear_has_has_is_route_number() { + _impl_._oneof_case_[1] = HAS_IS_ROUTE_NUMBER_NOT_SET; +} +inline StreetName::HasValueCase StreetName::has_value_case() const { + return StreetName::HasValueCase(_impl_._oneof_case_[0]); +} +inline StreetName::HasIsRouteNumberCase StreetName::has_is_route_number_case() const { + return StreetName::HasIsRouteNumberCase(_impl_._oneof_case_[1]); +} // ------------------------------------------------------------------- // TurnLane // uint32 directions_mask = 1; +inline bool TurnLane::_internal_has_directions_mask() const { + return has_directions_mask_case() == kDirectionsMask; +} +inline bool TurnLane::has_directions_mask() const { + return _internal_has_directions_mask(); +} +inline void TurnLane::set_has_directions_mask() { + _impl_._oneof_case_[0] = kDirectionsMask; +} inline void TurnLane::clear_directions_mask() { - _impl_.directions_mask_ = 0u; + if (_internal_has_directions_mask()) { + _impl_.has_directions_mask_.directions_mask_ = 0u; + clear_has_has_directions_mask(); + } } inline uint32_t TurnLane::_internal_directions_mask() const { - return _impl_.directions_mask_; + if (_internal_has_directions_mask()) { + return _impl_.has_directions_mask_.directions_mask_; + } + return 0u; +} +inline void TurnLane::_internal_set_directions_mask(uint32_t value) { + if (!_internal_has_directions_mask()) { + clear_has_directions_mask(); + set_has_directions_mask(); + } + _impl_.has_directions_mask_.directions_mask_ = value; } inline uint32_t TurnLane::directions_mask() const { // @@protoc_insertion_point(field_get:valhalla.TurnLane.directions_mask) return _internal_directions_mask(); } -inline void TurnLane::_internal_set_directions_mask(uint32_t value) { - - _impl_.directions_mask_ = value; -} inline void TurnLane::set_directions_mask(uint32_t value) { _internal_set_directions_mask(value); // @@protoc_insertion_point(field_set:valhalla.TurnLane.directions_mask) } // .valhalla.TurnLane.State state = 2; +inline bool TurnLane::_internal_has_state() const { + return has_state_case() == kState; +} +inline bool TurnLane::has_state() const { + return _internal_has_state(); +} +inline void TurnLane::set_has_state() { + _impl_._oneof_case_[1] = kState; +} inline void TurnLane::clear_state() { - _impl_.state_ = 0; + if (_internal_has_state()) { + _impl_.has_state_.state_ = 0; + clear_has_has_state(); + } } inline ::valhalla::TurnLane_State TurnLane::_internal_state() const { - return static_cast< ::valhalla::TurnLane_State >(_impl_.state_); + if (_internal_has_state()) { + return static_cast< ::valhalla::TurnLane_State >(_impl_.has_state_.state_); + } + return static_cast< ::valhalla::TurnLane_State >(0); } inline ::valhalla::TurnLane_State TurnLane::state() const { // @@protoc_insertion_point(field_get:valhalla.TurnLane.state) return _internal_state(); } inline void TurnLane::_internal_set_state(::valhalla::TurnLane_State value) { - - _impl_.state_ = value; + if (!_internal_has_state()) { + clear_has_state(); + set_has_state(); + } + _impl_.has_state_.state_ = value; } inline void TurnLane::set_state(::valhalla::TurnLane_State value) { _internal_set_state(value); @@ -8215,42 +11932,102 @@ inline void TurnLane::set_state(::valhalla::TurnLane_State value) { } // uint32 active_direction = 3; +inline bool TurnLane::_internal_has_active_direction() const { + return has_active_direction_case() == kActiveDirection; +} +inline bool TurnLane::has_active_direction() const { + return _internal_has_active_direction(); +} +inline void TurnLane::set_has_active_direction() { + _impl_._oneof_case_[2] = kActiveDirection; +} inline void TurnLane::clear_active_direction() { - _impl_.active_direction_ = 0u; + if (_internal_has_active_direction()) { + _impl_.has_active_direction_.active_direction_ = 0u; + clear_has_has_active_direction(); + } } inline uint32_t TurnLane::_internal_active_direction() const { - return _impl_.active_direction_; + if (_internal_has_active_direction()) { + return _impl_.has_active_direction_.active_direction_; + } + return 0u; +} +inline void TurnLane::_internal_set_active_direction(uint32_t value) { + if (!_internal_has_active_direction()) { + clear_has_active_direction(); + set_has_active_direction(); + } + _impl_.has_active_direction_.active_direction_ = value; } inline uint32_t TurnLane::active_direction() const { // @@protoc_insertion_point(field_get:valhalla.TurnLane.active_direction) return _internal_active_direction(); } -inline void TurnLane::_internal_set_active_direction(uint32_t value) { - - _impl_.active_direction_ = value; -} inline void TurnLane::set_active_direction(uint32_t value) { _internal_set_active_direction(value); // @@protoc_insertion_point(field_set:valhalla.TurnLane.active_direction) } +inline bool TurnLane::has_has_directions_mask() const { + return has_directions_mask_case() != HAS_DIRECTIONS_MASK_NOT_SET; +} +inline void TurnLane::clear_has_has_directions_mask() { + _impl_._oneof_case_[0] = HAS_DIRECTIONS_MASK_NOT_SET; +} +inline bool TurnLane::has_has_state() const { + return has_state_case() != HAS_STATE_NOT_SET; +} +inline void TurnLane::clear_has_has_state() { + _impl_._oneof_case_[1] = HAS_STATE_NOT_SET; +} +inline bool TurnLane::has_has_active_direction() const { + return has_active_direction_case() != HAS_ACTIVE_DIRECTION_NOT_SET; +} +inline void TurnLane::clear_has_has_active_direction() { + _impl_._oneof_case_[2] = HAS_ACTIVE_DIRECTION_NOT_SET; +} +inline TurnLane::HasDirectionsMaskCase TurnLane::has_directions_mask_case() const { + return TurnLane::HasDirectionsMaskCase(_impl_._oneof_case_[0]); +} +inline TurnLane::HasStateCase TurnLane::has_state_case() const { + return TurnLane::HasStateCase(_impl_._oneof_case_[1]); +} +inline TurnLane::HasActiveDirectionCase TurnLane::has_active_direction_case() const { + return TurnLane::HasActiveDirectionCase(_impl_._oneof_case_[2]); +} // ------------------------------------------------------------------- // TaggedValue // bytes value = 1; +inline bool TaggedValue::_internal_has_value() const { + return has_value_case() == kValue; +} +inline bool TaggedValue::has_value() const { + return _internal_has_value(); +} +inline void TaggedValue::set_has_value() { + _impl_._oneof_case_[0] = kValue; +} inline void TaggedValue::clear_value() { - _impl_.value_.ClearToEmpty(); + if (_internal_has_value()) { + _impl_.has_value_.value_.Destroy(); + clear_has_has_value(); + } } inline const std::string& TaggedValue::value() const { // @@protoc_insertion_point(field_get:valhalla.TaggedValue.value) return _internal_value(); } template -inline PROTOBUF_ALWAYS_INLINE -void TaggedValue::set_value(ArgT0&& arg0, ArgT... args) { - - _impl_.value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); +inline void TaggedValue::set_value(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.SetBytes( static_cast(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:valhalla.TaggedValue.value) } inline std::string* TaggedValue::mutable_value() { @@ -8259,55 +12036,103 @@ inline std::string* TaggedValue::mutable_value() { return _s; } inline const std::string& TaggedValue::_internal_value() const { - return _impl_.value_.Get(); + if (_internal_has_value()) { + return _impl_.has_value_.value_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void TaggedValue::_internal_set_value(const std::string& value) { - - _impl_.value_.Set(value, GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + _impl_.has_value_.value_.Set(value, GetArenaForAllocation()); } inline std::string* TaggedValue::_internal_mutable_value() { - - return _impl_.value_.Mutable(GetArenaForAllocation()); + if (!_internal_has_value()) { + clear_has_value(); + set_has_value(); + _impl_.has_value_.value_.InitDefault(); + } + return _impl_.has_value_.value_.Mutable( GetArenaForAllocation()); } inline std::string* TaggedValue::release_value() { // @@protoc_insertion_point(field_release:valhalla.TaggedValue.value) - return _impl_.value_.Release(); + if (_internal_has_value()) { + clear_has_has_value(); + return _impl_.has_value_.value_.Release(); + } else { + return nullptr; + } } inline void TaggedValue::set_allocated_value(std::string* value) { - if (value != nullptr) { - - } else { - + if (has_has_value()) { + clear_has_value(); } - _impl_.value_.SetAllocated(value, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.value_.IsDefault()) { - _impl_.value_.Set("", GetArenaForAllocation()); + if (value != nullptr) { + set_has_value(); + _impl_.has_value_.value_.InitAllocated(value, GetArenaForAllocation()); } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING // @@protoc_insertion_point(field_set_allocated:valhalla.TaggedValue.value) } // .valhalla.TaggedValue.Type type = 2; +inline bool TaggedValue::_internal_has_type() const { + return has_type_case() == kType; +} +inline bool TaggedValue::has_type() const { + return _internal_has_type(); +} +inline void TaggedValue::set_has_type() { + _impl_._oneof_case_[1] = kType; +} inline void TaggedValue::clear_type() { - _impl_.type_ = 0; + if (_internal_has_type()) { + _impl_.has_type_.type_ = 0; + clear_has_has_type(); + } } inline ::valhalla::TaggedValue_Type TaggedValue::_internal_type() const { - return static_cast< ::valhalla::TaggedValue_Type >(_impl_.type_); + if (_internal_has_type()) { + return static_cast< ::valhalla::TaggedValue_Type >(_impl_.has_type_.type_); + } + return static_cast< ::valhalla::TaggedValue_Type >(0); } inline ::valhalla::TaggedValue_Type TaggedValue::type() const { // @@protoc_insertion_point(field_get:valhalla.TaggedValue.type) return _internal_type(); } inline void TaggedValue::_internal_set_type(::valhalla::TaggedValue_Type value) { - - _impl_.type_ = value; + if (!_internal_has_type()) { + clear_has_type(); + set_has_type(); + } + _impl_.has_type_.type_ = value; } inline void TaggedValue::set_type(::valhalla::TaggedValue_Type value) { _internal_set_type(value); // @@protoc_insertion_point(field_set:valhalla.TaggedValue.type) } +inline bool TaggedValue::has_has_value() const { + return has_value_case() != HAS_VALUE_NOT_SET; +} +inline void TaggedValue::clear_has_has_value() { + _impl_._oneof_case_[0] = HAS_VALUE_NOT_SET; +} +inline bool TaggedValue::has_has_type() const { + return has_type_case() != HAS_TYPE_NOT_SET; +} +inline void TaggedValue::clear_has_has_type() { + _impl_._oneof_case_[1] = HAS_TYPE_NOT_SET; +} +inline TaggedValue::HasValueCase TaggedValue::has_value_case() const { + return TaggedValue::HasValueCase(_impl_._oneof_case_[0]); +} +inline TaggedValue::HasTypeCase TaggedValue::has_type_case() const { + return TaggedValue::HasTypeCase(_impl_._oneof_case_[1]); +} #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -8337,8 +12162,6 @@ inline void TaggedValue::set_type(::valhalla::TaggedValue_Type value) { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) @@ -8347,8 +12170,8 @@ inline void TaggedValue::set_type(::valhalla::TaggedValue_Type value) { PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::valhalla::Location_Type> : ::std::true_type {}; -template <> struct is_proto_enum< ::valhalla::Location_PreferredSide> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::Location_SideOfStreet> : ::std::true_type {}; +template <> struct is_proto_enum< ::valhalla::Location_PreferredSide> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::TransitPlatformInfo_Type> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::Pronunciation_Alphabet> : ::std::true_type {}; template <> struct is_proto_enum< ::valhalla::TurnLane_State> : ::std::true_type {}; @@ -8365,4 +12188,4 @@ PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_common_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tripcommon_2eproto diff --git a/lib/linux/libcurl.so.4 b/lib/linux/libcurl.so.4 index a5cbca5..8e12e1f 100644 Binary files a/lib/linux/libcurl.so.4 and b/lib/linux/libcurl.so.4 differ diff --git a/lib/linux/libprotobuf-lite.a b/lib/linux/libprotobuf-lite.a index fe39248..a61201a 100644 Binary files a/lib/linux/libprotobuf-lite.a and b/lib/linux/libprotobuf-lite.a differ diff --git a/lib/linux/libvalhalla.a b/lib/linux/libvalhalla.a index a53de60..faf56ed 100644 Binary files a/lib/linux/libvalhalla.a and b/lib/linux/libvalhalla.a differ diff --git a/lib/linux/libz.so.1 b/lib/linux/libz.so.1 index b5c44bc..b6c20e1 100644 Binary files a/lib/linux/libz.so.1 and b/lib/linux/libz.so.1 differ diff --git a/scripts/build_linux_do.sh b/scripts/build_linux_do.sh index 1c19189..7ec25f6 100755 --- a/scripts/build_linux_do.sh +++ b/scripts/build_linux_do.sh @@ -7,7 +7,7 @@ cd valhalla-py git config --global --add safe.directory /valhalla-py/upstream # locally extend the PATH to avoid problems -PATH="${PATH}:/opt/_internal/cpython-3.10.11/bin" +PATH="${PATH}:/opt/_internal/cpython-3.10.14/bin" # install conan python3.10 -m pip install --upgrade pip "conan<2.0.0" @@ -21,7 +21,7 @@ git apply --reject --whitespace=fix ../upstream_patches/* popd # build valhalla -cmake -B upstream/build -S upstream/ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF -DENABLE_DATA_TOOLS=OFF -DENABLE_SERVICES=OFF -DENABLE_HTTP=OFF -DENABLE_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release +cmake -B upstream/build -S upstream/ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DENABLE_BENCHMARKS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF -DENABLE_DATA_TOOLS=OFF -DENABLE_SERVICES=OFF -DENABLE_HTTP=OFF -DENABLE_CCACHE=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_SINGLE_FILES_WERROR=OFF cmake --build upstream/build -- -j$(nproc) echo "copying all headers" @@ -40,6 +40,9 @@ if [[ -d build ]]; then rm -r build fi +mv include/common/valhalla/config.h.cmake include/common/valhalla/config.h +mv include/common/valhalla/valhalla.h.in include/common/valhalla/valhalla.h + # copy most recent valhalla_build_config.py cp upstream/scripts/valhalla_build_config valhalla/valhalla_build_config.py diff --git a/upstream b/upstream index cbabe7c..b5ce7c4 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit cbabe7cfbad2225090e4c006c778f1f0a7b3ec4e +Subproject commit b5ce7c418cb307a8d8f362aa07ed3a9c73ea3572 diff --git a/upstream_patches/boost_conan_only_d2f766700.patch b/upstream_patches/boost_conan_only_b5ce7c418c.patch similarity index 99% rename from upstream_patches/boost_conan_only_d2f766700.patch rename to upstream_patches/boost_conan_only_b5ce7c418c.patch index dc696a2..f1cb8d9 100644 --- a/upstream_patches/boost_conan_only_d2f766700.patch +++ b/upstream_patches/boost_conan_only_b5ce7c418c.patch @@ -3,7 +3,7 @@ index 5261f8ae1..03c69bad9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,7 @@ find_package(ZLIB REQUIRED) - + # try to find an installed boost or install locally with conan set(boost_VERSION "1.71") -find_package(Boost ${boost_VERSION} QUIET) diff --git a/upstream_patches/custom_eclever_actor_b5ce7c418c.patch b/upstream_patches/custom_eclever_actor_b5ce7c418c.patch new file mode 100644 index 0000000..6268ca5 --- /dev/null +++ b/upstream_patches/custom_eclever_actor_b5ce7c418c.patch @@ -0,0 +1,261 @@ +diff --git a/.gitignore b/.gitignore +index 1fd592245..e3a14ee02 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,6 +1,8 @@ + # editor temporary / backup files + *~ + ++conan_data ++ + # built objects + valhalla_run_map_match + valhalla_meili_worker +diff --git a/src/baldr/graphreader.cc b/src/baldr/graphreader.cc +index 2769f96ca..f1c246ce6 100644 +--- a/src/baldr/graphreader.cc ++++ b/src/baldr/graphreader.cc +@@ -815,9 +815,28 @@ GraphId GraphReader::GetShortcut(const GraphId& id) { + + // Unpack edges for a given shortcut edge + std::vector GraphReader::RecoverShortcut(const GraphId& shortcut_id) { +- return shortcut_recovery_t::get_instance().get(shortcut_id, *this); ++ auto shortcut_ints = shortcut_recovery_t::get_instance().get(shortcut_id, *this); ++ std::vector out; ++ std::transform(shortcut_ints.begin(), shortcut_ints.end(), std::back_inserter(out), [](uint64_t v){ ++ return valhalla::baldr::GraphId(v); ++ }); ++ return out; + } + ++std::unordered_map> GraphReader::GetAllShortcuts() { ++ return shortcut_recovery_t::get_instance().shortcuts; ++} ++ ++uint32_t GraphReader::GetEdgeSpeed(const uint64_t edge_id) { ++ const auto gid = GraphId(edge_id); ++ auto tile = GetGraphTile(gid); ++ if (tile == nullptr) { ++ return 0; ++ } ++ const baldr::DirectedEdge* de = tile->directededge(gid); ++ return tile->GetSpeed(de); ++}; ++ + // Convenience method to get the relative edge density (from the + // begin node of an edge). + uint32_t GraphReader::GetEdgeDensity(const GraphId& edgeid) { +diff --git a/src/baldr/shortcut_recovery.h b/src/baldr/shortcut_recovery.h +index 21bc006c1..bd049867f 100644 +--- a/src/baldr/shortcut_recovery.h ++++ b/src/baldr/shortcut_recovery.h +@@ -48,18 +48,18 @@ protected: + auto shortcut_id = tile->header()->graphid(); + shortcut_id.set_id(&edge - tile->directededge(0)); + // skip already found opposing edges +- if (shortcuts.find(shortcut_id) != shortcuts.end()) ++ if (shortcuts.find(shortcut_id.value) != shortcuts.end()) + continue; + // recover the shortcut and make a copy for opposing direction + auto recovered = recover_shortcut(*reader, shortcut_id); + decltype(recovered) opp_recovered = recovered; + std::reverse_copy(recovered.cbegin(), recovered.cend(), opp_recovered.begin()); + // save some stats +- bool failed = recovered.front() == shortcut_id; ++ bool failed = recovered.front() == shortcut_id.value; + unrecovered += failed; + superseded += failed ? 0 : recovered.size(); + // cache it even if it failed (no point in trying the same thing twice) +- shortcuts.emplace(shortcut_id, std::move(recovered)); ++ shortcuts.emplace(shortcut_id.value, std::move(recovered)); + + // its cheaper to get the opposing without crawling the graph + auto opp_tile = tile; +@@ -68,18 +68,19 @@ protected: + continue; // dont store edges which arent in our tileset + + for (auto& id : opp_recovered) { +- id = reader->GetOpposingEdgeId(id, opp_tile); +- if (!id.Is_Valid()) { +- opp_recovered = {opp_id}; ++ auto gid = valhalla::baldr::GraphId(id); ++ id = reader->GetOpposingEdgeId(gid, opp_tile); ++ if (!gid.Is_Valid()) { ++ opp_recovered = {opp_id.value}; + break; + } + } + // stats +- failed = opp_recovered.front() == opp_id; ++ failed = opp_recovered.front() == opp_id.value; + unrecovered += failed; + superseded += failed ? 0 : opp_recovered.size(); + // cache it even if it failed (no point in trying the same thing twice) +- shortcuts.emplace(opp_id, std::move(opp_recovered)); ++ shortcuts.emplace(opp_id.value, std::move(opp_recovered)); + } + } + } +@@ -95,7 +96,7 @@ protected: + * @param shortcutid Graph Id of the shortcut edge. + * @return Returns the edgeids of the directed edges this shortcut represents. + */ +- std::vector ++ std::vector + recover_shortcut(valhalla::baldr::GraphReader& reader, + const valhalla::baldr::GraphId& shortcut_id) const { + using namespace valhalla::baldr; +@@ -115,11 +116,12 @@ protected: + return {shortcut_id}; + + // loop over the edges leaving its begin node and find the superseded edge +- std::vector edges; ++ std::vector edges; + for (const DirectedEdge& de : tile->GetDirectedEdges(begin_node.id())) { + if (shortcut->shortcut() & de.superseded()) { +- edges.push_back(tile->header()->graphid()); +- edges.back().set_id(&de - tile->directededge(0)); ++ auto e_id = tile->header()->graphid(); ++ e_id.set_id(&de - tile->directededge(0)); ++ edges.push_back(e_id.value); + break; + } + } +@@ -132,7 +134,7 @@ protected: + } + + // seed the edge walking with the first edge +- const DirectedEdge* current_edge = tile->directededge(edges.back()); ++ const DirectedEdge* current_edge = tile->directededge(valhalla::baldr::GraphId(edges.back())); + uint32_t accumulated_length = current_edge->length(); + + // walk edges until we find the same ending node as the shortcut +@@ -161,8 +163,9 @@ protected: + edge.unpaved() == shortcut->unpaved() && edge.surface() == shortcut->surface()/* && + edge.speed() == shortcut->speed()*/) { + // we are going to keep this edge +- edges.emplace_back(tile->header()->graphid()); +- edges.back().set_id(&edge - tile->directededge(0)); ++ auto e_id = tile->header()->graphid(); ++ e_id.set_id(&edge - tile->directededge(0)); ++ edges.emplace_back(e_id.value); + // and keep expanding from the end of it + current_edge = &edge; + begin_node = tile->header()->graphid(); +@@ -194,13 +197,14 @@ protected: + return edges; + } + +- // a place to cache the recovered shortcuts +- std::unordered_map> shortcuts; + // a place to keep some stats about the recovery + size_t unrecovered; + size_t superseded; + + public: ++ // a place to cache the recovered shortcuts ++ std::unordered_map> shortcuts; ++ + /** + * returns a static instance of the cache after prefilling it. if on the first call, + * the reader is nullptr then the cache will not be filled and recovery will be on the fly +@@ -220,8 +224,8 @@ public: + * @param shortcut_id the shortcuts edge id + * @return the list of superceded edges + */ +- std::vector get(const valhalla::baldr::GraphId& shortcut_id, +- valhalla::baldr::GraphReader& reader) const { ++ std::vector get(const valhalla::baldr::GraphId& shortcut_id, ++ valhalla::baldr::GraphReader& reader) const { + // in the case that we didnt fill the cache we fallback to recovering on the fly + auto itr = shortcuts.find(shortcut_id); + if (itr == shortcuts.cend()) +diff --git a/src/tyr/actor.cc b/src/tyr/actor.cc +index ba49314c9..f5030c6c7 100644 +--- a/src/tyr/actor.cc ++++ b/src/tyr/actor.cc +@@ -363,5 +363,26 @@ actor_t::status(const std::string& request_str, const std::function* int + return json; + } + ++std::string actor_t::get_livespeed(const uint64_t value) { ++ auto edge_id = valhalla::baldr::GraphId(value); ++ auto tile = pimpl->reader->GetGraphTile(edge_id); ++ auto* directed_edge = tile->directededge(edge_id); ++ auto edge_info = tile->edgeinfo(directed_edge); ++ // live traffic information ++ const volatile auto& traffic = tile->trafficspeed(directed_edge); ++ auto live_speed = traffic.json(); ++ ++ std::stringstream ss; ++ ss << *live_speed; ++ return ss.str(); ++} ++ ++std::unordered_map> actor_t::get_all_shortcuts() { ++ return pimpl->reader->GetAllShortcuts(); ++} ++ ++uint32_t actor_t::get_edge_speed(const uint64_t value) { ++ return pimpl->reader->GetEdgeSpeed(value); ++} + } // namespace tyr + } // namespace valhalla +diff --git a/test/recover_shortcut.cc b/test/recover_shortcut.cc +index cc92cdd5a..222a9bd1e 100644 +--- a/test/recover_shortcut.cc ++++ b/test/recover_shortcut.cc +@@ -80,8 +80,9 @@ void recover(bool cache) { + // accumulate the shape along the edges that we recovered + std::vector recovered_shape; + for (auto edgeid : edgeids) { +- auto tile = graphreader.GetGraphTile(edgeid); +- const auto* de = tile->directededge(edgeid); ++ auto gid = GraphId(edgeid); ++ auto tile = graphreader.GetGraphTile(gid); ++ const auto* de = tile->directededge(gid); + auto de_shape = tile->edgeinfo(de).shape(); + if (!de->forward()) { + std::reverse(de_shape.begin(), de_shape.end()); +diff --git a/valhalla/baldr/graphreader.h b/valhalla/baldr/graphreader.h +index c819ffa5c..ac081bc94 100644 +--- a/valhalla/baldr/graphreader.h ++++ b/valhalla/baldr/graphreader.h +@@ -694,6 +694,22 @@ public: + */ + std::vector RecoverShortcut(const GraphId& shortcutid); + ++ /** ++ * Returns overall speeds for all relevant shortcuts, i.e. the ones ++ * containing traffic matched edge_ids ++ *@return Returns a map of shortcut IDs to recovered edge IDs ++ */ ++ std::unordered_map> GetAllShortcuts(); ++ ++ /** ++ * Returns the speed for an edge not covered by live speed ++ * NOTE: will not give live speed results, since we initialize the Actor without ++ * to be able to map-match properly ++ * @return Speed of an edge not covered by live speed ++ */ ++ ++ uint32_t GetEdgeSpeed(const uint64_t edge_id); ++ + /** + * Convenience method to get the relative edge density (from the + * begin node of an edge). +diff --git a/valhalla/tyr/actor.h b/valhalla/tyr/actor.h +index 43ecb75d2..c78e11162 100644 +--- a/valhalla/tyr/actor.h ++++ b/valhalla/tyr/actor.h +@@ -213,6 +213,10 @@ public: + const std::function* interrupt = nullptr, + Api* api = nullptr); + ++ std::string get_livespeed(const uint64_t value); ++ std::unordered_map> get_all_shortcuts(); ++ std::uint32_t get_edge_speed(const uint64_t value); ++ + protected: + struct pimpl_t; + std::shared_ptr pimpl; diff --git a/upstream_patches/custom_eclever_locate_serializer_b5ce7c418c.patch b/upstream_patches/custom_eclever_locate_serializer_b5ce7c418c.patch new file mode 100644 index 0000000..92cd19a --- /dev/null +++ b/upstream_patches/custom_eclever_locate_serializer_b5ce7c418c.patch @@ -0,0 +1,192 @@ +diff --git a/src/baldr/directededge.cc b/src/baldr/directededge.cc +index f52dd1a09..e73fbb0ab 100644 +--- a/src/baldr/directededge.cc ++++ b/src/baldr/directededge.cc +@@ -575,57 +575,57 @@ void DirectedEdge::set_bss_connection(const bool bss_connection) { + // Json representation + json::MapPtr DirectedEdge::json() const { + json::MapPtr map = json::map({ +- {"end_node", endnode().json()}, +- {"speeds", json::map({ +- {"default", static_cast(speed_)}, +- {"type", to_string(static_cast(speed_type_))}, +- {"free_flow", static_cast(free_flow_speed_)}, +- {"constrained_flow", static_cast(constrained_flow_speed_)}, +- {"predicted", static_cast(has_predicted_speed_)}, +- })}, +- //{"opp_index", static_cast(opp_index_)}, +- //{"edge_info_offset", static_cast(edgeinfo_offset_)}, +- //{"restrictions", restrictions_}, +- {"access_restriction", static_cast(access_restriction_)}, +- {"start_restriction", access_json(start_restriction_)}, +- {"end_restriction", access_json(end_restriction_)}, +- {"part_of_complex_restriction", static_cast(complex_restriction_)}, +- {"has_sign", static_cast(sign_)}, +- {"toll", static_cast(toll_)}, +- {"seasonal", static_cast(seasonal_)}, +- {"destination_only", static_cast(dest_only_)}, +- {"tunnel", static_cast(tunnel_)}, +- {"bridge", static_cast(bridge_)}, +- {"round_about", static_cast(roundabout_)}, +- {"traffic_signal", static_cast(traffic_signal_)}, ++// {"end_node", endnode().json()}, ++// {"speeds", json::map({ ++// {"default", static_cast(speed_)}, ++// {"type", to_string(static_cast(speed_type_))}, ++// {"free_flow", static_cast(free_flow_speed_)}, ++// {"constrained_flow", static_cast(constrained_flow_speed_)}, ++// {"predicted", static_cast(has_predicted_speed_)}, ++// })}, ++// //{"opp_index", static_cast(opp_index_)}, ++// //{"edge_info_offset", static_cast(edgeinfo_offset_)}, ++// //{"restrictions", restrictions_}, ++// {"access_restriction", static_cast(access_restriction_)}, ++// {"start_restriction", access_json(start_restriction_)}, ++// {"end_restriction", access_json(end_restriction_)}, ++// {"part_of_complex_restriction", static_cast(complex_restriction_)}, ++// {"has_sign", static_cast(sign_)}, ++// {"toll", static_cast(toll_)}, ++// {"seasonal", static_cast(seasonal_)}, ++// {"destination_only", static_cast(dest_only_)}, ++// {"tunnel", static_cast(tunnel_)}, ++// {"bridge", static_cast(bridge_)}, ++// {"round_about", static_cast(roundabout_)}, ++// {"traffic_signal", static_cast(traffic_signal_)}, + {"forward", static_cast(forward_)}, +- {"not_thru", static_cast(not_thru_)}, +- {"stop_sign", static_cast(stop_sign_)}, +- {"yield_sign", static_cast(yield_sign_)}, +- {"cycle_lane", to_string(static_cast(cycle_lane_))}, +- {"bike_network", static_cast(bike_network_)}, +- {"truck_route", static_cast(truck_route_)}, +- {"lane_count", static_cast(lanecount_)}, +- {"country_crossing", static_cast(ctry_crossing_)}, +- {"sidewalk_left", static_cast(sidewalk_left_)}, +- {"sidewalk_right", static_cast(sidewalk_right_)}, +- {"sac_scale", to_string(static_cast(sac_scale_))}, ++// {"not_thru", static_cast(not_thru_)}, ++// {"stop_sign", static_cast(stop_sign_)}, ++// {"yield_sign", static_cast(yield_sign_)}, ++// {"cycle_lane", to_string(static_cast(cycle_lane_))}, ++// {"bike_network", static_cast(bike_network_)}, ++// {"truck_route", static_cast(truck_route_)}, ++// {"lane_count", static_cast(lanecount_)}, ++// {"country_crossing", static_cast(ctry_crossing_)}, ++// {"sidewalk_left", static_cast(sidewalk_left_)}, ++// {"sidewalk_right", static_cast(sidewalk_right_)}, ++// {"sac_scale", to_string(static_cast(sac_scale_))}, + {"geo_attributes", + json::map({ + {"length", static_cast(length_)}, +- {"weighted_grade", json::fixed_t{static_cast(weighted_grade_ - 6.0) / .6, 2}}, +- {"max_up_slope", json::fixed_t{static_cast(max_up_slope()), 2}}, +- {"max_down_slope", json::fixed_t{static_cast(max_down_slope()), 2}}, +- {"curvature", static_cast(curvature_)}, ++// {"weighted_grade", json::fixed_t{static_cast(weighted_grade_ - 6.0) / .6, 2}}, ++// {"max_up_slope", json::fixed_t{static_cast(max_up_slope()), 2}}, ++// {"max_down_slope", json::fixed_t{static_cast(max_down_slope()), 2}}, ++// {"curvature", static_cast(curvature_)}, + })}, +- {"access", access_json(forwardaccess_)}, ++// {"access", access_json(forwardaccess_)}, + //{"access", access_json(reverseaccess_)}, + {"classification", json::map({ + {"classification", to_string(static_cast(classification_))}, +- {"use", to_string(static_cast(use_))}, +- {"surface", to_string(static_cast(surface_))}, +- {"link", static_cast(link_)}, +- {"internal", static_cast(internal_)}, ++// {"use", to_string(static_cast(use_))}, ++// {"surface", to_string(static_cast(surface_))}, ++// {"link", static_cast(link_)}, ++// {"internal", static_cast(internal_)}, + })}, + /*{"hierarchy", json::map({ + {"local_edge_index", static_cast(localedgeidx_)}, +@@ -636,9 +636,9 @@ json::MapPtr DirectedEdge::json() const { + })},*/ + }); + +- if (is_hov_only()) { +- map->emplace("hov_type", to_string(static_cast(hov_type_))); +- } ++// if (is_hov_only()) { ++// map->emplace("hov_type", to_string(static_cast(hov_type_))); ++// } + + return map; + } +diff --git a/src/tyr/locate_serializer.cc b/src/tyr/locate_serializer.cc +index 8216dca61..b661b6418 100644 +--- a/src/tyr/locate_serializer.cc ++++ b/src/tyr/locate_serializer.cc +@@ -67,37 +67,37 @@ json::ArrayPtr serialize_edges(const PathLocation& location, GraphReader& reader + auto live_speed = traffic.json(); + + // incident information +- if (traffic.has_incidents) { +- // TODO: incidents +- } ++// if (traffic.has_incidents) { ++// // TODO: incidents ++// } + + // historical traffic information +- auto predicted_speeds = json::array({}); +- if (directed_edge->has_predicted_speed()) { +- for (auto sec = 0; sec < midgard::kSecondsPerWeek; sec += 5 * midgard::kSecPerMinute) { +- predicted_speeds->emplace_back( +- static_cast(tile->GetSpeed(directed_edge, kPredictedFlowMask, sec))); +- } +- } ++// auto predicted_speeds = json::array({}); ++// if (directed_edge->has_predicted_speed()) { ++// for (auto sec = 0; sec < midgard::kSecondsPerWeek; sec += 5 * midgard::kSecPerMinute) { ++// predicted_speeds->emplace_back( ++// static_cast(tile->GetSpeed(directed_edge, kPredictedFlowMask, sec))); ++// } ++// } + + // basic rest of it plus edge metadata + array->emplace_back(json::map({ + {"correlated_lat", json::fixed_t{edge.projected.lat(), 6}}, + {"correlated_lon", json::fixed_t{edge.projected.lng(), 6}}, +- {"side_of_street", +- edge.sos == PathLocation::LEFT +- ? std::string("left") +- : (edge.sos == PathLocation::RIGHT ? std::string("right") : std::string("neither"))}, ++// {"side_of_street", ++// edge.sos == PathLocation::LEFT ++// ? std::string("left") ++// : (edge.sos == PathLocation::RIGHT ? std::string("right") : std::string("neither"))}, + {"percent_along", json::fixed_t{edge.percent_along, 5}}, + {"distance", json::fixed_t{edge.distance, 1}}, + {"heading", json::fixed_t{edge.projected_heading, 1}}, +- {"outbound_reach", static_cast(edge.outbound_reach)}, +- {"inbound_reach", static_cast(edge.inbound_reach)}, ++// {"outbound_reach", static_cast(edge.outbound_reach)}, ++// {"inbound_reach", static_cast(edge.inbound_reach)}, + {"edge_id", edge.id.json()}, + {"edge", directed_edge->json()}, +- {"edge_info", edge_info.json()}, +- {"linear_reference", linear_reference(directed_edge, edge.percent_along, edge_info)}, +- {"predicted_speeds", predicted_speeds}, ++// {"edge_info", edge_info.json()}, ++// {"linear_reference", linear_reference(directed_edge, edge.percent_along, edge_info)}, ++// {"predicted_speeds", predicted_speeds}, + {"live_speed", live_speed}, + })); + } // they want it lean and mean +@@ -166,9 +166,9 @@ json::MapPtr serialize(const PathLocation& location, GraphReader& reader, bool v + json::MapPtr serialize(const midgard::PointLL& ll, const std::string& reason, bool verbose) { + auto m = json::map({ + {"edges", static_cast(nullptr)}, +- {"nodes", static_cast(nullptr)}, +- {"input_lat", json::fixed_t{ll.lat(), 6}}, +- {"input_lon", json::fixed_t{ll.lng(), 6}}, ++// {"nodes", static_cast(nullptr)}, ++// {"input_lat", json::fixed_t{ll.lat(), 6}}, ++// {"input_lon", json::fixed_t{ll.lng(), 6}}, + }); + if (verbose) { + m->emplace("reason", reason); diff --git a/upstream_patches/custom_eclever_service_b5ce7c418c.patch b/upstream_patches/custom_eclever_service_b5ce7c418c.patch new file mode 100644 index 0000000..af22b0f --- /dev/null +++ b/upstream_patches/custom_eclever_service_b5ce7c418c.patch @@ -0,0 +1,54 @@ +diff --git a/proto/options.proto b/proto/options.proto +index e62844d46..626776aa9 100644 +--- a/proto/options.proto ++++ b/proto/options.proto +@@ -324,6 +324,7 @@ message Options { + expansion = 9; + centroid = 10; + status = 11; ++ livespeed = 12; + } + + enum DateTimeType { +diff --git a/src/proto_conversions.cc b/src/proto_conversions.cc +index 54d58b279..b9c8a1db9 100644 +--- a/src/proto_conversions.cc ++++ b/src/proto_conversions.cc +@@ -114,6 +114,7 @@ bool Options_Action_Enum_Parse(const std::string& action, Options::Action* a) { + {"expansion", Options::expansion}, + {"centroid", Options::centroid}, + {"status", Options::status}, ++ {"livespeed", Options::livespeed}, + }; + auto i = actions.find(action); + if (i == actions.cend()) +@@ -148,6 +149,7 @@ const std::string& Options_Action_Enum_Name(const Options::Action action) { + {Options::expansion, "expansion"}, + {Options::centroid, "centroid"}, + {Options::status, "status"}, ++ {Options::livespeed, "livespeed"}, + }; + auto i = actions.find(action); + return i == actions.cend() ? empty : i->second; +diff --git a/src/valhalla_service.cc b/src/valhalla_service.cc +index 82fd7cbcc..24cf19089 100644 +--- a/src/valhalla_service.cc ++++ b/src/valhalla_service.cc +@@ -82,6 +82,7 @@ int main(int argc, char** argv) { + + // do the right action + valhalla::Api request; ++ char* end; + try { + switch (action) { + case valhalla::Options::route: +@@ -117,6 +118,9 @@ int main(int argc, char** argv) { + case valhalla::Options::status: + std::cout << actor.status(request_str, nullptr, &request) << std::endl; + break; ++ case valhalla::Options::livespeed: ++ std::cout << actor.get_livespeed(std::strtoull(request_str.c_str(), &end, 10)) << std::endl; ++ break; + default: + std::cerr << "Unknown action" << std::endl; + return 1; diff --git a/upstream_patches/custom_eclever_trace_serializer_b5ce7c418c.patch b/upstream_patches/custom_eclever_trace_serializer_b5ce7c418c.patch new file mode 100644 index 0000000..5813183 --- /dev/null +++ b/upstream_patches/custom_eclever_trace_serializer_b5ce7c418c.patch @@ -0,0 +1,699 @@ +diff --git a/proto/trip.proto b/proto/trip.proto +index f5de31fa5..ac5c05f10 100644 +--- a/proto/trip.proto ++++ b/proto/trip.proto +@@ -277,6 +277,12 @@ message TripLeg { + oneof has_shoulder { + bool shoulder = 52; + } ++ oneof has_total_length_km { ++ float total_length_km = 53; ++ } ++ oneof has_shortcut_id { ++ int64 shortcut_id = 54; ++ } + } + + message IntersectingEdge { +diff --git a/src/thor/triplegbuilder.cc b/src/thor/triplegbuilder.cc +index 8cb8469c5..9bc76e8d6 100644 +--- a/src/thor/triplegbuilder.cc ++++ b/src/thor/triplegbuilder.cc +@@ -1689,6 +1689,12 @@ void TripLegBuilder::Build( + float km = + std::max(directededge->length() * kKmPerMeter * (trim_end_pct - trim_start_pct), 0.0f); + trip_edge->set_length_km(km); ++ trip_edge->set_total_length_km(std::max(directededge->length() * kKmPerMeter, 0.0f)); ++ } ++ ++ if (directededge->superseded()) { ++ const auto shortcut = graphreader.GetShortcut(edge); ++ trip_edge->set_shortcut_id(shortcut); + } + + // How long on this edge? +diff --git a/src/tyr/trace_serializer.cc b/src/tyr/trace_serializer.cc +index 68df54332..38d0960ba 100644 +--- a/src/tyr/trace_serializer.cc ++++ b/src/tyr/trace_serializer.cc +@@ -63,282 +63,296 @@ json::ArrayPtr serialize_edges(const AttributesController& controller, + + // Process each edge + auto edge_map = json::map({}); +- if (edge.has_truck_route_case()) { +- edge_map->emplace("truck_route", static_cast(edge.truck_route())); +- } +- if (edge.has_truck_speed_case() && (edge.truck_speed() > 0)) { +- edge_map->emplace("truck_speed", +- static_cast(std::round(edge.truck_speed() * scale))); +- } +- if (edge.has_speed_limit_case() && (edge.speed_limit() > 0)) { +- if (edge.speed_limit() == kUnlimitedSpeedLimit) { +- edge_map->emplace("speed_limit", std::string("unlimited")); +- } else { +- edge_map->emplace("speed_limit", +- static_cast(std::round(edge.speed_limit() * scale))); +- } +- } +- if (edge.has_density_case()) { +- edge_map->emplace("density", static_cast(edge.density())); +- } +- if (edge.has_sac_scale_case()) { +- edge_map->emplace("sac_scale", static_cast(edge.sac_scale())); +- } +- if (edge.has_shoulder_case()) { +- edge_map->emplace("shoulder", static_cast(edge.shoulder())); +- } +- if (edge.has_sidewalk_case()) { +- edge_map->emplace("sidewalk", to_string(edge.sidewalk())); +- } +- if (edge.has_bicycle_network_case()) { +- edge_map->emplace("bicycle_network", static_cast(edge.bicycle_network())); +- } +- if (edge.has_cycle_lane_case()) { +- edge_map->emplace("cycle_lane", to_string(static_cast(edge.cycle_lane()))); +- } +- if (edge.has_lane_count_case()) { +- edge_map->emplace("lane_count", static_cast(edge.lane_count())); +- } +- if (edge.lane_connectivity_size()) { +- auto lane_connectivity = json::array({}); +- for (const auto& l : edge.lane_connectivity()) { +- auto element = json::map({}); +- element->emplace("from", l.from_way_id()); +- element->emplace("to_lanes", l.to_lanes()); +- element->emplace("from_lanes", l.from_lanes()); +- lane_connectivity->push_back(element); +- } +- edge_map->emplace("lane_connectivity", lane_connectivity); +- } +- if (edge.has_max_downward_grade_case()) { +- edge_map->emplace("max_downward_grade", static_cast(edge.max_downward_grade())); +- } +- if (edge.has_max_upward_grade_case()) { +- edge_map->emplace("max_upward_grade", static_cast(edge.max_upward_grade())); +- } +- if (edge.has_weighted_grade_case()) { +- edge_map->emplace("weighted_grade", json::fixed_t{edge.weighted_grade(), 3}); +- } +- if (edge.has_mean_elevation_case()) { +- // Convert to feet if a valid elevation and units are miles +- float mean = edge.mean_elevation(); +- if (mean != kNoElevationData && options.has_units_case() && +- options.units() == Options::miles) { +- mean *= kFeetPerMeter; +- } +- edge_map->emplace("mean_elevation", static_cast(mean)); +- } +- if (edge.has_way_id_case()) { +- edge_map->emplace("way_id", static_cast(edge.way_id())); +- } ++// if (edge.has_truck_route_case()) { ++// edge_map->emplace("truck_route", static_cast(edge.truck_route())); ++// } ++// if (edge.has_truck_speed_case() && (edge.truck_speed() > 0)) { ++// edge_map->emplace("truck_speed", ++// static_cast(std::round(edge.truck_speed() * scale))); ++// } ++// if (edge.has_speed_limit_case() && (edge.speed_limit() > 0)) { ++// if (edge.speed_limit() == kUnlimitedSpeedLimit) { ++// edge_map->emplace("speed_limit", std::string("unlimited")); ++// } else { ++// edge_map->emplace("speed_limit", ++// static_cast(std::round(edge.speed_limit() * scale))); ++// } ++// } ++// if (edge.has_density_case()) { ++// edge_map->emplace("density", static_cast(edge.density())); ++// } ++// if (edge.has_sac_scale_case()) { ++// edge_map->emplace("sac_scale", static_cast(edge.sac_scale())); ++// } ++// if (edge.has_shoulder_case()) { ++// edge_map->emplace("shoulder", static_cast(edge.shoulder())); ++// } ++// if (edge.has_sidewalk_case()) { ++// edge_map->emplace("sidewalk", to_string(edge.sidewalk())); ++// } ++// if (edge.has_bicycle_network_case()) { ++// edge_map->emplace("bicycle_network", static_cast(edge.bicycle_network())); ++// } ++// if (edge.has_cycle_lane_case()) { ++// edge_map->emplace("cycle_lane", to_string(static_cast(edge.cycle_lane()))); ++// } ++// if (edge.has_lane_count_case()) { ++// edge_map->emplace("lane_count", static_cast(edge.lane_count())); ++// } ++// if (edge.lane_connectivity_size()) { ++// auto lane_connectivity = json::array({}); ++// for (const auto& l : edge.lane_connectivity()) { ++// auto element = json::map({}); ++// element->emplace("from", l.from_way_id()); ++// element->emplace("to_lanes", l.to_lanes()); ++// element->emplace("from_lanes", l.from_lanes()); ++// lane_connectivity->push_back(element); ++// } ++// edge_map->emplace("lane_connectivity", lane_connectivity); ++// } ++// if (edge.has_max_downward_grade_case()) { ++// edge_map->emplace("max_downward_grade", static_cast(edge.max_downward_grade())); ++// } ++// if (edge.has_max_upward_grade_case()) { ++// edge_map->emplace("max_upward_grade", static_cast(edge.max_upward_grade())); ++// } ++// if (edge.has_weighted_grade_case()) { ++// edge_map->emplace("weighted_grade", json::fixed_t{edge.weighted_grade(), 3}); ++// } ++// if (edge.has_mean_elevation_case()) { ++// // Convert to feet if a valid elevation and units are miles ++// float mean = edge.mean_elevation(); ++// if (mean != kNoElevationData && options.has_units_case() && ++// options.units() == Options::miles) { ++// mean *= kFeetPerMeter; ++// } ++// edge_map->emplace("mean_elevation", static_cast(mean)); ++// } ++// if (edge.has_way_id_case()) { ++// edge_map->emplace("way_id", static_cast(edge.way_id())); ++// } + if (edge.has_id_case()) { + edge_map->emplace("id", static_cast(edge.id())); + } +- if (edge.has_travel_mode_case()) { +- edge_map->emplace("travel_mode", to_string(edge.travel_mode())); +- } +- if (edge.has_vehicle_type_case()) { +- edge_map->emplace("vehicle_type", to_string(edge.vehicle_type())); +- } +- if (edge.has_pedestrian_type_case()) { +- edge_map->emplace("pedestrian_type", to_string(edge.pedestrian_type())); +- } +- if (edge.has_bicycle_type_case()) { +- edge_map->emplace("bicycle_type", to_string(edge.bicycle_type())); +- } +- if (edge.has_surface_case()) { +- edge_map->emplace("surface", to_string(static_cast(edge.surface()))); +- } +- if (edge.has_drive_on_left_case()) { +- edge_map->emplace("drive_on_right", static_cast(!edge.drive_on_left())); +- } +- if (edge.has_internal_intersection_case()) { +- edge_map->emplace("internal_intersection", static_cast(edge.internal_intersection())); +- } +- if (edge.has_roundabout_case()) { +- edge_map->emplace("roundabout", static_cast(edge.roundabout())); +- } +- if (edge.has_bridge_case()) { +- edge_map->emplace("bridge", static_cast(edge.bridge())); +- } +- if (edge.has_tunnel_case()) { +- edge_map->emplace("tunnel", static_cast(edge.tunnel())); +- } +- if (edge.has_unpaved_case()) { +- edge_map->emplace("unpaved", static_cast(edge.unpaved())); +- } +- if (edge.has_toll_case()) { +- edge_map->emplace("toll", static_cast(edge.toll())); +- } +- if (edge.has_use_case()) { +- edge_map->emplace("use", to_string(static_cast(edge.use()))); +- } +- if (edge.has_traversability_case()) { +- edge_map->emplace("traversability", to_string(edge.traversability())); +- } +- if (edge.has_end_shape_index_case()) { +- edge_map->emplace("end_shape_index", static_cast(edge.end_shape_index())); +- } +- if (edge.has_begin_shape_index_case()) { +- edge_map->emplace("begin_shape_index", static_cast(edge.begin_shape_index())); +- } +- if (edge.has_end_heading_case()) { +- edge_map->emplace("end_heading", static_cast(edge.end_heading())); +- } +- if (edge.has_begin_heading_case()) { +- edge_map->emplace("begin_heading", static_cast(edge.begin_heading())); +- } +- if (edge.has_road_class_case()) { +- edge_map->emplace("road_class", to_string(static_cast(edge.road_class()))); +- } +- if (edge.has_speed_case()) { +- edge_map->emplace("speed", static_cast(std::round(edge.speed() * scale))); ++// if (edge.has_travel_mode_case()) { ++// edge_map->emplace("travel_mode", to_string(edge.travel_mode())); ++// } ++// if (edge.has_vehicle_type_case()) { ++// edge_map->emplace("vehicle_type", to_string(edge.vehicle_type())); ++// } ++// if (edge.has_pedestrian_type_case()) { ++// edge_map->emplace("pedestrian_type", to_string(edge.pedestrian_type())); ++// } ++// if (edge.has_bicycle_type_case()) { ++// edge_map->emplace("bicycle_type", to_string(edge.bicycle_type())); ++// } ++// if (edge.has_surface_case()) { ++// edge_map->emplace("surface", to_string(static_cast(edge.surface()))); ++// } ++// if (edge.has_drive_on_left_case()) { ++// edge_map->emplace("drive_on_right", static_cast(!edge.drive_on_left())); ++// } ++// if (edge.has_internal_intersection_case()) { ++// edge_map->emplace("internal_intersection", static_cast(edge.internal_intersection())); ++// } ++// if (edge.has_roundabout_case()) { ++// edge_map->emplace("roundabout", static_cast(edge.roundabout())); ++// } ++// if (edge.has_bridge_case()) { ++// edge_map->emplace("bridge", static_cast(edge.bridge())); ++// } ++// if (edge.has_tunnel_case()) { ++// edge_map->emplace("tunnel", static_cast(edge.tunnel())); ++// } ++// if (edge.has_unpaved_case()) { ++// edge_map->emplace("unpaved", static_cast(edge.unpaved())); ++// } ++// if (edge.has_toll_case()) { ++// edge_map->emplace("toll", static_cast(edge.toll())); ++// } ++// if (edge.has_use_case()) { ++// edge_map->emplace("use", to_string(static_cast(edge.use()))); ++// } ++// if (edge.has_traversability_case()) { ++// edge_map->emplace("traversability", to_string(edge.traversability())); ++// } ++// if (edge.has_end_shape_index_case()) { ++// edge_map->emplace("end_shape_index", static_cast(edge.end_shape_index())); ++// } ++// if (edge.has_begin_shape_index_case()) { ++// edge_map->emplace("begin_shape_index", static_cast(edge.begin_shape_index())); ++// } ++// if (edge.has_end_heading_case()) { ++// edge_map->emplace("end_heading", static_cast(edge.end_heading())); ++// } ++// if (edge.has_begin_heading_case()) { ++// edge_map->emplace("begin_heading", static_cast(edge.begin_heading())); ++// } ++// if (edge.has_road_class_case()) { ++// edge_map->emplace("road_class", to_string(static_cast(edge.road_class()))); ++// } ++// if (edge.has_speed_case()) { ++// edge_map->emplace("speed", static_cast(std::round(edge.speed() * scale))); ++// } ++ if (edge.has_source_along_edge_case()) { ++ auto r = edge.source_along_edge(); ++ edge_map->emplace("source_percent_along", json::fixed_t{r, 2}); ++ } ++ if (edge.has_target_along_edge_case()) { ++ auto r = edge.target_along_edge(); ++ edge_map->emplace("target_percent_along", json::fixed_t{edge.target_along_edge(), 2}); + } + if (edge.has_length_km_case()) { + edge_map->emplace("length", json::fixed_t{edge.length_km() * scale, 3}); + } +- // TODO: do we want to output 'is_route_number'? +- if (edge.name_size() > 0) { +- auto names_array = json::array({}); +- for (const auto& name : edge.name()) { +- names_array->push_back(name.value()); +- } +- edge_map->emplace("names", names_array); ++ if (edge.has_total_length_km_case()) { ++ edge_map->emplace("total_length", json::fixed_t{edge.total_length_km() * scale, 3}); + } +- if (edge.traffic_segment().size() > 0) { +- auto segments_array = json::array({}); +- for (const auto& segment : edge.traffic_segment()) { +- json::MapPtr segmap = +- json::map({{"segment_id", segment.segment_id()}, +- {"begin_percent", json::fixed_t{segment.begin_percent(), 3}}, +- {"end_percent", json::fixed_t{segment.end_percent(), 3}}, +- {"starts_segment", segment.starts_segment()}, +- {"ends_segment", segment.ends_segment()}}); +- segments_array->emplace_back(segmap); +- } +- edge_map->emplace("traffic_segments", segments_array); ++ if (edge.has_shortcut_id_case()) { ++ edge_map->emplace("shortcut_id", static_cast(edge.shortcut_id())); + } +- +- // Process edge sign + // TODO: do we want to output 'is_route_number'? +- if (edge.has_sign()) { +- auto sign_map = json::map({}); +- +- // Populate exit number array +- if (edge.sign().exit_numbers_size() > 0) { +- auto exit_number_array = json::array({}); +- for (const auto& exit_number : edge.sign().exit_numbers()) { +- exit_number_array->push_back(exit_number.text()); +- } +- sign_map->emplace("exit_number", exit_number_array); +- } +- +- // Populate exit branch array +- if (edge.sign().exit_onto_streets_size() > 0) { +- auto exit_branch_array = json::array({}); +- for (const auto& exit_onto_street : edge.sign().exit_onto_streets()) { +- exit_branch_array->push_back(exit_onto_street.text()); +- } +- sign_map->emplace("exit_branch", exit_branch_array); +- } +- +- // Populate exit toward array +- if (edge.sign().exit_toward_locations_size() > 0) { +- auto exit_toward_array = json::array({}); +- for (const auto& exit_toward_location : edge.sign().exit_toward_locations()) { +- exit_toward_array->push_back(exit_toward_location.text()); +- } +- sign_map->emplace("exit_toward", exit_toward_array); +- } +- +- // Populate exit name array +- if (edge.sign().exit_names_size() > 0) { +- auto exit_name_array = json::array({}); +- for (const auto& exit_name : edge.sign().exit_names()) { +- exit_name_array->push_back(exit_name.text()); +- } +- sign_map->emplace("exit_name", exit_name_array); +- } +- +- edge_map->emplace("sign", sign_map); +- } +- +- // Process edge end node only if any node items are enabled +- if (controller.category_attribute_enabled(kNodeCategory)) { +- const auto& node = trip_path.node(i); +- auto end_node_map = json::map({}); +- +- if (node.intersecting_edge_size() > 0) { +- auto intersecting_edge_array = json::array({}); +- for (const auto& xedge : node.intersecting_edge()) { +- auto xedge_map = json::map({}); +- if (xedge.has_walkability_case() && +- (xedge.walkability() != TripLeg_Traversability_kNone)) { +- xedge_map->emplace("walkability", to_string(xedge.walkability())); +- } +- if (xedge.has_cyclability_case() && +- (xedge.cyclability() != TripLeg_Traversability_kNone)) { +- xedge_map->emplace("cyclability", to_string(xedge.cyclability())); +- } +- if (xedge.has_driveability_case() && +- (xedge.driveability() != TripLeg_Traversability_kNone)) { +- xedge_map->emplace("driveability", to_string(xedge.driveability())); +- } +- xedge_map->emplace("from_edge_name_consistency", +- static_cast(xedge.prev_name_consistency())); +- xedge_map->emplace("to_edge_name_consistency", +- static_cast(xedge.curr_name_consistency())); +- xedge_map->emplace("begin_heading", static_cast(xedge.begin_heading())); +- +- if (xedge.has_use_case()) { +- xedge_map->emplace("use", to_string(static_cast(xedge.use()))); +- } +- +- if (xedge.has_road_class_case()) { +- xedge_map->emplace("road_class", +- to_string(static_cast(xedge.road_class()))); +- } +- +- intersecting_edge_array->emplace_back(xedge_map); +- } +- end_node_map->emplace("intersecting_edges", intersecting_edge_array); +- } +- +- if (node.has_cost() && node.cost().has_elapsed_cost() && +- node.cost().elapsed_cost().has_seconds_case()) { +- end_node_map->emplace("elapsed_time", +- json::fixed_t{node.cost().elapsed_cost().seconds(), 3}); +- } +- if (node.has_admin_index_case()) { +- end_node_map->emplace("admin_index", static_cast(node.admin_index())); +- } +- if (node.has_type_case()) { +- end_node_map->emplace("type", to_string(static_cast(node.type()))); +- } +- if (node.has_fork_case()) { +- end_node_map->emplace("fork", static_cast(node.fork())); +- } +- if (node.has_time_zone_case()) { +- end_node_map->emplace("time_zone", node.time_zone()); +- } +- if (node.has_cost() && node.cost().has_transition_cost() && +- node.cost().transition_cost().has_seconds_case()) { +- end_node_map->emplace("transition_time", +- json::fixed_t{node.cost().transition_cost().seconds(), 3}); +- } +- +- // TODO transit info at node +- // kNodeTransitStopInfoType = "node.transit_stop_info.type"; +- // kNodeTransitStopInfoOnestopId = "node.transit_stop_info.onestop_id"; +- // kNodetransitStopInfoName = "node.transit_stop_info.name"; +- // kNodeTransitStopInfoArrivalDateTime = "node.transit_stop_info.arrival_date_time"; +- // kNodeTransitStopInfoDepartureDateTime = "node.transit_stop_info.departure_date_time"; +- // kNodeTransitStopInfoIsParentStop = "node.transit_stop_info.is_parent_stop"; +- // kNodeTransitStopInfoAssumedSchedule = "node.transit_stop_info.assumed_schedule"; +- // kNodeTransitStopInfoLatLon = "node.transit_stop_info.lat_lon"; +- +- edge_map->emplace("end_node", end_node_map); +- } ++// if (edge.name_size() > 0) { ++// auto names_array = json::array({}); ++// for (const auto& name : edge.name()) { ++// names_array->push_back(name.value()); ++// } ++// edge_map->emplace("names", names_array); ++// } ++// if (edge.traffic_segment().size() > 0) { ++// auto segments_array = json::array({}); ++// for (const auto& segment : edge.traffic_segment()) { ++// json::MapPtr segmap = ++// json::map({{"segment_id", segment.segment_id()}, ++// {"begin_percent", json::fixed_t{segment.begin_percent(), 3}}, ++// {"end_percent", json::fixed_t{segment.end_percent(), 3}}, ++// {"starts_segment", segment.starts_segment()}, ++// {"ends_segment", segment.ends_segment()}}); ++// segments_array->emplace_back(segmap); ++// } ++// edge_map->emplace("traffic_segments", segments_array); ++// } ++// ++// // Process edge sign ++// // TODO: do we want to output 'is_route_number'? ++// if (edge.has_sign()) { ++// auto sign_map = json::map({}); ++// ++// // Populate exit number array ++// if (edge.sign().exit_numbers_size() > 0) { ++// auto exit_number_array = json::array({}); ++// for (const auto& exit_number : edge.sign().exit_numbers()) { ++// exit_number_array->push_back(exit_number.text()); ++// } ++// sign_map->emplace("exit_number", exit_number_array); ++// } ++// ++// // Populate exit branch array ++// if (edge.sign().exit_onto_streets_size() > 0) { ++// auto exit_branch_array = json::array({}); ++// for (const auto& exit_onto_street : edge.sign().exit_onto_streets()) { ++// exit_branch_array->push_back(exit_onto_street.text()); ++// } ++// sign_map->emplace("exit_branch", exit_branch_array); ++// } ++// ++// // Populate exit toward array ++// if (edge.sign().exit_toward_locations_size() > 0) { ++// auto exit_toward_array = json::array({}); ++// for (const auto& exit_toward_location : edge.sign().exit_toward_locations()) { ++// exit_toward_array->push_back(exit_toward_location.text()); ++// } ++// sign_map->emplace("exit_toward", exit_toward_array); ++// } ++// ++// // Populate exit name array ++// if (edge.sign().exit_names_size() > 0) { ++// auto exit_name_array = json::array({}); ++// for (const auto& exit_name : edge.sign().exit_names()) { ++// exit_name_array->push_back(exit_name.text()); ++// } ++// sign_map->emplace("exit_name", exit_name_array); ++// } ++// ++// edge_map->emplace("sign", sign_map); ++// } ++// ++// // Process edge end node only if any node items are enabled ++// if (controller.category_attribute_enabled(kNodeCategory)) { ++// const auto& node = trip_path.node(i); ++// auto end_node_map = json::map({}); ++// ++// if (node.intersecting_edge_size() > 0) { ++// auto intersecting_edge_array = json::array({}); ++// for (const auto& xedge : node.intersecting_edge()) { ++// auto xedge_map = json::map({}); ++// if (xedge.has_walkability_case() && ++// (xedge.walkability() != TripLeg_Traversability_kNone)) { ++// xedge_map->emplace("walkability", to_string(xedge.walkability())); ++// } ++// if (xedge.has_cyclability_case() && ++// (xedge.cyclability() != TripLeg_Traversability_kNone)) { ++// xedge_map->emplace("cyclability", to_string(xedge.cyclability())); ++// } ++// if (xedge.has_driveability_case() && ++// (xedge.driveability() != TripLeg_Traversability_kNone)) { ++// xedge_map->emplace("driveability", to_string(xedge.driveability())); ++// } ++// xedge_map->emplace("from_edge_name_consistency", ++// static_cast(xedge.prev_name_consistency())); ++// xedge_map->emplace("to_edge_name_consistency", ++// static_cast(xedge.curr_name_consistency())); ++// xedge_map->emplace("begin_heading", static_cast(xedge.begin_heading())); ++// ++// if (xedge.has_use_case()) { ++// xedge_map->emplace("use", to_string(static_cast(xedge.use()))); ++// } ++// ++// if (xedge.has_road_class_case()) { ++// xedge_map->emplace("road_class", ++// to_string(static_cast(xedge.road_class()))); ++// } ++// ++// intersecting_edge_array->emplace_back(xedge_map); ++// } ++// end_node_map->emplace("intersecting_edges", intersecting_edge_array); ++// } ++// ++// if (node.has_cost() && node.cost().has_elapsed_cost() && ++// node.cost().elapsed_cost().has_seconds_case()) { ++// end_node_map->emplace("elapsed_time", ++// json::fixed_t{node.cost().elapsed_cost().seconds(), 3}); ++// } ++// if (node.has_admin_index_case()) { ++// end_node_map->emplace("admin_index", static_cast(node.admin_index())); ++// } ++// if (node.has_type_case()) { ++// end_node_map->emplace("type", to_string(static_cast(node.type()))); ++// } ++// if (node.has_fork_case()) { ++// end_node_map->emplace("fork", static_cast(node.fork())); ++// } ++// if (node.has_time_zone_case()) { ++// end_node_map->emplace("time_zone", node.time_zone()); ++// } ++// if (node.has_cost() && node.cost().has_transition_cost() && ++// node.cost().transition_cost().has_seconds_case()) { ++// end_node_map->emplace("transition_time", ++// json::fixed_t{node.cost().transition_cost().seconds(), 3}); ++// } ++// ++// // TODO transit info at node ++// // kNodeTransitStopInfoType = "node.transit_stop_info.type"; ++// // kNodeTransitStopInfoOnestopId = "node.transit_stop_info.onestop_id"; ++// // kNodetransitStopInfoName = "node.transit_stop_info.name"; ++// // kNodeTransitStopInfoArrivalDateTime = "node.transit_stop_info.arrival_date_time"; ++// // kNodeTransitStopInfoDepartureDateTime = "node.transit_stop_info.departure_date_time"; ++// // kNodeTransitStopInfoIsParentStop = "node.transit_stop_info.is_parent_stop"; ++// // kNodeTransitStopInfoAssumedSchedule = "node.transit_stop_info.assumed_schedule"; ++// // kNodeTransitStopInfoLatLon = "node.transit_stop_info.lat_lon"; ++// ++// edge_map->emplace("end_node", end_node_map); ++// } + + // TODO - transit info on edge + // kEdgeTransitType = "edge.transit_type"; +@@ -466,43 +480,43 @@ void append_trace_info( + const auto& match_results = std::get(map_match_result); + + // Add osm_changeset +- if (trip_path.has_osm_changeset_case()) { +- json->emplace("osm_changeset", trip_path.osm_changeset()); +- } +- +- // Add shape +- if (trip_path.has_shape_case()) { +- json->emplace("shape", trip_path.shape()); +- } +- +- // Add confidence_score +- if (controller.attributes.at(kConfidenceScore)) { +- json->emplace("confidence_score", +- json::fixed_t{std::get(map_match_result), 3}); +- } +- +- // Add raw_score +- if (controller.attributes.at(kRawScore)) { +- json->emplace("raw_score", json::fixed_t{std::get(map_match_result), 3}); +- } +- +- // Add admins list +- if (trip_path.admin_size() > 0) { +- json->emplace("admins", serialize_admins(trip_path)); +- } ++// if (trip_path.has_osm_changeset_case()) { ++// json->emplace("osm_changeset", trip_path.osm_changeset()); ++// } ++// ++// // Add shape ++// if (trip_path.has_shape_case()) { ++// json->emplace("shape", trip_path.shape()); ++// } ++// ++// // Add confidence_score ++// if (controller.attributes.at(kConfidenceScore)) { ++// json->emplace("confidence_score", ++// json::fixed_t{std::get(map_match_result), 3}); ++// } ++// ++// // Add raw_score ++// if (controller.attributes.at(kRawScore)) { ++// json->emplace("raw_score", json::fixed_t{std::get(map_match_result), 3}); ++// } ++// ++// // Add admins list ++// if (trip_path.admin_size() > 0) { ++// json->emplace("admins", serialize_admins(trip_path)); ++// } + + // Add edges + json->emplace("edges", serialize_edges(controller, options, trip_path)); + +- // Add matched points, if requested +- if (controller.category_attribute_enabled(kMatchedCategory) && !match_results.empty()) { +- json->emplace("matched_points", serialize_matched_points(controller, match_results)); +- } +- +- // Add shape_attributes, if requested +- if (controller.category_attribute_enabled(kShapeAttributesCategory)) { +- json->emplace("shape_attributes", serialize_shape_attributes(controller, trip_path)); +- } ++// // Add matched points, if requested ++// if (controller.category_attribute_enabled(kMatchedCategory) && !match_results.empty()) { ++// json->emplace("matched_points", serialize_matched_points(controller, match_results)); ++// } ++// ++// // Add shape_attributes, if requested ++// if (controller.category_attribute_enabled(kShapeAttributesCategory)) { ++// json->emplace("shape_attributes", serialize_shape_attributes(controller, trip_path)); ++// } + } + } // namespace + +@@ -523,14 +537,14 @@ std::string serializeTraceAttributes( + auto json = json::map({}); + + // Add result id, if supplied +- if (request.options().has_id_case()) { +- json->emplace("id", request.options().id()); +- } ++// if (request.options().has_id_case()) { ++// json->emplace("id", request.options().id()); ++// } + + // Add units, if specified +- if (request.options().has_units_case()) { +- json->emplace("units", valhalla::Options_Units_Enum_Name(request.options().units())); +- } ++// if (request.options().has_units_case()) { ++// json->emplace("units", valhalla::Options_Units_Enum_Name(request.options().units())); ++// } + + // Loop over all results to process the best path + // and the alternate paths (if alternates exist) diff --git a/valhalla/valhalla_build_config.py b/valhalla/valhalla_build_config.py index 68ce3da..3254812 100644 --- a/valhalla/valhalla_build_config.py +++ b/valhalla/valhalla_build_config.py @@ -1,19 +1,10 @@ #!/usr/bin/env python3 -from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter +from argparse import ArgumentParser, ArgumentTypeError, ArgumentDefaultsHelpFormatter +from distutils.util import strtobool import json from typing import List, Union -def strtobool(value): - lower = str(value).lower() - if lower in {"y", "yes", "t", "true", "on", "1"}: - return True - elif lower in {"n", "no", "f", "false", "off", "0"}: - return False - else: - raise ValueError('"{}" is not a valid bool value'.format(value)) - - class Optional: def __init__(self, t=None): self.type = t @@ -21,542 +12,543 @@ def __init__(self, t=None): # global default configuration config = { - "mjolnir": { - "max_cache_size": 1000000000, - "id_table_size": 1300000000, - "use_lru_mem_cache": False, - "lru_mem_cache_hard_control": False, - "use_simple_mem_cache": False, - "user_agent": Optional(str), - "tile_url": Optional(str), - "tile_url_gz": Optional(bool), - "concurrency": Optional(int), - "tile_dir": "/data/valhalla", - "tile_extract": "/data/valhalla/tiles.tar", - "traffic_extract": "/data/valhalla/traffic.tar", - "incident_dir": Optional(str), - "incident_log": Optional(str), - "shortcut_caching": Optional(bool), - "admin": "/data/valhalla/admin.sqlite", - "timezone": "/data/valhalla/tz_world.sqlite", - "transit_dir": "/data/valhalla/transit", - "transit_feeds_dir": "/data/valhalla/transit_feeds", - "transit_bounding_box": Optional(str), - "transit_pbf_limit": 20000, - "hierarchy": True, - "shortcuts": True, - "include_platforms": False, - "include_driveways": True, - "include_construction": False, - "include_bicycle": True, - "include_pedestrian": True, - "include_driving": True, - "import_bike_share_stations": False, - "global_synchronized_cache": False, - "max_concurrent_reader_users": 1, - "reclassify_links": True, - "default_speeds_config": Optional(str), - "data_processing": { - "infer_internal_intersections": True, - "infer_turn_channels": True, - "apply_country_overrides": True, - "use_admin_db": True, - "use_direction_on_ways": False, - "allow_alt_name": False, - "use_urban_tag": False, - "use_rest_area": False, - "scan_tar": False, - }, - "logging": {"type": "std_out", "color": True, "file_name": "path_to_some_file.log"}, - }, - "additional_data": {"elevation": "/data/valhalla/elevation/", "elevation_url": Optional(str)}, - "loki": { - "actions": [ - "locate", - "route", - "height", - "sources_to_targets", - "optimized_route", - "isochrone", - "trace_route", - "trace_attributes", - "transit_available", - "expansion", - "centroid", - "status", - ], - "use_connectivity": True, - "service_defaults": { - "radius": 0, - "minimum_reachability": 50, - "search_cutoff": 35000, - "node_snap_tolerance": 5, - "street_side_tolerance": 5, - "street_side_max_distance": 1000, - "heading_tolerance": 60, - }, - "logging": { - "type": "std_out", - "color": True, - "file_name": "path_to_some_file.log", - "long_request": 100.0, - }, - "service": {"proxy": "ipc:///tmp/loki"}, - }, - "thor": { - "logging": { - "type": "std_out", - "color": True, - "file_name": "path_to_some_file.log", - "long_request": 110.0, - }, - "source_to_target_algorithm": "select_optimal", - "service": {"proxy": "ipc:///tmp/thor"}, - "max_reserved_labels_count_astar": 2000000, - "max_reserved_labels_count_bidir_astar": 1000000, - "max_reserved_labels_count_dijkstras": 4000000, - "max_reserved_labels_count_bidir_dijkstras": 2000000, - "clear_reserved_memory": False, - "extended_search": False, - }, - "odin": { - "logging": {"type": "std_out", "color": True, "file_name": "path_to_some_file.log"}, - "service": {"proxy": "ipc:///tmp/odin"}, - "markup_formatter": { - "markup_enabled": False, - "phoneme_format": " (phoneme>//)", - }, - }, - "meili": { - "mode": "auto", - "customizable": [ - "mode", - "search_radius", - "turn_penalty_factor", - "gps_accuracy", - "interpolation_distance", - "sigma_z", - "beta", - "max_route_distance_factor", - "max_route_time_factor", - ], - "verbose": False, - "default": { - "sigma_z": 4.07, - "gps_accuracy": 5.0, - "beta": 3, - "max_route_distance_factor": 5, - "max_route_time_factor": 5, - "max_search_radius": 100, - "breakage_distance": 2000, - "interpolation_distance": 10, - "search_radius": 50, - "geometry": False, - "route": True, - "turn_penalty_factor": 0, - }, - "auto": {"turn_penalty_factor": 200, "search_radius": 50}, - "pedestrian": {"turn_penalty_factor": 100, "search_radius": 50}, - "bicycle": {"turn_penalty_factor": 140}, - "multimodal": {"turn_penalty_factor": 70}, - "logging": {"type": "std_out", "color": True, "file_name": "path_to_some_file.log"}, - "service": {"proxy": "ipc:///tmp/meili"}, - "grid": {"size": 500, "cache_size": 100240}, - }, - "httpd": { - "service": { - "listen": "tcp://*:8002", - "loopback": "ipc:///tmp/loopback", - "interrupt": "ipc:///tmp/interrupt", - "drain_seconds": 28, - "shutdown_seconds": 1, - "timeout_seconds": -1, - } - }, - "service_limits": { - "auto": { - "max_distance": 5000000.0, - "max_locations": 20, - "max_matrix_distance": 400000.0, - "max_matrix_location_pairs": 2500, - }, - "bus": { - "max_distance": 5000000.0, - "max_locations": 50, - "max_matrix_distance": 400000.0, - "max_matrix_location_pairs": 2500, - }, - "taxi": { - "max_distance": 5000000.0, - "max_locations": 20, - "max_matrix_distance": 400000.0, - "max_matrix_location_pairs": 2500, - }, - "pedestrian": { - "max_distance": 250000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - "min_transit_walking_distance": 1, - "max_transit_walking_distance": 10000, - }, - "motor_scooter": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - }, - "motorcycle": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - }, - "bicycle": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - }, - "multimodal": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 0.0, - "max_matrix_location_pairs": 0, - }, - "status": {"allow_verbose": False}, - "transit": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - }, - "truck": { - "max_distance": 5000000.0, - "max_locations": 20, - "max_matrix_distance": 400000.0, - "max_matrix_location_pairs": 2500, - }, - "skadi": {"max_shape": 750000, "min_resample": 10.0}, - "isochrone": { - "max_contours": 4, - "max_time_contour": 120, - "max_distance": 25000.0, - "max_locations": 1, - "max_distance_contour": 200, - }, - "trace": { - "max_distance": 200000.0, - "max_gps_accuracy": 100.0, - "max_search_radius": 100.0, - "max_shape": 16000, - "max_alternates": 3, - "max_alternates_shape": 100, - }, - "bikeshare": { - "max_distance": 500000.0, - "max_locations": 50, - "max_matrix_distance": 200000.0, - "max_matrix_location_pairs": 2500, - }, - "centroid": {"max_distance": 200000.0, "max_locations": 5}, - "max_exclude_locations": 50, - "max_reachability": 100, - "max_radius": 200, - "max_timedep_distance": 500000, - "max_timedep_distance_matrix": 0, - "max_alternates": 2, - "max_exclude_polygons_length": 10000, - "max_distance_disable_hierarchy_culling": 0, - }, - "statsd": { - "host": Optional(str), - "port": 8125, - "prefix": "valhalla", - "batch_size": Optional(int), - "tags": Optional(list), + 'mjolnir': { + 'max_cache_size': 1000000000, + 'id_table_size': 1300000000, + 'use_lru_mem_cache': False, + 'lru_mem_cache_hard_control': False, + 'use_simple_mem_cache': False, + 'user_agent': Optional(str), + 'tile_url': Optional(str), + 'tile_url_gz': Optional(bool), + 'concurrency': Optional(int), + 'tile_dir': '/data/valhalla', + 'tile_extract': '/data/valhalla/tiles.tar', + 'traffic_extract': '/data/valhalla/traffic.tar', + 'incident_dir': Optional(str), + 'incident_log': Optional(str), + 'shortcut_caching': Optional(bool), + 'admin': '/data/valhalla/admin.sqlite', + 'timezone': '/data/valhalla/tz_world.sqlite', + 'transit_dir': '/data/valhalla/transit', + 'transit_bounding_box': Optional(str), + 'hierarchy': True, + 'shortcuts': True, + 'include_driveways': True, + 'include_bicycle': True, + 'include_pedestrian': True, + 'include_driving': True, + 'import_bike_share_stations': False, + 'global_synchronized_cache': False, + 'max_concurrent_reader_users' : 1, + 'reclassify_links': True, + 'default_speeds_config': Optional(str), + 'data_processing': { + 'infer_internal_intersections': True, + 'infer_turn_channels': True, + 'apply_country_overrides': True, + 'use_admin_db': True, + 'use_direction_on_ways': False, + 'allow_alt_name': False, + 'use_urban_tag': False, + 'use_rest_area': False, + 'scan_tar': False + }, + 'logging': { + 'type': 'std_out', + 'color': True, + 'file_name': 'path_to_some_file.log' + } + }, + 'additional_data': { + 'elevation': '/data/valhalla/elevation/' + }, + 'loki': { + 'actions':['locate','route','height','sources_to_targets','optimized_route','isochrone','trace_route','trace_attributes','transit_available', 'expansion', 'centroid', 'status'], + 'use_connectivity': True, + 'service_defaults': { + 'radius': 0, + 'minimum_reachability': 50, + 'search_cutoff': 35000, + 'node_snap_tolerance': 5, + 'street_side_tolerance': 5, + 'street_side_max_distance': 1000, + 'heading_tolerance': 60 + }, + 'logging': { + 'type': 'std_out', + 'color': True, + 'file_name': 'path_to_some_file.log', + 'long_request': 100.0 + }, + 'service': { + 'proxy': 'ipc:///tmp/loki' + } + }, + 'thor': { + 'logging': { + 'type': 'std_out', + 'color': True, + 'file_name': 'path_to_some_file.log', + 'long_request': 110.0 + }, + 'source_to_target_algorithm': 'select_optimal', + 'service': { + 'proxy': 'ipc:///tmp/thor' + }, + 'max_reserved_labels_count': 1000000, + 'clear_reserved_memory': False, + 'extended_search': False + }, + 'odin': { + 'logging': { + 'type': 'std_out', + 'color': True, + 'file_name': 'path_to_some_file.log' + }, + 'service': { + 'proxy': 'ipc:///tmp/odin' + }, + 'markup_formatter': { + 'markup_enabled': False, + 'phoneme_format': ' (phoneme>//)' + } + }, + 'meili': { + 'mode': 'auto', + 'customizable': ['mode', 'search_radius', 'turn_penalty_factor', 'gps_accuracy', 'interpolation_distance', 'sigma_z', 'beta', 'max_route_distance_factor', 'max_route_time_factor'], + 'verbose': False, + 'default': { + 'sigma_z': 4.07, + 'gps_accuracy': 5.0, + 'beta': 3, + 'max_route_distance_factor': 5, + 'max_route_time_factor': 5, + 'max_search_radius': 100, + 'breakage_distance': 2000, + 'interpolation_distance': 10, + 'search_radius': 50, + 'geometry': False, + 'route': True, + 'turn_penalty_factor': 0 + }, + 'auto': { + 'turn_penalty_factor': 200, + 'search_radius': 50 + }, + 'pedestrian': { + 'turn_penalty_factor': 100, + 'search_radius': 50 + }, + 'bicycle': { + 'turn_penalty_factor': 140 + }, + 'multimodal': { + 'turn_penalty_factor': 70 + }, + 'logging': { + 'type': 'std_out', + 'color': True, + 'file_name': 'path_to_some_file.log' + }, + 'service': { + 'proxy': 'ipc:///tmp/meili' + }, + 'grid': { + 'size': 500, + 'cache_size': 100240 + } + }, + 'httpd': { + 'service': { + 'listen': 'tcp://*:8002', + 'loopback': 'ipc:///tmp/loopback', + 'interrupt': 'ipc:///tmp/interrupt', + 'drain_seconds': 28, + 'shutdown_seconds': 1 + } + }, + 'service_limits': { + 'auto': { + 'max_distance': 5000000.0, + 'max_locations': 20, + 'max_matrix_distance': 400000.0, + 'max_matrix_locations': 50 + }, + 'bus': { + 'max_distance': 5000000.0, + 'max_locations': 50, + 'max_matrix_distance': 400000.0, + 'max_matrix_locations': 50 + }, + 'taxi': { + 'max_distance': 5000000.0, + 'max_locations': 20, + 'max_matrix_distance': 400000.0, + 'max_matrix_locations': 50 + }, + 'pedestrian': { + 'max_distance': 250000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50, + 'min_transit_walking_distance': 1, + 'max_transit_walking_distance': 10000 + }, + 'motor_scooter': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50 + }, + 'motorcycle': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50 + }, + 'bicycle': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50 + }, + 'multimodal': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 0.0, + 'max_matrix_locations': 0 + }, + 'status': { + 'allow_verbose': False + }, + 'transit': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50 + }, + 'truck': { + 'max_distance': 5000000.0, + 'max_locations': 20, + 'max_matrix_distance': 400000.0, + 'max_matrix_locations': 50 + }, + 'skadi': { + 'max_shape': 750000, + 'min_resample': 10.0 + }, + 'isochrone': { + 'max_contours': 4, + 'max_time_contour': 120, + 'max_distance': 25000.0, + 'max_locations': 1, + 'max_distance_contour': 200 + }, + 'trace': { + 'max_distance': 200000.0, + 'max_gps_accuracy': 100.0, + 'max_search_radius': 100.0, + 'max_shape': 16000, + 'max_alternates': 3, + 'max_alternates_shape': 100 + }, + 'bikeshare': { + 'max_distance': 500000.0, + 'max_locations': 50, + 'max_matrix_distance': 200000.0, + 'max_matrix_locations': 50 }, + 'centroid': { + 'max_distance': 200000.0, + 'max_locations': 5 + }, + 'max_exclude_locations': 50, + 'max_reachability': 100, + 'max_radius': 200, + 'max_timedep_distance': 500000, + 'max_alternates': 2, + 'max_exclude_polygons_length': 10000 + }, + 'statsd': { + 'host': Optional(str), + 'port': 8125, + 'prefix': 'valhalla', + 'batch_size': Optional(int), + 'tags': Optional(list) + } } help_text = { - "mjolnir": { - "max_cache_size": "Number of bytes per thread used to store tile data in memory", - "id_table_size": "Value controls the initial size of the Id table", - "use_lru_mem_cache": "Use memory cache with LRU eviction policy", - "lru_mem_cache_hard_control": "Use hard memory limit control for LRU memory cache (i.e. on every put) - never allow overcommit", - "use_simple_mem_cache": "Use memory cache within a simple hash map the clears all tiles when overcommitted", - "user_agent": "User-Agent http header to request single tiles", - "tile_url": "Http location to read tiles from if they are not found in the tile_dir, e.g.: http://your_valhalla_tile_server_host:8000/some/Optional/path/{tilePath}?some=Optional&query=params. Valhalla will look for the {tilePath} portion of the url and fill this out with a given tile path when it make a request for that tile", - "tile_url_gz": "Whether or not to request for compressed tiles", - "concurrency": "How many threads to use in the concurrent parts of tile building", - "tile_dir": "Location to read/write tiles to/from", - "tile_extract": "Location to read tiles from tar", - "traffic_extract": "Location to read traffic from tar", - "incident_dir": "Location to read incident tiles from", - "incident_log": "Location to read change events of incident tiles", - "shortcut_caching": "Precaches the superceded edges of all shortcuts in the graph. Defaults to false", - "admin": "Location of sqlite file holding admin polygons created with valhalla_build_admins", - "timezone": "Location of sqlite file holding timezone information created with valhalla_build_timezones", - "transit_dir": "Location of intermediate transit tiles created with valhalla_build_transit", - "transit_feeds_dir": "Location of GTFS transit feeds", - "transit_bounding_box": "Add comma separated bounding box values to only download transit data inside the given bounding box", - "transit_pbf_limit": "Limit individual PBF files to this many trips (needed for PBF's stupid size limit)", - "hierarchy": "bool indicating whether road hierarchy is to be built - default to True", - "shortcuts": "bool indicating whether shortcuts are to be built - default to True", - "include_platforms": "bool indicating whether to include highway=platform - default to False", - "include_driveways": "bool indicating whether private driveways are included - default to True", - "include_construction": "bool indicating where roads under construction are included - default to False", - "include_bicycle": "bool indicating whether cycling only ways are included - default to True", - "include_pedestrian": "bool indicating whether pedestrian only ways are included - default to True", - "include_driving": "bool indicating whether driving only ways are included - default to True", - "import_bike_share_stations": "bool indicating whether importing bike share stations(BSS). Set to True when using multimodal - default to False", - "global_synchronized_cache": "bool indicating whether global_synchronized_cache is used - default to False", - "max_concurrent_reader_users": "number of threads in the threadpool which can be used to fetch tiles over the network via curl", - "reclassify_links": "bool indicating whether or not to reclassify links - reclassifies ramps based on the lowest class connecting road", - "default_speeds_config": "a path indicating the json config file which graph enhancer will use to set the speeds of edges in the graph based on their geographic location (state/country), density (urban/rural), road class, road use (form of way)", - "data_processing": { - "infer_internal_intersections": "bool indicating whether or not to infer internal intersections during the graph enhancer phase or use the internal_intersection key from the pbf", - "infer_turn_channels": "bool indicating whether or not to infer turn channels during the graph enhancer phase or use the turn_channel key from the pbf", - "apply_country_overrides": "bool indicating whether or not to apply country overrides during the graph enhancer phase", - "use_admin_db": "bool indicating whether or not to use the administrative database during the graph enhancer phase or use the admin keys from the pbf that are set on the node", - "use_direction_on_ways": "bool indicating whether or not to process the direction key on the ways or utilize the guidance relation tags during the parsing phase", - "allow_alt_name": "bool indicating whether or not to process the alt_name key on the ways during the parsing phase", - "use_urban_tag": "bool indicating whether or not to use the urban area tag on the ways or to utilize the getDensity function within the graph enhancer phase", - "use_rest_area": "bool indicating whether or not to use the rest/service area tag on the ways", - "scan_tar": "bool indicating whether or not to pre-scan the tar ball(s) when loading an extract with an index file, to warm up the OS page cache.", - }, - "logging": { - "type": "Type of logger either std_out or file", - "color": "User colored log level in std_out logger", - "file_name": "Output log file for the file logger", - }, - }, - "additional_data": { - "elevation": "Location of elevation tiles", - "elevation_url": "Http location to read elevations from. this address is used if elevation tiles were not found in the elevation directory. Ex.: http://:/some/Optional/path/{tilePath}?some=Optional&query=params. Valhalla will look for the {tilePath} portion of the url and fill this out with an elevation path when it makes a request for that particular elevation", - }, - "loki": { - "actions": "Comma separated list of allowable actions for the service, one or more of: locate, route, height, optimized_route, isochrone, trace_route, trace_attributes, transit_available, expansion, centroid, status", - "use_connectivity": "a boolean value to know whether or not to construct the connectivity maps", - "service_defaults": { - "radius": "Default radius to apply to incoming locations should one not be supplied", - "minimum_reachability": "Default minimum reachability to apply to incoming locations should one not be supplied", - "search_cutoff": "The cutoff at which we will assume the input is too far away from civilisation to be worth correlating to the nearest graph elements", - "node_snap_tolerance": "During edge correlation this is the tolerance used to determine whether or not to snap to the intersection rather than along the street, if the snap location is within this distance from the intersection the intersection is used instead", - "street_side_tolerance": "If your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel", - "street_side_max_distance": "The max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none", - "heading_tolerance": "When a heading is supplied, this is the tolerance around that heading with which we determine whether an edges heading is similar enough to match the supplied heading", - }, - "logging": { - "type": "Type of logger either std_out or file", - "color": "User colored log level in std_out logger", - "file_name": "Output log file for the file logger", - "long_request": "Value used in processing to determine whether it took too long", - }, - "service": {"proxy": "IPC linux domain socket file location"}, - }, - "thor": { - "logging": { - "type": "Type of logger either std_out or file", - "color": "User colored log level in std_out logger", - "file_name": "Output log file for the file logger", - "long_request": "Value used in processing to determine whether it took too long", - }, - "source_to_target_algorithm": "TODO: which matrix algorithm should be used", - "service": {"proxy": "IPC linux domain socket file location"}, - "max_reserved_labels_count_astar": "Maximum capacity allowed to keep reserved for unidirectional A*.", - "max_reserved_labels_count_bidir_astar": "Maximum capacity allowed to keep reserved for bidirectional A*.", - "max_reserved_labels_count_dijkstras": "Maximum capacity allowed to keep reserved for unidirectional Dijkstras.", - "max_reserved_labels_count_bidir_dijkstras": "Maximum capacity allowed to keep reserved for bidirectional Dijkstras.", - "clear_reserved_memory": "If True clean reserved memory in path algorithms", - "extended_search": "If True and 1 side of the bidirectional search is exhausted, causes the other side to continue if the starting location of that side began on a not_thru or closed edge", - }, - "odin": { - "logging": { - "type": "Type of logger either std_out or file", - "color": "User colored log level in std_out logger", - "file_name": "Output log file for the file logger", - }, - "service": {"proxy": "IPC linux domain socket file location"}, - "markup_formatter": { - "markup_enabled": "Boolean flag to use markup formatting", - "phoneme_format": "The phoneme format string that will be used by street names and signs", - }, - }, - "meili": { - "mode": "Specify the default transport mode", - "customizable": "Specify which parameters are allowed to be customized by URL query parameters", - "verbose": "Control verbose output for debugging", - "default": { - "sigma_z": "A non-negative value to specify the GPS accuracy (the variance of the normal distribution) of an incoming GPS sequence. It is also used to weight emission costs of measurements", - "gps_accuracy": "TODO: ", - "beta": "A non-negative emprical value to weight the transition cost of two successive candidates", - "max_route_distance_factor": "A non-negative value used to limit the routing search range which is the distance to next measurement multiplied by this factor", - "max_route_time_factor": "A non-negative value used to limit the routing search range which is the time to the next measurement multiplied by this factor", - "breakage_distance": "A non-negative value. If two successive measurements are far than this distance, then connectivity in between will not be considered", - "max_search_radius": "A non-negative value specifying the maximum radius in meters about a given point to search for candidate edges for routing", - "interpolation_distance": "If two successive measurements are closer than this distance, then the later one will be interpolated into the matched route", - "search_radius": "A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement", - "geometry": "TODO: ", - "route": "TODO: ", - "turn_penalty_factor": "A non-negative value to penalize turns from one road segment to next", - }, - "auto": { - "turn_penalty_factor": "A non-negative value to penalize turns from one road segment to next", - "search_radius": "A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement", - }, - "pedestrian": { - "turn_penalty_factor": "A non-negative value to penalize turns from one road segment to next", - "search_radius": "A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement", - }, - "bicycle": { - "turn_penalty_factor": "A non-negative value to penalize turns from one road segment to next" - }, - "multimodal": { - "turn_penalty_factor": "A non-negative value to penalize turns from one road segment to next" - }, - "logging": { - "type": "Type of logger either std_out or file", - "color": "User colored log level in std_out logger", - "file_name": "Output log file for the file logger", - }, - "service": {"proxy": "IPC linux domain socket file location"}, - "grid": { - "size": "TODO: Resolution of the grid used in finding match candidates", - "cache_size": "TODO: number of grids to keep in cache", - }, - }, - "httpd": { - "service": { - "listen": "The protocol, host location and port your service will bind to", - "loopback": "IPC linux domain socket file location used to communicate results back to the client", - "interrupt": "IPC linux domain socket file location used to cancel work in progress", - "drain_seconds": "How long to wait for currently running threads to finish before signaling them to shutdown", - "shutdown_seconds": "How long to wait for currently running threads to quit before exiting the process", - "timeout_seconds": "How long to wait for a single request to finish before timing it out (defaults to infinite)", - } - }, - "service_limits": { - "auto": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "bus": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "taxi": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "pedestrian": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - "min_transit_walking_distance": "Minimum distance you must walk to the egress of to a station", - "max_transit_walking_distance": "Maximum distance allowed for walking when using transit", - }, - "motor_scooter": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "motorcycle": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "bicycle": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "multimodal": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "status": { - "allow_verbose": "Allow verbose output for the /status endpoint, which can be computationally expensive" - }, - "transit": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "truck": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "skadi": { - "max_shape": "Maximum number of input shapes", - "min_resample": "Smalled resampling distance to allow in meters", - }, - "isochrone": { - "max_contours": "Maximum number of input contours to allow", - "max_time_contour": "Maximum time value for any one contour in minutes", - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_distance_contour": "Maximum distance value for any one contour in kilometers", - }, - "trace": { - "max_distance": "Maximum input shape distance in meters", - "max_gps_accuracy": "Maximum input gps accuracy in meters", - "max_search_radius": "Maximum upper bounds of the search radius in meters", - "max_shape": "Maximum number of input shape points", - "max_alternates": "Maximum number of alternate map matching", - "max_alternates_shape": "Maximum number of input shape points when requesting multiple paths", - }, - "bikeshare": { - "max_distance": "Maximum b-line distance between all locations in meters", - "max_locations": "Maximum number of input locations", - "max_matrix_distance": "Maximum b-line distance between 2 most distant locations in meters for a matrix", - "max_matrix_location_pairs": "Maximum number of routes computed with the matrix, e.g. 2500 = 50:50 or 1:2500", - }, - "centroid": { - "max_distance": "Maximum b-line distance between any pair of locations in meters", - "max_locations": "Maximum number of input locations, 127 is a hard limit and cannot be increased in config", - }, - "max_exclude_locations": "Maximum number of avoid locations to allow in a request", - "max_reachability": "Maximum reachability (number of nodes reachable) allowed on any one location", - "max_radius": "Maximum radius in meters allowed on any one location", - "max_timedep_distance": "Maximum b-line distance between locations to allow a time-dependent route", - "max_timedep_distance_matrix": "Maximum b-line distance between 2 most distant locations in meters to allow a time-dependent matrix", - "max_alternates": "Maximum number of alternate routes to allow in a request", - "max_exclude_polygons_length": "Maximum total perimeter of all exclude_polygons in meters", - "max_distance_disable_hierarchy_culling": "Maximum search distance allowed with hierarchy culling disabled", - }, - "statsd": { - "host": "The statsd host address", - "port": "The statsd port", - "prefix": "The statsd prefix to use for each metric", - "batch_size": "Approximate maximum size in bytes of each batch of stats to send to statsd", - "tags": "List of tags to include with each metric", + 'mjolnir': { + 'max_cache_size': 'Number of bytes per thread used to store tile data in memory', + 'id_table_size': 'Value controls the initial size of the Id table', + 'use_lru_mem_cache': 'Use memory cache with LRU eviction policy', + 'lru_mem_cache_hard_control': 'Use hard memory limit control for LRU memory cache (i.e. on every put) - never allow overcommit', + 'use_simple_mem_cache': 'Use memory cache within a simple hash map the clears all tiles when overcommitted', + 'user_agent': 'User-Agent http header to request single tiles', + 'tile_url': 'Http location to read tiles from if they are not found in the tile_dir, e.g.: http://your_valhalla_tile_server_host:8000/some/Optional/path/{tilePath}?some=Optional&query=params. Valhalla will look for the {tilePath} portion of the url and fill this out with a given tile path when it make a request for that tile', + 'tile_url_gz': 'Whether or not to request for compressed tiles', + 'concurrency': 'How many threads to use in the concurrent parts of tile building', + 'tile_dir': 'Location to read/write tiles to/from', + 'tile_extract': 'Location to read tiles from tar', + 'traffic_extract': 'Location to read traffic from tar', + 'incident_dir': 'Location to read incident tiles from', + 'incident_log': 'Location to read change events of incident tiles', + 'shortcut_caching': 'Precaches the superceded edges of all shortcuts in the graph. Defaults to false', + 'admin': 'Location of sqlite file holding admin polygons created with valhalla_build_admins', + 'timezone': 'Location of sqlite file holding timezone information created with valhalla_build_timezones', + 'transit_dir': 'Location of intermediate transit tiles created with valhalla_build_transit', + 'transit_bounding_box': 'Add comma separated bounding box values to only download transit data inside the given bounding box', + 'hierarchy': 'bool indicating whether road hierarchy is to be built - default to True', + 'shortcuts': 'bool indicating whether shortcuts are to be built - default to True', + 'include_driveways': 'bool indicating whether private driveways are included - default to True', + 'include_bicycle': 'bool indicating whether cycling only ways are included - default to True', + 'include_pedestrian': 'bool indicating whether pedestrian only ways are included - default to True', + 'include_driving': 'bool indicating whether driving only ways are included - default to True', + 'import_bike_share_stations': 'bool indicating whether importing bike share stations(BSS). Set to True when using multimodal - default to False', + 'global_synchronized_cache': 'bool indicating whether global_synchronized_cache is used - default to False', + 'max_concurrent_reader_users' : 'number of threads in the threadpool which can be used to fetch tiles over the network via curl', + 'reclassify_links' : 'bool indicating whether or not to reclassify links - reclassifies ramps based on the lowest class connecting road', + 'default_speeds_config': 'a path indicating the json config file which graph enhancer will use to set the speeds of edges in the graph based on their geographic location (state/country), density (urban/rural), road class, road use (form of way)', + 'data_processing': { + 'infer_internal_intersections': 'bool indicating whether or not to infer internal intersections during the graph enhancer phase or use the internal_intersection key from the pbf', + 'infer_turn_channels': 'bool indicating whether or not to infer turn channels during the graph enhancer phase or use the turn_channel key from the pbf', + 'apply_country_overrides': 'bool indicating whether or not to apply country overrides during the graph enhancer phase', + 'use_admin_db': 'bool indicating whether or not to use the administrative database during the graph enhancer phase or use the admin keys from the pbf that are set on the node', + 'use_direction_on_ways': 'bool indicating whether or not to process the direction key on the ways or utilize the guidance relation tags during the parsing phase', + 'allow_alt_name': 'bool indicating whether or not to process the alt_name key on the ways during the parsing phase', + 'use_urban_tag': 'bool indicating whether or not to use the urban area tag on the ways or to utilize the getDensity function within the graph enhancer phase', + 'use_rest_area': 'bool indicating whether or not to use the rest/service area tag on the ways', + 'scan_tar': 'bool indicating whether or not to pre-scan the tar ball(s) when loading an extract with an index file, to warm up the OS page cache.' + }, + 'logging': { + 'type': 'Type of logger either std_out or file', + 'color': 'User colored log level in std_out logger', + 'file_name': 'Output log file for the file logger' + } + }, + 'additional_data': { + 'elevation': 'Location of srtmgl1 elevation tiles for using in valhalla_build_tiles' + }, + 'loki': { + 'actions': 'Comma separated list of allowable actions for the service, one or more of: locate, route, height, optimized_route, isochrone, trace_route, trace_attributes, transit_available, expansion, centroid, status', + 'use_connectivity': 'a boolean value to know whether or not to construct the connectivity maps', + 'service_defaults': { + 'radius': 'Default radius to apply to incoming locations should one not be supplied', + 'minimum_reachability': 'Default minimum reachability to apply to incoming locations should one not be supplied', + 'search_cutoff': 'The cutoff at which we will assume the input is too far away from civilisation to be worth correlating to the nearest graph elements', + 'node_snap_tolerance': 'During edge correlation this is the tolerance used to determine whether or not to snap to the intersection rather than along the street, if the snap location is within this distance from the intersection the intersection is used instead', + 'street_side_tolerance': 'If your input coordinate is less than this tolerance away from the edge centerline then we set your side of street to none otherwise your side of street will be left or right depending on direction of travel', + 'street_side_max_distance': 'The max distance in meters that the input coordinates or display ll can be from the edge centerline for them to be used for determining the side of street. Beyond this distance the side of street is set to none', + 'heading_tolerance': 'When a heading is supplied, this is the tolerance around that heading with which we determine whether an edges heading is similar enough to match the supplied heading' + }, + 'logging': { + 'type': 'Type of logger either std_out or file', + 'color': 'User colored log level in std_out logger', + 'file_name': 'Output log file for the file logger', + 'long_request': 'Value used in processing to determine whether it took too long' + }, + 'service': { + 'proxy': 'IPC linux domain socket file location' + } + }, + 'thor': { + 'logging': { + 'type': 'Type of logger either std_out or file', + 'color': 'User colored log level in std_out logger', + 'file_name': 'Output log file for the file logger', + 'long_request': 'Value used in processing to determine whether it took too long' + }, + 'source_to_target_algorithm': 'TODO: which matrix algorithm should be used', + 'service': { + 'proxy': 'IPC linux domain socket file location' + }, + 'max_reserved_labels_count': 'Maximum capacity that allowed to keep reserved in path algorithm.', + 'clear_reserved_memory': 'If True clean reserved memory in path algorithms', + 'extended_search': 'If True and 1 side of the bidirectional search is exhausted, causes the other side to continue if the starting location of that side began on a not_thru or closed edge' + }, + 'odin': { + 'logging': { + 'type': 'Type of logger either std_out or file', + 'color': 'User colored log level in std_out logger', + 'file_name': 'Output log file for the file logger' + }, + 'service': { + 'proxy': 'IPC linux domain socket file location' + }, + 'markup_formatter': { + 'markup_enabled': 'Boolean flag to use markup formatting', + 'phoneme_format': 'The phoneme format string that will be used by street names and signs' + } + }, + 'meili': { + 'mode': 'Specify the default transport mode', + 'customizable': 'Specify which parameters are allowed to be customized by URL query parameters', + 'verbose': 'Control verbose output for debugging', + 'default': { + 'sigma_z': 'A non-negative value to specify the GPS accuracy (the variance of the normal distribution) of an incoming GPS sequence. It is also used to weight emission costs of measurements', + 'gps_accuracy': 'TODO: ', + 'beta': 'A non-negative emprical value to weight the transition cost of two successive candidates', + 'max_route_distance_factor': 'A non-negative value used to limit the routing search range which is the distance to next measurement multiplied by this factor', + 'max_route_time_factor': 'A non-negative value used to limit the routing search range which is the time to the next measurement multiplied by this factor', + 'breakage_distance': 'A non-negative value. If two successive measurements are far than this distance, then connectivity in between will not be considered', + 'max_search_radius': 'A non-negative value specifying the maximum radius in meters about a given point to search for candidate edges for routing', + 'interpolation_distance': 'If two successive measurements are closer than this distance, then the later one will be interpolated into the matched route', + 'search_radius': 'A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement', + 'geometry': 'TODO: ', + 'route': 'TODO: ', + 'turn_penalty_factor': 'A non-negative value to penalize turns from one road segment to next' + }, + 'auto': { + 'turn_penalty_factor': 'A non-negative value to penalize turns from one road segment to next', + 'search_radius': 'A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement' + }, + 'pedestrian': { + 'turn_penalty_factor': 'A non-negative value to penalize turns from one road segment to next', + 'search_radius': 'A non-negative value to specify the search radius (in meters) within which to search road candidates for each measurement' + }, + 'bicycle': { + 'turn_penalty_factor': 'A non-negative value to penalize turns from one road segment to next' + }, + 'multimodal': { + 'turn_penalty_factor': 'A non-negative value to penalize turns from one road segment to next' + }, + 'logging': { + 'type': 'Type of logger either std_out or file', + 'color': 'User colored log level in std_out logger', + 'file_name': 'Output log file for the file logger' + }, + 'service': { + 'proxy': 'IPC linux domain socket file location' + }, + 'grid': { + 'size': 'TODO: Resolution of the grid used in finding match candidates', + 'cache_size': 'TODO: number of grids to keep in cache' + } + }, + 'httpd': { + 'service': { + 'listen': 'The protocol, host location and port your service will bind to', + 'loopback': 'IPC linux domain socket file location used to communicate results back to the client', + 'interrupt': 'IPC linux domain socket file location used to cancel work in progress', + 'drain_seconds': 'How long to wait for currently running threads to finish before signaling them to shutdown', + 'shutdown_seconds': 'How long to wait for currently running threads to quit before exiting the process' + } + }, + 'service_limits': { + 'auto': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'bus': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'taxi': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'pedestrian': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix', + 'min_transit_walking_distance': 'TODO: minimum distance you must walk to a station', + 'max_transit_walking_distance': 'Maximum distance allowed for walking when using transit' + }, + 'motor_scooter': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'motorcycle': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'bicycle': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'multimodal': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'status': { + 'allow_verbose': 'Allow verbose output for the /status endpoint, which can be computationally expensive' + }, + 'transit': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'truck': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'skadi': { + 'max_shape': 'Maximum number of input shapes', + 'min_resample': 'Smalled resampling distance to allow in meters' + }, + 'isochrone': { + 'max_contours': 'Maximum number of input contours to allow', + 'max_time_contour': 'Maximum time value for any one contour in minutes', + 'max_distance':'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_distance_contour': 'Maximum distance value for any one contour in kilometers' + }, + 'trace': { + 'max_distance': 'Maximum input shape distance in meters', + 'max_gps_accuracy': 'Maximum input gps accuracy in meters', + 'max_search_radius': 'Maximum upper bounds of the search radius in meters', + 'max_shape': 'Maximum number of input shape points', + 'max_alternates': 'Maximum number of alternate map matching', + 'max_alternates_shape': 'Maximum number of input shape points when requesting multiple paths' + }, + 'bikeshare': { + 'max_distance': 'Maximum b-line distance between all locations in meters', + 'max_locations': 'Maximum number of input locations', + 'max_matrix_distance': 'Maximum b-line distance between 2 most distant locations in meters for a matrix', + 'max_matrix_locations': 'Maximum number of sources or targets for a matrix' + }, + 'centroid': { + 'max_distance': 'Maximum b-line distance between any pair of locations in meters', + 'max_locations': 'Maximum number of input locations, 127 is a hard limit and cannot be increased in config' }, + 'max_exclude_locations': 'Maximum number of avoid locations to allow in a request', + 'max_reachability': 'Maximum reachability (number of nodes reachable) allowed on any one location', + 'max_radius': 'Maximum radius in meters allowed on any one location', + 'max_timedep_distance': 'Maximum b-line distance between locations to allow a time-dependent route', + 'max_alternates': 'Maximum number of alternate routes to allow in a request', + 'max_exclude_polygons_length': 'Maximum total perimeter of all exclude_polygons in meters' + }, + 'statsd': { + 'host': 'The statsd host address', + 'port': 'The statsd port', + 'prefix': 'The statsd prefix to use for each metric', + 'batch_size': 'Approximate maximum size in bytes of each batch of stats to send to statsd', + 'tags': 'List of tags to include with each metric' + } } -def add_leaf_args( - path: str, - tree: Union[dict, bool, str, list, Optional], - leaves_: List[str], - parser_: ArgumentParser, - help: dict, -): +def add_leaf_args(path: str, tree: Union[dict, bool, str, list, Optional], leaves_: List[str], parser_: ArgumentParser, help: dict): """ returns a list of leaves of the tree, `\0` separated, stops at non dicts while doing so it also adds arguments to the parser @@ -565,10 +557,10 @@ def add_leaf_args( if isinstance(tree, dict): for k in tree: v = tree[k] - add_leaf_args("\0".join([path, k]) if len(path) else k, v, leaves_, parser_, help) + add_leaf_args('\0'.join([path, k]) if len(path) else k, v, leaves_, parser_, help) # we've reached a leaf else: - keys = path.split("\0") + keys = path.split('\0') h = help for k in keys: h = h[k] @@ -577,15 +569,15 @@ def add_leaf_args( # lists are supported as comma separated and bools support a bunch of conventions # the rest of the primatives (strings and numbers) parse automatically if isinstance(tree, Optional): - t = tree.type + t = tree.type elif isinstance(tree, list): - t = lambda arg: arg.split(",") + t = lambda arg: arg.split(',') elif isinstance(tree, bool): - t = lambda arg: bool(strtobool(arg)) + t = lambda arg: bool(strtobool(arg)) else: - t = type(tree) + t = type(tree) - arg = "--" + path.replace("_", "-").replace("\0", "-") + arg = '--' + path.replace('_', '-').replace('\0', '-') parser_.add_argument(arg, type=t, help=h, default=tree) leaves_.append(path) @@ -593,24 +585,22 @@ def add_leaf_args( def override_config(args_: dict, leaves_: list, config_: dict): """override the defaults given what was passed""" for leaf in leaves_: - keys = leaf.split("\0") + keys = leaf.split('\0') v = config_ for k in keys[:-1]: v = v[k] - v[keys[-1]] = args_.get(leaf.replace("\0", "_")) + v[keys[-1]] = args_.get(leaf.replace('\0', '_')) if isinstance(v[keys[-1]], type(Optional())): del v[keys[-1]] # set up available program options leaves = [] -parser = ArgumentParser( - description="Generate valhalla configuration", formatter_class=ArgumentDefaultsHelpFormatter -) -add_leaf_args("", config, leaves, parser, help_text) +parser = ArgumentParser(description='Generate valhalla configuration', formatter_class=ArgumentDefaultsHelpFormatter) +add_leaf_args('', config, leaves, parser, help_text) # entry point to program -if __name__ == "__main__": +if __name__ == '__main__': # TODO: add argument to set base path and use in all other path based values args = parser.parse_args() @@ -618,4 +608,4 @@ def override_config(args_: dict, leaves_: list, config_: dict): override_config(args.__dict__, leaves, config) # show the config - print(json.dumps(config, sort_keys=True, indent=2, separators=(",", ": "))) + print(json.dumps(config, sort_keys=True, indent=2, separators=(',', ': ')))