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

io.streamthoughts.jikkou.kafka.models.V1KafkaTableRecordSpec Maven / Gradle / Ivy

The newest version!
/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright (c) The original authors
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package io.streamthoughts.jikkou.kafka.models;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.streamthoughts.jikkou.core.annotation.Reflectable;
import io.streamthoughts.jikkou.kafka.model.DataValue;
import io.streamthoughts.jikkou.kafka.model.KafkaRecordHeader;
import java.beans.ConstructorProperties;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import lombok.Builder;
import lombok.Setter;
import lombok.Singular;
import lombok.With;
import lombok.extern.jackson.Jacksonized;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Builder(builderMethodName = "builder", toBuilder = true, setterPrefix = "with")
@With
@Setter
@JsonPropertyOrder({
    "topic",
    "headers",
    "key",
    "value"
})
@Jacksonized
@Reflectable
@Generated("jsonschema2pojo")
public class V1KafkaTableRecordSpec {

    /**
     * The topic name.
     * (Required)
     * 
     */
    @JsonProperty("topic")
    @JsonPropertyDescription("The topic name.")
    private String topic;
    /**
     * The record header.
     * 
     */
    @JsonProperty("headers")
    @JsonPropertyDescription("The record header.")
    @Singular
    private List headers = new ArrayList();
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("key")
    private DataValue key;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("value")
    private DataValue value;

    /**
     * No args constructor for use in serialization
     * 
     */
    public V1KafkaTableRecordSpec() {
    }

    /**
     * 
     * @param headers
     * @param topic
     * @param value
     * @param key
     */
    @ConstructorProperties({
        "topic",
        "headers",
        "key",
        "value"
    })
    public V1KafkaTableRecordSpec(String topic, List headers, DataValue key, DataValue value) {
        super();
        this.topic = topic;
        this.headers = headers;
        this.key = key;
        this.value = value;
    }

    /**
     * The topic name.
     * (Required)
     * 
     */
    @JsonProperty("topic")
    public String getTopic() {
        return topic;
    }

    /**
     * The record header.
     * 
     */
    @JsonProperty("headers")
    public List getHeaders() {
        return headers;
    }

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("key")
    public DataValue getKey() {
        return key;
    }

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("value")
    public DataValue getValue() {
        return value;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(V1KafkaTableRecordSpec.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("topic");
        sb.append('=');
        sb.append(((this.topic == null)?"":this.topic));
        sb.append(',');
        sb.append("headers");
        sb.append('=');
        sb.append(((this.headers == null)?"":this.headers));
        sb.append(',');
        sb.append("key");
        sb.append('=');
        sb.append(((this.key == null)?"":this.key));
        sb.append(',');
        sb.append("value");
        sb.append('=');
        sb.append(((this.value == null)?"":this.value));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.topic == null)? 0 :this.topic.hashCode()));
        result = ((result* 31)+((this.headers == null)? 0 :this.headers.hashCode()));
        result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode()));
        result = ((result* 31)+((this.key == null)? 0 :this.key.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof V1KafkaTableRecordSpec) == false) {
            return false;
        }
        V1KafkaTableRecordSpec rhs = ((V1KafkaTableRecordSpec) other);
        return (((((this.topic == rhs.topic)||((this.topic!= null)&&this.topic.equals(rhs.topic)))&&((this.headers == rhs.headers)||((this.headers!= null)&&this.headers.equals(rhs.headers))))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value))))&&((this.key == rhs.key)||((this.key!= null)&&this.key.equals(rhs.key))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy