add ability to reset as opposed to always append to ResourceRecordSet.values

This commit is contained in:
adriancole 2013-03-22 15:16:48 -07:00
parent 4441422df8
commit 9e9e0b6ce5
1 changed files with 11 additions and 1 deletions

View File

@ -342,6 +342,16 @@ public class ResourceRecordSet {
return this;
}
/**
* replaces current values
*
* @see ResourceRecordSet#getValues()
*/
public Builder values(Iterable<String> values) {
this.values = ImmutableList.<String> builder().addAll(values);
return this;
}
/**
* @see ResourceRecordSet#getValues()
*/
@ -385,7 +395,7 @@ public class ResourceRecordSet {
} else if (in instanceof Latency) {
region(Latency.class.cast(in).region);
}
return this.name(in.name).type(in.type).ttl(in.ttl.orNull()).addAll(in.values)
return this.name(in.name).type(in.type).ttl(in.ttl.orNull()).values(in.values)
.aliasTarget(in.aliasTarget.orNull());
}
}