/** * <p> * The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported. * </p> * * @param roles * The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are * supported. * @return Returns a reference to this object so that method calls can be chained together. */ public GetIdentityPoolRolesResult withRoles(java.util.Map<String, String> roles) { setRoles(roles); return this; }
getIdentityPoolRolesResult.setRoles(new MapUnmarshaller<String, String>(context.getUnmarshaller(String.class), context .getUnmarshaller(String.class)).unmarshall(context));
public GetIdentityPoolRolesResult unmarshall(JsonUnmarshallerContext context) throws Exception { GetIdentityPoolRolesResult getIdentityPoolRolesResult = new GetIdentityPoolRolesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("IdentityPoolId")) { getIdentityPoolRolesResult.setIdentityPoolId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Roles")) { getIdentityPoolRolesResult.setRoles(new MapUnmarshaller<String>( StringJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("RoleMappings")) { getIdentityPoolRolesResult.setRoleMappings(new MapUnmarshaller<RoleMapping>( RoleMappingJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return getIdentityPoolRolesResult; }