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

com.sap.cloud.alert.notification.client.model.AffectedCustomerResource Maven / Gradle / Ivy

Go to download

Means for out-of-the-box events management in SAP Alert Notification service for SAP BTP service.

There is a newer version: 1.11.0
Show newest version
package com.sap.cloud.alert.notification.client.model;

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

import java.util.HashMap;
import java.util.Map;

import static java.util.Collections.unmodifiableMap;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.collections4.MapUtils.emptyIfNull;

@JsonIgnoreProperties(ignoreUnknown = true)
public class AffectedCustomerResource {

    private final String name;
    private final String type;
    private final String instance;
    private final Map tags;

    @JsonCreator
    public AffectedCustomerResource(
            @JsonProperty("resourceName") String name,
            @JsonProperty("resourceType") String type,
            @JsonProperty("resourceInstance") String instance,
            @JsonProperty("tags") Map tags
    ) {
        this.instance = instance;
        this.name = requireNonNull(name);
        this.type = requireNonNull(type);
        this.tags = new HashMap<>(emptyIfNull(tags));
    }

    public String getResourceName() {
        return name;
    }

    public String getResourceType() {
        return type;
    }

    public String getResourceInstance() {
        return instance;
    }

    public Map getTags() {
        return unmodifiableMap(tags);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy