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

com.netflix.metacat.common.dto.notifications.sns.SNSMessage Maven / Gradle / Ivy

/*
 *
 *  Copyright 2016 Netflix, Inc.
 *
 *     Licensed under the Apache License, Version 2.0 (the "License");
 *     you may not use this file except in compliance with the License.
 *     You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *     Unless required by applicable law or agreed to in writing, software
 *     distributed under the License is distributed on an "AS IS" BASIS,
 *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *     See the License for the specific language governing permissions and
 *     limitations under the License.
 *
 */
package com.netflix.metacat.common.dto.notifications.sns;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.netflix.metacat.common.dto.BaseDto;
import lombok.Getter;
import lombok.ToString;

/**
 * Base SNS notification DTO with shared fields.
 *
 * @param 

The type of payload this notification has * @author tgianos * @since 0.1.47 */ @Getter @ToString public class SNSMessage

extends BaseDto { private final String id; private final long timestamp; private final String requestId; private final String name; private final SNSMessageType type; private final P payload; /** * Create a new SNSMessage. * * @param id The unique id of the message * @param timestamp The number of milliseconds since epoch that this message occurred * @param requestId The id of the API request that generated this and possibly other messages. Used for grouping * @param type The type of notification * @param name The qualified name of the resource that this notification is being generated for * @param payload The payload of the notification */ @JsonCreator public SNSMessage( @JsonProperty("id") final String id, @JsonProperty("timestamp") final long timestamp, @JsonProperty("requestId") final String requestId, @JsonProperty("type") final SNSMessageType type, @JsonProperty("name") final String name, @JsonProperty("payload") final P payload ) { this.id = id; this.timestamp = timestamp; this.requestId = requestId; this.type = type; this.name = name; this.payload = payload; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy