/** * <p> * A <code>TemporaryCredential</code> object that contains the data needed to log in to the instance by RDP clients, * such as the Microsoft Remote Desktop Connection. * </p> * * @param temporaryCredential * A <code>TemporaryCredential</code> object that contains the data needed to log in to the instance by RDP * clients, such as the Microsoft Remote Desktop Connection. * @return Returns a reference to this object so that method calls can be chained together. */ public GrantAccessResult withTemporaryCredential(TemporaryCredential temporaryCredential) { setTemporaryCredential(temporaryCredential); return this; }
public GrantAccessResult unmarshall(JsonUnmarshallerContext context) throws Exception { GrantAccessResult grantAccessResult = new GrantAccessResult(); 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 grantAccessResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("TemporaryCredential", targetDepth)) { context.nextToken(); grantAccessResult.setTemporaryCredential(TemporaryCredentialJsonUnmarshaller.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 grantAccessResult; }
/** * <p> * A <code>TemporaryCredential</code> object that contains the data needed to log in to the instance by RDP clients, * such as the Microsoft Remote Desktop Connection. * </p> * * @param temporaryCredential * A <code>TemporaryCredential</code> object that contains the data needed to log in to the instance by RDP * clients, such as the Microsoft Remote Desktop Connection. * @return Returns a reference to this object so that method calls can be chained together. */ public GrantAccessResult withTemporaryCredential(TemporaryCredential temporaryCredential) { setTemporaryCredential(temporaryCredential); return this; }
public GrantAccessResult unmarshall(JsonUnmarshallerContext context) throws Exception { GrantAccessResult grantAccessResult = new GrantAccessResult(); 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 grantAccessResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("TemporaryCredential", targetDepth)) { context.nextToken(); grantAccessResult.setTemporaryCredential(TemporaryCredentialJsonUnmarshaller.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 grantAccessResult; }