@Override public AdminGetDeviceResponse build() { return new AdminGetDeviceResponse(this); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(device()); return hashCode; }
public AdminGetDeviceResponse unmarshall(JsonUnmarshallerContext context) throws Exception { AdminGetDeviceResponse.Builder adminGetDeviceResponseBuilder = AdminGetDeviceResponse.builder(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return adminGetDeviceResponseBuilder.build(); } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Device", targetDepth)) { context.nextToken(); adminGetDeviceResponseBuilder.device(DeviceTypeUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return adminGetDeviceResponseBuilder.build(); }
@Override public AdminGetDeviceResponse build() { return new AdminGetDeviceResponse(this); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(device()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("AdminGetDeviceResponse").add("Device", device()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Device": return Optional.ofNullable(clazz.cast(device())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "Device": return Optional.ofNullable(clazz.cast(device())); default: return Optional.empty(); } }
@Override public String toString() { return ToString.builder("AdminGetDeviceResponse").add("Device", device()).build(); }