public Request<GetPolicyRequest> marshall(GetPolicyRequest getPolicyRequest) {if (getPolicyRequest == null) {throw new SdkClientException("Invalid argument passed to marshall(...)");}Request<GetPolicyRequest> request = new DefaultRequest<GetPolicyRequest>(getPolicyRequest, "AmazonIdentityManagement");request.addParameter("Action", "GetPolicy");request.addParameter("Version", "2010-05-08");request.setHttpMethod(HttpMethodName.POST);if (getPolicyRequest.getPolicyArn() != null) {request.addParameter("PolicyArn", StringUtils.fromString(getPolicyRequest.getPolicyArn()));}return request;}
public IRequest Marshall(GetPolicyRequest publicRequest){IRequest request = new DefaultRequest(publicRequest, "Amazon.Lambda");request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2015-03-31";request.HttpMethod = "GET";if (!publicRequest.IsSetFunctionName())throw new AmazonLambdaException("Request object does not have required field FunctionName set");request.AddPathResource("{FunctionName}", StringUtils.FromString(publicRequest.FunctionName));if (publicRequest.IsSetQualifier())request.Parameters.Add("Qualifier", StringUtils.FromString(publicRequest.Qualifier));request.ResourcePath = "/2015-03-31/functions/{FunctionName}/policy";request.MarshallerVersion = 2;request.UseQueryString = true;return request;}