From 2095ef5973f3c70eb4c13a1e578a669516a1b229 Mon Sep 17 00:00:00 2001 From: adriancole Date: Fri, 22 Mar 2013 15:16:48 -0700 Subject: [PATCH] add ability to reset as opposed to always append to ResourceRecordSet.values --- .../jclouds/route53/domain/ResourceRecordSet.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java b/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java index 6dd9adede7..a8c03489b7 100644 --- a/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java +++ b/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java @@ -342,6 +342,16 @@ public class ResourceRecordSet { return this; } + /** + * replaces current values + * + * @see ResourceRecordSet#getValues() + */ + public Builder values(Iterable values) { + this.values = ImmutableList. 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()); } }