All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.entur.gbfs.mapper.GBFSFeedNameMapperImpl Maven / Gradle / Ivy

There is a newer version: 2.0.16
Show newest version
package org.entur.gbfs.mapper;

import javax.annotation.processing.Generated;
import org.mobilitydata.gbfs.v2_3.gbfs.GBFSFeedName;
import org.mobilitydata.gbfs.v3_0.gbfs.GBFSFeed;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-08-12T03:16:00+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 17.0.11 (Eclipse Adoptium)"
)
public class GBFSFeedNameMapperImpl implements GBFSFeedNameMapper {

    @Override
    public GBFSFeedName map(GBFSFeed.Name source) {
        if ( source == null ) {
            return null;
        }

        GBFSFeedName gBFSFeedName;

        switch ( source ) {
            case GBFS: gBFSFeedName = GBFSFeedName.GBFS;
            break;
            case GBFS_VERSIONS: gBFSFeedName = GBFSFeedName.GBFSVersions;
            break;
            case SYSTEM_INFORMATION: gBFSFeedName = GBFSFeedName.SystemInformation;
            break;
            case VEHICLE_TYPES: gBFSFeedName = GBFSFeedName.VehicleTypes;
            break;
            case STATION_INFORMATION: gBFSFeedName = GBFSFeedName.StationInformation;
            break;
            case STATION_STATUS: gBFSFeedName = GBFSFeedName.StationStatus;
            break;
            case VEHICLE_STATUS: gBFSFeedName = GBFSFeedName.FreeBikeStatus;
            break;
            case SYSTEM_ALERTS: gBFSFeedName = GBFSFeedName.SystemAlerts;
            break;
            case SYSTEM_REGIONS: gBFSFeedName = GBFSFeedName.SystemRegions;
            break;
            case SYSTEM_PRICING_PLANS: gBFSFeedName = GBFSFeedName.SystemPricingPlans;
            break;
            case GEOFENCING_ZONES: gBFSFeedName = GBFSFeedName.GeofencingZones;
            break;
            default: throw new IllegalArgumentException( "Unexpected enum constant: " + source );
        }

        return gBFSFeedName;
    }

    @Override
    public GBFSFeed.Name map(GBFSFeedName source) {
        if ( source == null ) {
            return null;
        }

        GBFSFeed.Name name;

        switch ( source ) {
            case GBFS: name = GBFSFeed.Name.GBFS;
            break;
            case GBFSVersions: name = GBFSFeed.Name.GBFS_VERSIONS;
            break;
            case SystemInformation: name = GBFSFeed.Name.SYSTEM_INFORMATION;
            break;
            case VehicleTypes: name = GBFSFeed.Name.VEHICLE_TYPES;
            break;
            case StationInformation: name = GBFSFeed.Name.STATION_INFORMATION;
            break;
            case StationStatus: name = GBFSFeed.Name.STATION_STATUS;
            break;
            case FreeBikeStatus: name = GBFSFeed.Name.VEHICLE_STATUS;
            break;
            case SystemAlerts: name = GBFSFeed.Name.SYSTEM_ALERTS;
            break;
            case SystemRegions: name = GBFSFeed.Name.SYSTEM_REGIONS;
            break;
            case SystemPricingPlans: name = GBFSFeed.Name.SYSTEM_PRICING_PLANS;
            break;
            case GeofencingZones: name = GBFSFeed.Name.GEOFENCING_ZONES;
            break;
            default: name = null;
        }

        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy