
001package org.hl7.fhir.r5.utils.validation; 002 003import org.hl7.fhir.utilities.MarkedToMoveToAdjunctPackage; 004 005import com.fasterxml.jackson.annotation.JsonProperty; 006import com.google.gson.annotations.SerializedName; 007 008import java.util.Objects; 009 010@MarkedToMoveToAdjunctPackage 011public class BundleValidationRule { 012 @JsonProperty("rule") 013 @SerializedName("rule") 014 private 015 String rule; 016 017 @JsonProperty("profile") 018 @SerializedName("profile") 019 private 020 String profile; 021 private boolean checked; 022 023 @SerializedName("rule") 024 @JsonProperty("rule") 025 public String getRule() { 026 return rule; 027 } 028 029 @SerializedName("rule") 030 @JsonProperty("rule") 031 public BundleValidationRule setRule(String rule) { 032 this.rule = rule; 033 return this; 034 } 035 036 @SerializedName("profile") 037 @JsonProperty("profile") 038 public String getProfile() { 039 return profile; 040 } 041 042 @SerializedName("profile") 043 @JsonProperty("profile") 044 public BundleValidationRule setProfile(String profile) { 045 this.profile = profile; 046 return this; 047 } 048 049 public boolean isChecked() { 050 return checked; 051 } 052 053 public void setChecked(boolean checked) { 054 this.checked = checked; 055 } 056 057 @Override 058 public boolean equals(Object o) { 059 if (this == o) return true; 060 if (o == null || getClass() != o.getClass()) return false; 061 BundleValidationRule that = (BundleValidationRule) o; 062 return Objects.equals(profile, that.profile) && 063 Objects.equals(rule, that.rule); 064 } 065 066 @Override 067 public int hashCode() { 068 return Objects.hash(profile, rule); 069 } 070}