
com.sap.cloud.alert.notification.client.builder.AffectedCustomerResourceBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clm-sl-alert-notification-client Show documentation
Show all versions of clm-sl-alert-notification-client Show documentation
Means for out-of-the-box events management in SAP Alert Notification service for SAP BTP service.
package com.sap.cloud.alert.notification.client.builder;
import com.sap.cloud.alert.notification.client.model.AffectedCustomerResource;
import java.util.HashMap;
import java.util.Map;
import static java.util.Objects.requireNonNull;
import static org.apache.commons.collections4.MapUtils.emptyIfNull;
public class AffectedCustomerResourceBuilder {
private String name;
private String type;
private String instance;
private Map tags;
public AffectedCustomerResourceBuilder() {
this.name = null;
this.type = null;
this.instance = null;
this.tags = new HashMap<>();
}
public AffectedCustomerResourceBuilder withName(String name) {
this.name = name;
return this;
}
public AffectedCustomerResourceBuilder withType(String type) {
this.type = type;
return this;
}
public AffectedCustomerResourceBuilder withInstance(String instance) {
this.instance = instance;
return this;
}
public AffectedCustomerResourceBuilder withTags(Map tags) {
this.tags = new HashMap<>(emptyIfNull(tags));
return this;
}
public AffectedCustomerResource build() {
return new AffectedCustomerResource(
requireNonNull(name),
requireNonNull(type),
instance,
tags
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy