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

io.voucherify.client.model.validationRules.MetadataValidationRules Maven / Gradle / Ivy

package io.voucherify.client.model.validationRules;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Singular;
import lombok.ToString;

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

@NoArgsConstructor(access = AccessLevel.PRIVATE)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Builder
@Getter
@ToString
public class MetadataValidationRules {

  @Singular("rule")
  private Map rules;

  @JsonAnyGetter
  public Map getRules() {
    return rules;
  }

  @JsonAnySetter
  public void setRules(String key, MetadataRules value) {
    if(rules == null) {
      rules = new HashMap();
    }

    rules.put(key, value);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy