001package ca.uhn.fhir.rest.gclient;
002
003import org.hl7.fhir.instance.model.api.IBase;
004
005/*
006 * #%L
007 * HAPI FHIR - Core Library
008 * %%
009 * Copyright (C) 2014 - 2016 University Health Network
010 * %%
011 * Licensed under the Apache License, Version 2.0 (the "License");
012 * you may not use this file except in compliance with the License.
013 * You may obtain a copy of the License at
014 * 
015 *      http://www.apache.org/licenses/LICENSE-2.0
016 * 
017 * Unless required by applicable law or agreed to in writing, software
018 * distributed under the License is distributed on an "AS IS" BASIS,
019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
020 * See the License for the specific language governing permissions and
021 * limitations under the License.
022 * #L%
023 */
024
025import org.hl7.fhir.instance.model.api.IBaseParameters;
026
027public interface IOperationUntyped {
028
029        /**
030         * Use the given parameters resource as the input to the operation
031         * 
032         * @param theParameters The parameters to use as input. May also be <code>null</code> if the operation
033         * does not require any input parameters.
034         */
035        <T extends IBaseParameters> IOperationUntypedWithInput<T> withParameters(T theParameters);
036
037        /**
038         * The operation does not require any input parameters
039         * 
040         * @param theOutputParameterType The type to use for the output parameters (this should be set to
041         * <code>Parameters.class</code> drawn from the version of the FHIR structures you are using)
042         */
043        <T extends IBaseParameters> IOperationUntypedWithInput<T> withNoParameters(Class<T> theOutputParameterType);
044
045        /**
046         * Use chained method calls to construct a Parameters input. This form is a convenience
047         * in order to allow simple method chaining to be used to build up a parameters
048         * resource for the input of an operation without needing to manually construct one.
049         * 
050         * @param theParameterType The type to use for the output parameters (this should be set to
051         * <code>Parameters.class</code> drawn from the version of the FHIR structures you are using)
052         * @param theName The first parameter name
053         * @param theValue The first parameter value
054         */
055        <T extends IBaseParameters> IOperationUntypedWithInputAndPartialOutput<T> withParameter(Class<T> theParameterType, String theName, IBase theValue);
056
057}