Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding is option to EnumOptions #549

Closed
yuri-sergiichuk opened this issue Jun 26, 2020 · 1 comment
Closed

Consider adding is option to EnumOptions #549

yuri-sergiichuk opened this issue Jun 26, 2020 · 1 comment

Comments

@yuri-sergiichuk
Copy link
Contributor

yuri-sergiichuk commented Jun 26, 2020

It's currently possible to add (is).java_type option to a particular message, but not to an enum which could be useful as well.

E.g. consider the following example with enums used for CI build states:

    // The build state.
    enum State {
        S_UNKNOWN = 0;

        // The build is created.
        CREATED = 1;

        // The build is received by the CI.
        RECEIVED = 2;

        // The build is in progress.
        STARTED = 3;

        // The build has passed successfully.
        PASSED = 4;

        // The build has failed.
        //
        // Denotes that the developer code could not be successfully built.
        //
        FAILED = 5;

        // The build configuration has failed.
        //
        // Denotes that the build configuration or pre-build steps failed.
        //
        ERRORED = 6;

        // The build is cancelled.
        CANCELLED = 7;
    }

We may want to have a way to augment the enum with smth like isFailed() where FAILED, ERRORED and CANCELLED statutes are all considered as failures.

@yuri-sergiichuk
Copy link
Contributor Author

Closing in favor of a more generic #69.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant