com.amazonaws.services.ec2.model.Tag.setValue()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(90)

本文整理了Java中com.amazonaws.services.ec2.model.Tag.setValue()方法的一些代码示例,展示了Tag.setValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.setValue()方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Tag
类名称:Tag
方法名:setValue

Tag.setValue介绍

[英]The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
[中]标记的值。
限制:标记值区分大小写,最多可接受255个Unicode字符。

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
 * <p>
 * The value of the tag.
 * </p>
 * <p>
 * Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
 * </p>
 * 
 * @param value
 *        The value of the tag.</p>
 *        <p>
 *        Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Tag withValue(String value) {
  setValue(value);
  return this;
}

代码示例来源:origin: aws/aws-sdk-java

/**
 * 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);
}

代码示例来源:origin: aws/aws-sdk-java

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;
      }
    }
  }
}

代码示例来源:origin: apache/usergrid

t.setValue( runnerNames );
tags.add( t );

代码示例来源:origin: apache/usergrid

t.setValue( instanceNames );
tags.add( t );

代码示例来源:origin: aws-amplify/aws-sdk-android

/**
 * 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);
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * The value of the tag.
 * </p>
 * <p>
 * Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
 * </p>
 * 
 * @param value
 *        The value of the tag.</p>
 *        <p>
 *        Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public Tag withValue(String value) {
  setValue(value);
  return this;
}

代码示例来源:origin: aws-amplify/aws-sdk-android

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;
      }
    }
  }
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

/**
 * 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);
}

代码示例来源:origin: org.kuali.common/kuali-aws

public ImmutableTag(String key, String value) {
  super.setKey(checkNotBlank(key, "key"));
  super.setValue(checkNotBlank(value, "value"));
}

代码示例来源:origin: net.roboconf/roboconf-iaas-ec2

Tag t = new Tag();
t.setKey("Name");
t.setValue(applicationName + "." + rootInstanceName);
tags.add(t);
CreateTagsRequest ctr = new CreateTagsRequest();

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

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;
      }
    }
  }
}

相关文章