/** * <p> * The JSON document that describes the policy. * </p> * * @param policyDocument * The JSON document that describes the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyResult withPolicyDocument(String policyDocument) { setPolicyDocument(policyDocument); return this; }
createPolicyResult.setPolicyDocument(context.getUnmarshaller(String.class).unmarshall(context));
public CreatePolicyResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreatePolicyResult createPolicyResult = new CreatePolicyResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("policyName")) { createPolicyResult.setPolicyName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyArn")) { createPolicyResult.setPolicyArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyDocument")) { createPolicyResult.setPolicyDocument(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyVersionId")) { createPolicyResult.setPolicyVersionId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return createPolicyResult; }
/** * <p> * The JSON document that describes the policy. * </p> * * @param policyDocument * The JSON document that describes the policy. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyResult withPolicyDocument(String policyDocument) { setPolicyDocument(policyDocument); return this; }
public CreatePolicyResult unmarshall(JsonUnmarshallerContext context) throws Exception { CreatePolicyResult createPolicyResult = new CreatePolicyResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("policyName")) { createPolicyResult.setPolicyName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyArn")) { createPolicyResult.setPolicyArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyDocument")) { createPolicyResult.setPolicyDocument(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("policyVersionId")) { createPolicyResult.setPolicyVersionId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return createPolicyResult; }
createPolicyResult.setPolicyDocument(context.getUnmarshaller(String.class).unmarshall(context));