/** * <p> * An object that represents the details of the consumer. * </p> * * @param consumerDescription * An object that represents the details of the consumer. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStreamConsumerResult withConsumerDescription(ConsumerDescription consumerDescription) { setConsumerDescription(consumerDescription); return this; }
public DescribeStreamConsumerResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeStreamConsumerResult describeStreamConsumerResult = new DescribeStreamConsumerResult(); 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 describeStreamConsumerResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("ConsumerDescription", targetDepth)) { context.nextToken(); describeStreamConsumerResult.setConsumerDescription(ConsumerDescriptionJsonUnmarshaller.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 describeStreamConsumerResult; }
/** * <p> * An object that represents the details of the consumer. * </p> * * @param consumerDescription * An object that represents the details of the consumer. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStreamConsumerResult withConsumerDescription(ConsumerDescription consumerDescription) { setConsumerDescription(consumerDescription); return this; }
public DescribeStreamConsumerResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeStreamConsumerResult describeStreamConsumerResult = new DescribeStreamConsumerResult(); 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 describeStreamConsumerResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("ConsumerDescription", targetDepth)) { context.nextToken(); describeStreamConsumerResult.setConsumerDescription(ConsumerDescriptionJsonUnmarshaller.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 describeStreamConsumerResult; }