/** * <p> * If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property * causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or * <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the * update behavior for that <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html" * >property</a> in the AWS CloudFormation User Guide. * </p> * * @param requiresRecreation * If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this * property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or * <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see * the update behavior for that <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html" * >property</a> in the AWS CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see RequiresRecreation */ public ResourceTargetDefinition withRequiresRecreation(String requiresRecreation) { setRequiresRecreation(requiresRecreation); return this; }
public ResourceTargetDefinition unmarshall(StaxUnmarshallerContext context) throws Exception { ResourceTargetDefinition resourceTargetDefinition = new ResourceTargetDefinition(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return resourceTargetDefinition; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Attribute", targetDepth)) { resourceTargetDefinition.setAttribute(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Name", targetDepth)) { resourceTargetDefinition.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("RequiresRecreation", targetDepth)) { resourceTargetDefinition.setRequiresRecreation(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return resourceTargetDefinition; } } } }
/** * <p> * If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this property * causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or * <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see the * update behavior for that <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html" * >property</a> in the AWS CloudFormation User Guide. * </p> * * @param requiresRecreation * If the <code>Attribute</code> value is <code>Properties</code>, indicates whether a change to this * property causes the resource to be recreated. The value can be <code>Never</code>, <code>Always</code>, or * <code>Conditionally</code>. To determine the conditions for a <code>Conditionally</code> recreation, see * the update behavior for that <a * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html" * >property</a> in the AWS CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see RequiresRecreation */ public ResourceTargetDefinition withRequiresRecreation(String requiresRecreation) { setRequiresRecreation(requiresRecreation); return this; }
public ResourceTargetDefinition unmarshall(StaxUnmarshallerContext context) throws Exception { ResourceTargetDefinition resourceTargetDefinition = new ResourceTargetDefinition(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return resourceTargetDefinition; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Attribute", targetDepth)) { resourceTargetDefinition.setAttribute(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Name", targetDepth)) { resourceTargetDefinition.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("RequiresRecreation", targetDepth)) { resourceTargetDefinition.setRequiresRecreation(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return resourceTargetDefinition; } } } }