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

io.github.yawenok.fcm.client.response.FcmMessageResultItem Maven / Gradle / Ivy

The newest version!
package io.github.yawenok.fcm.client.response;

import com.alibaba.fastjson.annotation.JSONCreator;
import com.alibaba.fastjson.annotation.JSONField;
import io.github.yawenok.fcm.client.enums.ErrorCode;

public class FcmMessageResultItem {

    private final String messageId;
    private final String registrationId;
    private final ErrorCode errorCode;

    @JSONCreator
    public FcmMessageResultItem(@JSONField(name = "message_id") String messageId,
                                @JSONField(name = "registration_id") String registrationId,
                                @JSONField(name = "error") ErrorCode errorCode) {
        this.messageId = messageId;
        this.registrationId = registrationId;
        this.errorCode = errorCode;
    }

    public String getMessageId() {
        return messageId;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    @Override
    public String toString() {
        return "FcmMessageResultItem{" +
                "messageId='" + messageId + '\'' +
                ", registrationId='" + registrationId + '\'' +
                ", errorCode=" + errorCode +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy