blob: 6f835fccc9e6ba62a75cf61ac39f13bf1610aa6b [file] [log] [blame]
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gson.webservice.definition.procedural;
import com.google.gson.webservice.definition.ContentBodySpec;
import java.lang.reflect.Type;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Specification of a {@link RequestBody}.
*
* @author inder
*/
public final class RequestBodySpec extends ContentBodySpec {
public static class Builder {
private final Map<String, Type> paramsSpec = new LinkedHashMap<String, Type>();
public Builder add(String paramName, Type type) {
paramsSpec.put(paramName, type);
return this;
}
public RequestBodySpec build() {
RequestBodySpec spec = new RequestBodySpec(paramsSpec);
return spec;
}
}
public RequestBodySpec(Map<String, Type> paramsSpec) {
super(paramsSpec);
}
}