/** * <p> * For the CloudWatch alarm that you want Route 53 health checkers to use to determine whether this health check is * healthy, the region that the alarm was created in. * </p> * <p> * For the current list of CloudWatch regions, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region">Amazon CloudWatch</a> in the <i>AWS * Regions and Endpoints</i> chapter of the <i>Amazon Web Services General Reference</i>. * </p> * * @param region * For the CloudWatch alarm that you want Route 53 health checkers to use to determine whether this health * check is healthy, the region that the alarm was created in.</p> * <p> * For the current list of CloudWatch regions, see <a * href="http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region">Amazon CloudWatch</a> in the * <i>AWS Regions and Endpoints</i> chapter of the <i>Amazon Web Services General Reference</i>. * @return Returns a reference to this object so that method calls can be chained together. * @see CloudWatchRegion */ public AlarmIdentifier withRegion(String region) { setRegion(region); return this; }
public AlarmIdentifier unmarshall(StaxUnmarshallerContext context) throws Exception { AlarmIdentifier alarmIdentifier = new AlarmIdentifier(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return alarmIdentifier; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Region", targetDepth)) { alarmIdentifier.setRegion(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Name", targetDepth)) { alarmIdentifier.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return alarmIdentifier; } } } }