diff --git a/src/main/java/io/vinyldns/java/VinylDNSClient.java b/src/main/java/io/vinyldns/java/VinylDNSClient.java
index 6f8ab16..f8b3317 100644
--- a/src/main/java/io/vinyldns/java/VinylDNSClient.java
+++ b/src/main/java/io/vinyldns/java/VinylDNSClient.java
@@ -1,14 +1,16 @@
-/**
+/*
* Copyright 2018 Comcast Cable Communications Management, LLC
*
- *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- *
http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- *
Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.vinyldns.java;
@@ -87,7 +89,7 @@ public interface VinylDNSClient {
* Retrieves up to 100 (default) zone changes sorted by most recent. This call will return a
* subset of the full information in each change, as detailed in the attributes section.
*
- * @param request See {@link ListZoneChangesRequest ListBatchChangesRequest Model}
+ * @param request See {@link ListZoneChangesRequest ListZoneChangesRequest Model}
* @return {@link VinylDNSSuccessResponse VinylDNSSuccessResponse<ListZoneChangesResponse>}
* in case of success and {@link VinylDNSFailureResponse
* VinylDNSFailureResponse<ListZoneChangesResponse>} in case of failure
@@ -364,11 +366,21 @@ VinylDNSResponse listRecordSetChanges(
* minimum of two alpha-numeric characters is required.
*
* @param request See {@link SearchRecordSetsRequest SearchRecordSetsRequest Model}
- * @return {@link VinylDNSSuccessResponse
- * VinylDNSSuccessResponse<SearchRecordSetsResponse>} in case of success and {@link
- * VinylDNSFailureResponse VinylDNSFailureResponse<SearchRecordSetsResponse>} in case
- * of failure
+ * @return {@link VinylDNSSuccessResponse VinylDNSSuccessResponse<SearchRecordSetsResponse>}
+ * in case of success and {@link VinylDNSFailureResponse
+ * VinylDNSFailureResponse<SearchRecordSetsResponse>} in case of failure
+ */
+ VinylDNSResponse searchRecordSets(SearchRecordSetsRequest request);
+
+ /**
+ * Retrieves up to 100 (default) abandoned zones sorted by most recent. This call will return a
+ * subset of the full information in each change, as detailed in the attributes section.
+ *
+ * @param request See {@link ListAbandonedZonesRequest ListAbandonedZonesRequest Model}
+ * @return {@link VinylDNSSuccessResponse VinylDNSSuccessResponse<ListAbandonedZonesResponse>}
+ * in case of success and {@link VinylDNSFailureResponse
+ * VinylDNSFailureResponse<ListAbandonedZonesResponse>} in case of failure
*/
- VinylDNSResponse searchRecordSets(
- SearchRecordSetsRequest request);
+ VinylDNSResponse listAbandonedZones(
+ ListAbandonedZonesRequest request);
}
diff --git a/src/main/java/io/vinyldns/java/VinylDNSClientImpl.java b/src/main/java/io/vinyldns/java/VinylDNSClientImpl.java
index db1d648..2958aa5 100644
--- a/src/main/java/io/vinyldns/java/VinylDNSClientImpl.java
+++ b/src/main/java/io/vinyldns/java/VinylDNSClientImpl.java
@@ -1,14 +1,16 @@
-/**
+/*
* Copyright 2018 Comcast Cable Communications Management, LLC
*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- *
http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- *
Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.vinyldns.java;
@@ -135,6 +137,29 @@ public VinylDNSResponse listZoneChanges(ListZoneChanges
return executeRequest(vinylDNSRequest, ListZoneChangesResponse.class);
}
+ @Override
+ public VinylDNSResponse listAbandonedZones(
+ ListAbandonedZonesRequest request) {
+ String path = "zones/deleted/changes";
+
+ VinylDNSRequest vinylDNSRequest =
+ new VinylDNSRequest<>(Methods.GET.name(), getBaseUrl(), path, null);
+
+ if (request.getNameFilter() != null) {
+ vinylDNSRequest.addParameter("nameFilter", request.getNameFilter());
+ }
+
+ if (request.getStartFrom() != null) {
+ vinylDNSRequest.addParameter("startFrom", request.getStartFrom());
+ }
+
+ if (request.getMaxItems() != null) {
+ vinylDNSRequest.addParameter("maxItems", request.getMaxItems().toString());
+ }
+
+ return executeRequest(vinylDNSRequest, ListAbandonedZonesResponse.class);
+ }
+
@Override
public VinylDNSResponse syncZone(ZoneRequest request) {
String path = "zones/" + request.getZoneId() + "/sync";
@@ -410,11 +435,11 @@ public VinylDNSResponse cancelBatchChanges(String id) {
@Override
public VinylDNSResponse searchRecordSets(
- SearchRecordSetsRequest request) {
+ SearchRecordSetsRequest request) {
String path = "recordsets";
VinylDNSRequest vinylDNSRequest =
- new VinylDNSRequest<>(Methods.GET.name(), getBaseUrl(), path, null);
+ new VinylDNSRequest<>(Methods.GET.name(), getBaseUrl(), path, null);
if (request.getStartFrom() != null) {
vinylDNSRequest.addParameter("startFrom", request.getStartFrom());
@@ -429,12 +454,11 @@ public VinylDNSResponse searchRecordSets(
}
if (request.getNameSort() != null) {
- vinylDNSRequest.addParameter( "nameSort", request.getNameSort().name());
+ vinylDNSRequest.addParameter("nameSort", request.getNameSort().name());
}
if (request.getRecordOwnerGroupFilter() != null) {
- vinylDNSRequest.addParameter( "recordOwnerGroupFilter",
- request.getRecordOwnerGroupFilter());
+ vinylDNSRequest.addParameter("recordOwnerGroupFilter", request.getRecordOwnerGroupFilter());
}
return executeRequest(vinylDNSRequest, SearchRecordSetsResponse.class);
diff --git a/src/main/java/io/vinyldns/java/model/zone/AbandonedZoneChangeResponse.java b/src/main/java/io/vinyldns/java/model/zone/AbandonedZoneChangeResponse.java
new file mode 100644
index 0000000..aeb4a17
--- /dev/null
+++ b/src/main/java/io/vinyldns/java/model/zone/AbandonedZoneChangeResponse.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2018 Comcast Cable Communications Management, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.vinyldns.java.model.zone;
+
+import java.util.Objects;
+
+public class AbandonedZoneChangeResponse {
+ private final ZoneResponse zoneChange;
+ private final String adminGroupName;
+ private final String userName;
+ private final Boolean accessLevel;
+
+ public AbandonedZoneChangeResponse(
+ ZoneResponse zoneChange, String adminGroupName, String userName, Boolean accessLevel) {
+ this.zoneChange = zoneChange;
+ this.adminGroupName = adminGroupName;
+ this.userName = userName;
+ this.accessLevel = accessLevel;
+ }
+
+ public ZoneResponse getZoneChange() {
+ return zoneChange;
+ }
+
+ public String getAdminGroupName() {
+ return adminGroupName;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public Boolean getAccessLevel() {
+ return accessLevel;
+ }
+
+ @Override
+ public String toString() {
+ return "zoneChange{"
+ + "zoneChange="
+ + zoneChange
+ + ", adminGroupName='"
+ + adminGroupName
+ + '\''
+ + ", userName="
+ + userName
+ + ", accessLevel="
+ + accessLevel
+ + '\''
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof AbandonedZoneChangeResponse)) return false;
+ AbandonedZoneChangeResponse that = (AbandonedZoneChangeResponse) o;
+ return Objects.equals(getZoneChange(), that.getZoneChange())
+ && Objects.equals(getAdminGroupName(), that.getAdminGroupName())
+ && getUserName() == that.getUserName()
+ && getAccessLevel() == that.getAccessLevel();
+ }
+
+ @Override
+ public int hashCode() {
+ int result = zoneChange.hashCode();
+ result = 31 * result + (adminGroupName != null ? adminGroupName.hashCode() : 0);
+ result = 31 * result + (userName != null ? userName.hashCode() : 0);
+ result = 31 * result + (accessLevel != null ? accessLevel.hashCode() : 0);
+ return result;
+ }
+}
diff --git a/src/main/java/io/vinyldns/java/model/zone/ListAbandonedZonesResponse.java b/src/main/java/io/vinyldns/java/model/zone/ListAbandonedZonesResponse.java
new file mode 100644
index 0000000..9aec82a
--- /dev/null
+++ b/src/main/java/io/vinyldns/java/model/zone/ListAbandonedZonesResponse.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2018 Comcast Cable Communications Management, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.vinyldns.java.model.zone;
+
+import java.util.List;
+
+public class ListAbandonedZonesResponse {
+ private final List zonesDeletedInfo;
+
+ /**
+ * (optional) The startFrom parameter that was sent in on the HTTP request. Will not be present if
+ * the startFrom parameter was not sent
+ */
+ private String startFrom;
+
+ /**
+ * (optional) The identifier to be passed in as the startFrom parameter to retrieve the next page
+ * of results. If there are no results left, this field will not be present.
+ */
+ private String nextId;
+
+ /** The maxItems parameter that was sent in on the HTTP request. This will be 100 if not sent. */
+ private final Integer maxItems;
+
+ private Boolean ignoreAccess;
+
+ public ListAbandonedZonesResponse(
+ List zonesDeletedInfo, Integer maxItems) {
+ this.zonesDeletedInfo = zonesDeletedInfo;
+ this.maxItems = maxItems;
+ }
+
+ public ListAbandonedZonesResponse(
+ List zonesDeletedInfo,
+ String startFrom,
+ String nextId,
+ Integer maxItems,
+ Boolean ignoreAccess) {
+ this.zonesDeletedInfo = zonesDeletedInfo;
+ this.startFrom = startFrom;
+ this.nextId = nextId;
+ this.maxItems = maxItems;
+ this.ignoreAccess = ignoreAccess;
+ }
+
+ public List getAbandonedZones() {
+ return zonesDeletedInfo;
+ }
+
+ public String getStartFrom() {
+ return startFrom;
+ }
+
+ public void setStartFrom(String startFrom) {
+ this.startFrom = startFrom;
+ }
+
+ public String getNextId() {
+ return nextId;
+ }
+
+ public Integer getMaxItems() {
+ return maxItems;
+ }
+
+ public Boolean getIgnoreAccess() {
+ return ignoreAccess;
+ }
+
+ @Override
+ public String toString() {
+ return "abandonedZoneChangeResponse{"
+ + "zonesDeletedInfo="
+ + zonesDeletedInfo
+ + ", startFrom='"
+ + startFrom
+ + '\''
+ + ", nextId='"
+ + nextId
+ + '\''
+ + ", maxItems="
+ + maxItems
+ + '\''
+ + ", ignoreAccess="
+ + ignoreAccess
+ + '\''
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ ListAbandonedZonesResponse that = (ListAbandonedZonesResponse) o;
+
+ if (!zonesDeletedInfo.equals(that.zonesDeletedInfo)) return false;
+ if (startFrom != null ? !startFrom.equals(that.startFrom) : that.startFrom != null)
+ return false;
+ if (nextId != null ? !nextId.equals(that.nextId) : that.nextId != null) return false;
+ return maxItems != null ? maxItems.equals(that.maxItems) : that.maxItems == null;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = zonesDeletedInfo.hashCode();
+ result = 31 * result + (startFrom != null ? startFrom.hashCode() : 0);
+ result = 31 * result + (nextId != null ? nextId.hashCode() : 0);
+ result = 31 * result + (maxItems != null ? maxItems.hashCode() : 0);
+ result = 31 * result + (ignoreAccess != null ? ignoreAccess.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/io/vinyldns/java/model/zone/ListAbondonedZonesRequest.java b/src/main/java/io/vinyldns/java/model/zone/ListAbondonedZonesRequest.java
new file mode 100644
index 0000000..a7721b3
--- /dev/null
+++ b/src/main/java/io/vinyldns/java/model/zone/ListAbondonedZonesRequest.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2018 Comcast Cable Communications Management, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * Copyright 2018 Comcast Cable Communications Management, LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *
Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.vinyldns.java.model.zone;
+
+public class ListAbandonedZonesRequest {
+
+ /**
+ * One or more characters contained in the name of the abandoned dzone to search for. For example www-. This
+ * is a contains search only, no wildcards or regular expressions are supported
+ */
+ private String nameFilter;
+
+ /**
+ * In order to advance through pages of results, the startFrom is set to the nextId that is
+ * returned on the previous response. It is up to the client to maintain previous pages if the
+ * client wishes to advance forward and backward. If not specified, will return the first page of
+ * results
+ */
+ private String startFrom;
+
+ /**
+ * The number of items to return in the page. Valid values are 1 to 100. Defaults to 100 if not
+ * provided.
+ */
+ private Integer maxItems;
+
+ private Boolean ignoreAccess;
+
+ public ListAbandonedZonesRequest() {}
+
+ public ListAbandonedZonesRequest(String nameFilter) {
+ this.nameFilter = nameFilter;
+ }
+
+ public ListAbandonedZonesRequest(
+ String nameFilter, String startFrom, Integer maxItems, Boolean ignoreAccess) {
+ this.nameFilter = nameFilter;
+ this.startFrom = startFrom;
+ this.maxItems = maxItems;
+ this.ignoreAccess = ignoreAccess;
+ }
+
+ public String getNameFilter() {
+ return nameFilter;
+ }
+
+ public void setNameFilter(String nameFilter) {
+ this.nameFilter = nameFilter;
+ }
+
+ public String getStartFrom() {
+ return startFrom;
+ }
+
+ public void setStartFrom(String startFrom) {
+ this.startFrom = startFrom;
+ }
+
+ public Integer getMaxItems() {
+ return maxItems;
+ }
+
+ public void setMaxItems(Integer maxItems) {
+ this.maxItems = maxItems;
+ }
+
+ public Boolean getIgnoreAccess() {
+ return ignoreAccess;
+ }
+
+ public void setIgnoreAccess(Boolean ignoreAccess) {
+ this.ignoreAccess = ignoreAccess;
+ }
+
+ @Override
+ public String toString() {
+ return "ListAbandonedZonesRequest{"
+ + "nameFilter='"
+ + nameFilter
+ + '\''
+ + ", startFrom='"
+ + startFrom
+ + '\''
+ + ", maxItems="
+ + maxItems
+ + ", ignoreAccess="
+ + ignoreAccess
+ + '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ ListAbandonedZonesRequest that = (ListAbandonedZonesRequest) o;
+
+ if (nameFilter != null ? !nameFilter.equals(that.nameFilter) : that.nameFilter != null)
+ return false;
+ if (startFrom != null ? !startFrom.equals(that.startFrom) : that.startFrom != null)
+ return false;
+ return maxItems != null ? maxItems.equals(that.maxItems) : that.maxItems == null;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = nameFilter != null ? nameFilter.hashCode() : 0;
+ result = 31 * result + (startFrom != null ? startFrom.hashCode() : 0);
+ result = 31 * result + (maxItems != null ? maxItems.hashCode() : 0);
+ result = 31 * result + (ignoreAccess != null ? ignoreAccess.hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/io/vinyldns/java/VinylDNSClientTest.java b/src/test/java/io/vinyldns/java/VinylDNSClientTest.java
index cb1c0b1..dd00d90 100644
--- a/src/test/java/io/vinyldns/java/VinylDNSClientTest.java
+++ b/src/test/java/io/vinyldns/java/VinylDNSClientTest.java
@@ -1,14 +1,16 @@
-/**
+/*
* Copyright 2018 Comcast Cable Communications Management, LLC
*
- *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- *
http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- *
Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing permissions and
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.vinyldns.java;
@@ -21,7 +23,6 @@
import com.amazonaws.auth.BasicAWSCredentials;
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.matching.EqualToJsonPattern;
-
import io.vinyldns.java.model.Order;
import io.vinyldns.java.model.acl.ACLRule;
import io.vinyldns.java.model.acl.AccessLevel;
@@ -204,6 +205,47 @@ public void getZoneFailure404() {
assertNull(vinylDNSResponse.getValue());
}
+ @Test
+ public void listAbandonedZoneSuccess() {
+ String nameFilter = "someFilter";
+ String startFrom = "someStart";
+ int maxItems = 55;
+ ZoneResponse zoneChange =
+ new ZoneResponse(
+ testZone1,
+ "someUserId",
+ ZoneChangeType.Update,
+ ZoneChangeStatus.Pending,
+ new DateTime(),
+ "",
+ "1234");
+
+ List zonesDeletedInfo =
+ Collections.singletonList(
+ new AbandonedZoneChangeResponse(
+ zoneChange, "someAdminGroupName", "someUserName", true));
+
+ ListAbandonedZonesResponse listAbandonedZonesResponse =
+ new ListAbandonedZonesResponse(zonesDeletedInfo, startFrom, "nextId", maxItems, true);
+ wireMockServer.stubFor(
+ get(urlMatching("/zones/deleted/changes?(.*)"))
+ .withQueryParam("nameFilter", equalTo(nameFilter))
+ .withQueryParam("startFrom", equalTo(startFrom))
+ .withQueryParam("maxItems", equalTo(String.valueOf(maxItems)))
+ .willReturn(
+ aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBody(client.gson.toJson(listAbandonedZonesResponse))));
+
+ VinylDNSResponse vinylDNSResponse =
+ client.listAbandonedZones(
+ new ListAbandonedZonesRequest(nameFilter, startFrom, maxItems, true));
+
+ assertTrue(vinylDNSResponse instanceof ResponseMarker.Success);
+ assertEquals(vinylDNSResponse.getStatusCode(), 200);
+ }
+
@Test
public void getZoneByNameSuccess() {
String response = client.gson.toJson(new GetZoneResponse(testZone1));
@@ -1478,26 +1520,25 @@ public void listRecordSetGlobalSuccess() {
int maxItems = 55;
wireMockServer.stubFor(
- get(urlMatching("/recordsets?(.*)"))
- .withQueryParam("recordNameFilter", equalTo(recordNameFilter))
- .withQueryParam("startFrom", equalTo(startFrom))
- .withQueryParam("maxItems", equalTo(String.valueOf(maxItems)))
- .willReturn(
- aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "application/json")
- .withBody(response)));
+ get(urlMatching("/recordsets?(.*)"))
+ .withQueryParam("recordNameFilter", equalTo(recordNameFilter))
+ .withQueryParam("startFrom", equalTo(startFrom))
+ .withQueryParam("maxItems", equalTo(String.valueOf(maxItems)))
+ .willReturn(
+ aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBody(response)));
VinylDNSResponse vinylDNSResponse =
- client.searchRecordSets(
- new SearchRecordSetsRequest(recordNameFilter, null,
- Order.ASC , startFrom, maxItems));
+ client.searchRecordSets(
+ new SearchRecordSetsRequest(recordNameFilter, null, Order.ASC, startFrom, maxItems));
assertTrue(vinylDNSResponse instanceof ResponseMarker.Success);
assertEquals(vinylDNSResponse.getStatusCode(), 200);
- assertEquals(vinylDNSResponse.getValue().getRecordNameFilter(),
- searchRecordSetsResponse.getRecordNameFilter());
-
+ assertEquals(
+ vinylDNSResponse.getValue().getRecordNameFilter(),
+ searchRecordSetsResponse.getRecordNameFilter());
}
@Test
@@ -1507,20 +1548,19 @@ public void listRecordSetGlobalFailure() {
int maxItems = 55;
wireMockServer.stubFor(
- get(urlMatching("/recordsets?(.*)"))
- .withQueryParam("recordNameFilter", equalTo(recordNameFilter))
- .withQueryParam("startFrom", equalTo(startFrom))
- .withQueryParam("maxItems", equalTo(String.valueOf(maxItems)))
- .willReturn(
- aResponse()
- .withStatus(500)
- .withHeader("Content-Type", "application/json")
- .withBody("server error")));
+ get(urlMatching("/recordsets?(.*)"))
+ .withQueryParam("recordNameFilter", equalTo(recordNameFilter))
+ .withQueryParam("startFrom", equalTo(startFrom))
+ .withQueryParam("maxItems", equalTo(String.valueOf(maxItems)))
+ .willReturn(
+ aResponse()
+ .withStatus(500)
+ .withHeader("Content-Type", "application/json")
+ .withBody("server error")));
VinylDNSResponse vinylDNSResponse =
- client.searchRecordSets(
- new SearchRecordSetsRequest(recordNameFilter, null,
- Order.ASC , startFrom, maxItems));
+ client.searchRecordSets(
+ new SearchRecordSetsRequest(recordNameFilter, null, Order.ASC, startFrom, maxItems));
assertTrue(vinylDNSResponse instanceof ResponseMarker.Failure);
assertEquals(vinylDNSResponse.getStatusCode(), 500);
@@ -1528,7 +1568,6 @@ public void listRecordSetGlobalFailure() {
assertNull(vinylDNSResponse.getValue());
}
-
private String rsId = "recordSetId";
private String zoneId = "zoneId";
private ZoneConnection testZoneConnection1 =
@@ -1741,13 +1780,13 @@ public void listRecordSetGlobalFailure() {
new ListRecordSetChangesResponse(zoneId, recordSetChangeList, "", "startFrom", 1);
private SearchRecordSetsResponse searchRecordSetsResponse =
- new SearchRecordSetsResponse(
- Collections.EMPTY_LIST,
- "startFrom",
- "nextId",
- 55,
- "recordNameFilter",
- Collections.EMPTY_LIST,
- "recordOwnerGroupFilter",
- "nameSort");
+ new SearchRecordSetsResponse(
+ Collections.EMPTY_LIST,
+ "startFrom",
+ "nextId",
+ 55,
+ "recordNameFilter",
+ Collections.EMPTY_LIST,
+ "recordOwnerGroupFilter",
+ "nameSort");
}