io.harness.cf.client.dto.Target Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ff-java-server-sdk Show documentation
Show all versions of ff-java-server-sdk Show documentation
Harness Feature Flag Java Server SDK
The newest version!
package io.harness.cf.client.dto;
import io.harness.cf.client.common.StringUtils;
import java.util.Map;
import java.util.Set;
import lombok.*;
import lombok.experimental.Accessors;
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class Target {
private String name;
private String identifier;
@Singular private Map attributes;
@Deprecated // private attributes will be removed in a future release
@Getter
@Accessors(fluent = true)
@Builder.Default
private Boolean isPrivate = false;
@Deprecated @Singular private Set privateAttributes;
@Override
public String toString() {
return "TargetId: " + identifier;
}
public boolean isValid() {
return !StringUtils.isNullOrEmpty(identifier);
}
public io.harness.cf.model.Target ApiTarget() {
return io.harness.cf.model.Target.builder()
.identifier(getIdentifier())
.name(getName())
.attributes(getAttributes())
.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy