/** * Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. */ public Tag(String key) { setKey(key); }
/** * <p> * The key of the tag. * </p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with * <code>aws:</code>. * </p> * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public Tag withKey(String key) { setKey(key); return this; }
/** * Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. * @param value * The value of the tag. * </p> * <p> * Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters. */ public Tag(String key, String value) { setKey(key); setValue(value); }
/** * Constructs a new Tag object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param key The key of the tag. <p>Constraints: Tag keys are * case-sensitive and accept a maximum of 127 Unicode characters. May not * begin with <code>aws:</code> */ public Tag(String key) { setKey(key); }
public Tag unmarshall(StaxUnmarshallerContext context) throws Exception { Tag tag = new Tag(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return tag; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("key", targetDepth)) { tag.setKey(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("value", targetDepth)) { tag.setValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return tag; } } } }
t.setKey( "Name" ); t.setValue( runnerNames ); tags.add( t );
t.setKey( "Name" ); t.setValue( instanceNames ); tags.add( t );
/** * Constructs a new Tag object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param key The key of the tag. <p>Constraints: Tag keys are * case-sensitive and accept a maximum of 127 Unicode characters. May not * begin with <code>aws:</code> * @param value The value of the tag. <p>Constraints: Tag values are * case-sensitive and accept a maximum of 255 Unicode characters. */ public Tag(String key, String value) { setKey(key); setValue(value); }
/** * Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. */ public Tag(String key) { setKey(key); }
/** * <p> * The key of the tag. * </p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with * <code>aws:</code>. * </p> * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public Tag withKey(String key) { setKey(key); return this; }
public Tag unmarshall(StaxUnmarshallerContext context) throws Exception { Tag tag = new Tag(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return tag; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("key", targetDepth)) { tag.setKey(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("value", targetDepth)) { tag.setValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return tag; } } } }
/** * Constructs a new Tag object. Callers should use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param key * The key of the tag.</p> * <p> * Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin * with <code>aws:</code>. * @param value * The value of the tag. * </p> * <p> * Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters. */ public Tag(String key, String value) { setKey(key); setValue(value); }
public ImmutableTag(String key, String value) { super.setKey(checkNotBlank(key, "key")); super.setValue(checkNotBlank(value, "value")); }
t.setKey("Name"); t.setValue(applicationName + "." + rootInstanceName); tags.add(t);
public Tag unmarshall(StaxUnmarshallerContext context) throws Exception { Tag tag = new Tag(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return tag; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("key", targetDepth)) { tag.setKey(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("value", targetDepth)) { tag.setValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return tag; } } } }