001package ca.uhn.fhir.rest.server.interceptor.validation.address; 002 003/*- 004 * #%L 005 * HAPI FHIR - Server Framework 006 * %% 007 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import org.hl7.fhir.instance.model.api.IBase; 024 025import java.util.HashMap; 026import java.util.Map; 027 028public class AddressValidationResult { 029 030 private boolean myIsValid; 031 private String myValidatedAddressString; 032 private Map<String, String> myValidationResults = new HashMap<>(); 033 private String myRawResponse; 034 private IBase myValidatedAddress; 035 036 public boolean isValid() { 037 return myIsValid; 038 } 039 040 public void setValid(boolean theIsValid) { 041 this.myIsValid = theIsValid; 042 } 043 044 public Map<String, String> getValidationResults() { 045 return myValidationResults; 046 } 047 048 public void setValidationResults(Map<String, String> myValidationResults) { 049 this.myValidationResults = myValidationResults; 050 } 051 052 public String getValidatedAddressString() { 053 return myValidatedAddressString; 054 } 055 056 public void setValidatedAddressString(String theValidatedAddressString) { 057 this.myValidatedAddressString = theValidatedAddressString; 058 } 059 060 public IBase getValidatedAddress() { 061 return myValidatedAddress; 062 } 063 064 public void setValidatedAddress(IBase theValidatedAddress) { 065 this.myValidatedAddress = theValidatedAddress; 066 } 067 068 public String getRawResponse() { 069 return myRawResponse; 070 } 071 072 public void setRawResponse(String theRawResponse) { 073 this.myRawResponse = theRawResponse; 074 } 075 076 @Override 077 public String toString() { 078 return 079 " isValid=" + myIsValid + 080 ", validatedAddressString='" + myValidatedAddressString + '\'' + 081 ", validationResults=" + myValidationResults + '\'' + 082 ", rawResponse='" + myRawResponse + '\'' + 083 ", myValidatedAddress='" + myValidatedAddress + '\''; 084 } 085}