<commit_before>package org.zalando.nakadi.client.java.model;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Metadata for this Event. Contains commons fields for both Business and
 * DataChange Events. Most are enriched by Nakadi upon reception, but they in
 * general MIGHT be set by the client.
 */
public class EventMetadata {
    private final String eid;
    private final String eventTypeName;
    private final String occurredAt;
    private final String receivedAt;
    private final List<String> parentEids;
    private final String flowId;
    private final String partition;

    /**
     *
     * Metadata for this Event. Contains commons fields for both Business and
     * DataChange Events. Most are enriched by Nakadi upon reception, but they
     * in general MIGHT be set by the client.
     * 
     * @param eid
     *            Identifier of this Event. Clients are allowed to generate this
     *            and this SHOULD be guaranteed to be unique from the
     *            perspective of the producer. Consumers MIGHT use this value to
     *            assert uniqueness of reception of the Event.
     * @param eventTypeName
     *            The EventType of this Event. This is enriched by Nakadi on
     *            reception of the Event based on the endpoint where the
     *            Producer sent the Event to. If provided MUST match the
     *            endpoint. Failure to do so will cause rejection of the Event.
     * @param occurredAt
     *            Timestamp of creation of the Event generated by the producer.
     * @param receivedAt
     *            Timestamp of the reception of the Event by Nakadi. This is
     *            enriched upon reception of the Event. If set by the producer
     *            Event will be rejected.
     * @param parentEids
     *            Event identifier of the Event that caused the generation of
     *            this Event. Set by the producer.
     * @param flowId
     *            The flow-id of the producer of this Event. As this is usually
     *            a HTTP header, this is enriched from the header into the
     *            metadata by Nakadi to avoid clients having to explicitly copy
     *            this.
     * @param metadata
     *            This Metadata contains common fields unrelated to Nakadi
     *            logic. Should be mainly enriched by the Consumer.
     *
     */
    @JsonCreator
    public EventMetadata(
    		@JsonProperty("eid") String eid, 
    		@JsonProperty("event_type")String eventTypeName, 
    		@JsonProperty("occurred_at")String occurredAt, 
    		@JsonProperty("received_at")String receivedAt,
    		@JsonProperty("parent_eids")List<String> parentEids,
    		@JsonProperty("flow_id")String flowId,
    		@JsonProperty("partition")String partition) {
        super();
        this.eid = eid;
        this.eventTypeName = eventTypeName;
        this.occurredAt = occurredAt;
        this.receivedAt = receivedAt;
        this.parentEids = parentEids;
        this.flowId = flowId;
        this.partition = partition;
    }

    public String getEid() {
        return eid;
    }

    public String getEventTypeName() {
        return eventTypeName;
    }

    public String getOccurredAt() {
        return occurredAt;
    }

    public String getReceivedAt() {
        return receivedAt;
    }<commit_msg>Generate the JSON property event_type instead of event_type_name. Fixes #108<commit_after>package org.zalando.nakadi.client.java.model;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Metadata for this Event. Contains commons fields for both Business and
 * DataChange Events. Most are enriched by Nakadi upon reception, but they in
 * general MIGHT be set by the client.
 */
public class EventMetadata {
    private final String eid;
    private final String eventTypeName;
    private final String occurredAt;
    private final String receivedAt;
    private final List<String> parentEids;
    private final String flowId;
    private final String partition;

    /**
     *
     * Metadata for this Event. Contains commons fields for both Business and
     * DataChange Events. Most are enriched by Nakadi upon reception, but they
     * in general MIGHT be set by the client.
     * 
     * @param eid
     *            Identifier of this Event. Clients are allowed to generate this
     *            and this SHOULD be guaranteed to be unique from the
     *            perspective of the producer. Consumers MIGHT use this value to
     *            assert uniqueness of reception of the Event.
     * @param eventTypeName
     *            The EventType of this Event. This is enriched by Nakadi on
     *            reception of the Event based on the endpoint where the
     *            Producer sent the Event to. If provided MUST match the
     *            endpoint. Failure to do so will cause rejection of the Event.
     * @param occurredAt
     *            Timestamp of creation of the Event generated by the producer.
     * @param receivedAt
     *            Timestamp of the reception of the Event by Nakadi. This is
     *            enriched upon reception of the Event. If set by the producer
     *            Event will be rejected.
     * @param parentEids
     *            Event identifier of the Event that caused the generation of
     *            this Event. Set by the producer.
     * @param flowId
     *            The flow-id of the producer of this Event. As this is usually
     *            a HTTP header, this is enriched from the header into the
     *            metadata by Nakadi to avoid clients having to explicitly copy
     *            this.
     * @param metadata
     *            This Metadata contains common fields unrelated to Nakadi
     *            logic. Should be mainly enriched by the Consumer.
     *
     */
    @JsonCreator
    public EventMetadata(
    		@JsonProperty("eid") String eid, 
    		@JsonProperty("event_type")String eventTypeName, 
    		@JsonProperty("occurred_at")String occurredAt, 
    		@JsonProperty("received_at")String receivedAt,
    		@JsonProperty("parent_eids")List<String> parentEids,
    		@JsonProperty("flow_id")String flowId,
    		@JsonProperty("partition")String partition) {
        super();
        this.eid = eid;
        this.eventTypeName = eventTypeName;
        this.occurredAt = occurredAt;
        this.receivedAt = receivedAt;
        this.parentEids = parentEids;
        this.flowId = flowId;
        this.partition = partition;
    }

    public String getEid() {
        return eid;
    }

    @JsonProperty("event_type")
    public String getEventTypeName() {
        return eventTypeName;
    }

    public String getOccurredAt() {
        return occurredAt;
    }

    public String getReceivedAt() {
        return receivedAt;
    }
{'fraction_non_alphanumeric': 0.05936203690459162, 'fraction_numerical': 0.00042912315834644544, 'mean_word_length': 2.2310536044362292, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1117875', 'n_tokens_mistral': 1853, 'n_tokens_neox': 1767, 'n_words': 704}