/** * <p> * The URL of the queue. * </p> * * @param queueUrl * The URL of the queue. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueueUrlResult withQueueUrl(String queueUrl) { setQueueUrl(queueUrl); return this; }
public GetQueueUrlResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetQueueUrlResult getQueueUrlResult = new GetQueueUrlResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getQueueUrlResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("QueueUrl", targetDepth)) { getQueueUrlResult.setQueueUrl(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getQueueUrlResult; } } } }
/** * <p> * The URL of the queue. * </p> * * @param queueUrl * The URL of the queue. * @return Returns a reference to this object so that method calls can be chained together. */ public GetQueueUrlResult withQueueUrl(String queueUrl) { setQueueUrl(queueUrl); return this; }
public GetQueueUrlResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetQueueUrlResult getQueueUrlResult = new GetQueueUrlResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("QueueUrl", targetDepth)) { getQueueUrlResult.setQueueUrl(StringStaxUnmarshaller.getInstance().unmarshall( context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return getQueueUrlResult; }
public GetQueueUrlResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetQueueUrlResult getQueueUrlResult = new GetQueueUrlResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getQueueUrlResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("QueueUrl", targetDepth)) { getQueueUrlResult.setQueueUrl(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getQueueUrlResult; } } } }
@Bean public AmazonSQSAsync amazonSqs() { AmazonSQSAsync amazonSqs = mock(AmazonSQSAsync.class); willAnswer(invocation -> { GetQueueUrlRequest getQueueUrlRequest = (GetQueueUrlRequest) invocation.getArguments()[0]; GetQueueUrlResult queueUrl = new GetQueueUrlResult(); queueUrl.setQueueUrl("http://queue-url.com/" + getQueueUrlRequest.getQueueName()); return queueUrl; }) .given(amazonSqs) .getQueueUrl(any(GetQueueUrlRequest.class)); willAnswer(invocation -> { CreateQueueRequest createQueueRequest = (CreateQueueRequest) invocation.getArguments()[0]; CreateQueueResult queueUrl = new CreateQueueResult(); queueUrl.setQueueUrl("http://queue-url.com/" + createQueueRequest.getQueueName()); return queueUrl; }) .given(amazonSqs) .createQueue(any(CreateQueueRequest.class)); return amazonSqs; }
public GetQueueUrlResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetQueueUrlResult getQueueUrlResult = new GetQueueUrlResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("QueueUrl", targetDepth)) { getQueueUrlResult.setQueueUrl(StringStaxUnmarshaller.getInstance().unmarshall( context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return getQueueUrlResult; }