/** * <p> * The step details for the requested step identifier. * </p> * * @param step * The step details for the requested step identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStepResult withStep(Step step) { setStep(step); return this; }
public DescribeStepResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeStepResult describeStepResult = new DescribeStepResult(); 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 describeStepResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Step", targetDepth)) { context.nextToken(); describeStepResult.setStep(StepJsonUnmarshaller.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 describeStepResult; }
/** * <p> * The step details for the requested step identifier. * </p> * * @param step * The step details for the requested step identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStepResult withStep(Step step) { setStep(step); return this; }
@Override public DescribeStepResult answer(InvocationOnMock invocation) throws Throwable { DescribeStepRequest describeStepRequest = invocation.getArgument(1); assertEquals(clusterId, describeStepRequest.getClusterId()); assertEquals(stepId, describeStepRequest.getStepId()); DescribeStepResult describeStepResult = new DescribeStepResult(); describeStepResult.setStep(expectedStep); return describeStepResult; } });
public DescribeStepResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeStepResult describeStepResult = new DescribeStepResult(); 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 describeStepResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Step", targetDepth)) { context.nextToken(); describeStepResult.setStep(StepJsonUnmarshaller.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 describeStepResult; }