Skip to content

TransitType enum not generated #4591

Open
@razvanphp

Description

@razvanphp

There might be are other missing enums, but this one stood out to me:
https://developers.google.com/wallet/reference/rest/v1/transitclass#TransitClass.TransitType

Since I'm the maintainer of eymengunay/php-passbook project and we will have this repo as dependancy, I would love to contribute this here for the whole community.

<?php

namespace Google\Service\Walletobjects;

/**
 * Enum for Transit Types.
 */
enum TransitType: string
{
    case TRANSIT_TYPE_UNSPECIFIED = 'TRANSIT_TYPE_UNSPECIFIED';
    
    case BUS = 'BUS';
    
    /**
     * @deprecated Legacy alias for BUS. Deprecated.
     */
    case bus = 'BUS';
    
    case RAIL = 'RAIL';
    
    /**
     * @deprecated Legacy alias for RAIL. Deprecated.
     */
    case rail = 'RAIL';
    
    case TRAM = 'TRAM';
    
    /**
     * @deprecated Legacy alias for TRAM. Deprecated.
     */
    case tram = 'TRAM';
    
    case FERRY = 'FERRY';
    
    /**
     * @deprecated Legacy alias for FERRY. Deprecated.
     */
    case ferry = 'FERRY';
    
    case OTHER = 'OTHER';
    
    /**
     * @deprecated Legacy alias for OTHER. Deprecated.
     */
    case other = 'OTHER';
}

LE: enum data type was introduced in version 8.1, so we should probably stick with class constants for now to support 7.4

But... not sure how to do it through the generator.... can I get some guidance at least? Maybe I could try it.

Also, on a more general note, it would be awesome to include those types as return types and parameter types as many other issues suggested, now that PHP 7.4 is the minimum supported version.

Thank you!

CC @bshaffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions