/** * <p> * A <code>UserProfile</code> object that describes the user's SSH information. * </p> * * @param userProfile * A <code>UserProfile</code> object that describes the user's SSH information. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMyUserProfileResult withUserProfile(SelfUserProfile userProfile) { setUserProfile(userProfile); return this; }
public DescribeMyUserProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeMyUserProfileResult describeMyUserProfileResult = new DescribeMyUserProfileResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeMyUserProfileResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UserProfile", targetDepth)) { context.nextToken(); describeMyUserProfileResult.setUserProfile(SelfUserProfileJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeMyUserProfileResult; }
/** * <p> * A <code>UserProfile</code> object that describes the user's SSH information. * </p> * * @param userProfile * A <code>UserProfile</code> object that describes the user's SSH information. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMyUserProfileResult withUserProfile(SelfUserProfile userProfile) { setUserProfile(userProfile); return this; }
public DescribeMyUserProfileResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeMyUserProfileResult describeMyUserProfileResult = new DescribeMyUserProfileResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeMyUserProfileResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("UserProfile", targetDepth)) { context.nextToken(); describeMyUserProfileResult.setUserProfile(SelfUserProfileJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeMyUserProfileResult; }