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

com.g2forge.gearbox.github.actions.GHActionEvent Maven / Gradle / Ivy

The newest version!
package com.g2forge.gearbox.github.actions;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.g2forge.alexandria.java.text.casing.CamelCase;
import com.g2forge.alexandria.java.text.casing.SnakeCase;

public enum GHActionEvent {
	Push,
	PullRequest;

	@JsonCreator
	public static GHActionEvent parse(String string) {
		return valueOf(CamelCase.create().toString(new SnakeCase("_").fromString(string)));
	}

	@JsonValue
	@Override
	public String toString() {
		return new SnakeCase("_").toString(CamelCase.create().fromString(name()));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy