@Override public DeviceType build() { return new DeviceType(this); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(deviceKey()); hashCode = 31 * hashCode + Objects.hashCode(deviceAttributes()); hashCode = 31 * hashCode + Objects.hashCode(deviceCreateDate()); hashCode = 31 * hashCode + Objects.hashCode(deviceLastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(deviceLastAuthenticatedDate()); return hashCode; }
public final DeviceType.Builder getDevice() { return device != null ? device.toBuilder() : null; }
@Override @SafeVarargs public final Builder devices(Consumer<DeviceType.Builder>... devices) { devices(Stream.of(devices).map(c -> DeviceType.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; }
@Override @SafeVarargs public final Builder devices(Consumer<DeviceType.Builder>... devices) { devices(Stream.of(devices).map(c -> DeviceType.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(deviceKey()); hashCode = 31 * hashCode + Objects.hashCode(deviceAttributes()); hashCode = 31 * hashCode + Objects.hashCode(deviceCreateDate()); hashCode = 31 * hashCode + Objects.hashCode(deviceLastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(deviceLastAuthenticatedDate()); return hashCode; }
@Override @SafeVarargs public final Builder devices(Consumer<DeviceType.Builder>... devices) { devices(Stream.of(devices).map(c -> DeviceType.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; }
public final DeviceType.Builder getDevice() { return device != null ? device.toBuilder() : null; }
@Override public DeviceType build() { return new DeviceType(this); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DeviceType)) { return false; } DeviceType other = (DeviceType) obj; return Objects.equals(deviceKey(), other.deviceKey()) && Objects.equals(deviceAttributes(), other.deviceAttributes()) && Objects.equals(deviceCreateDate(), other.deviceCreateDate()) && Objects.equals(deviceLastModifiedDate(), other.deviceLastModifiedDate()) && Objects.equals(deviceLastAuthenticatedDate(), other.deviceLastAuthenticatedDate()); }
@Override @SafeVarargs public final Builder devices(Consumer<DeviceType.Builder>... devices) { devices(Stream.of(devices).map(c -> DeviceType.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; }
public final DeviceType.Builder getDevice() { return device != null ? device.toBuilder() : null; }
/** * 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("DeviceType").add("DeviceKey", deviceKey()).add("DeviceAttributes", deviceAttributes()) .add("DeviceCreateDate", deviceCreateDate()).add("DeviceLastModifiedDate", deviceLastModifiedDate()) .add("DeviceLastAuthenticatedDate", deviceLastAuthenticatedDate()).build(); }
/** * <p> * The device. * </p> * This is a convenience that creates an instance of the {@link DeviceType.Builder} avoiding the need to create * one manually via {@link DeviceType#builder()}. * * When the {@link Consumer} completes, {@link DeviceType.Builder#build()} is called immediately and its result * is passed to {@link #device(DeviceType)}. * * @param device * a consumer that will call methods on {@link DeviceType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #device(DeviceType) */ default Builder device(Consumer<DeviceType.Builder> device) { return device(DeviceType.builder().applyMutation(device).build()); } }
public final DeviceType.Builder getDevice() { return device != null ? device.toBuilder() : null; }
@Override public String toString() { return ToString.builder("DeviceType").add("DeviceKey", deviceKey()).add("DeviceAttributes", deviceAttributes()) .add("DeviceCreateDate", deviceCreateDate()).add("DeviceLastModifiedDate", deviceLastModifiedDate()) .add("DeviceLastAuthenticatedDate", deviceLastAuthenticatedDate()).build(); }
/** * <p> * The device. * </p> * This is a convenience that creates an instance of the {@link DeviceType.Builder} avoiding the need to create * one manually via {@link DeviceType#builder()}. * * When the {@link Consumer} completes, {@link DeviceType.Builder#build()} is called immediately and its result * is passed to {@link #device(DeviceType)}. * * @param device * a consumer that will call methods on {@link DeviceType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #device(DeviceType) */ default Builder device(Consumer<DeviceType.Builder> device) { return device(DeviceType.builder().applyMutation(device).build()); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DeviceType)) { return false; } DeviceType other = (DeviceType) obj; return Objects.equals(deviceKey(), other.deviceKey()) && Objects.equals(deviceAttributes(), other.deviceAttributes()) && Objects.equals(deviceCreateDate(), other.deviceCreateDate()) && Objects.equals(deviceLastModifiedDate(), other.deviceLastModifiedDate()) && Objects.equals(deviceLastAuthenticatedDate(), other.deviceLastAuthenticatedDate()); }
/** * <p> * The device. * </p> * This is a convenience that creates an instance of the {@link DeviceType.Builder} avoiding the need to create * one manually via {@link DeviceType#builder()}. * * When the {@link Consumer} completes, {@link DeviceType.Builder#build()} is called immediately and its result * is passed to {@link #device(DeviceType)}. * * @param device * a consumer that will call methods on {@link DeviceType.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #device(DeviceType) */ default Builder device(Consumer<DeviceType.Builder> device) { return device(DeviceType.builder().applyMutation(device).build()); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "DeviceKey": return Optional.ofNullable(clazz.cast(deviceKey())); case "DeviceAttributes": return Optional.ofNullable(clazz.cast(deviceAttributes())); case "DeviceCreateDate": return Optional.ofNullable(clazz.cast(deviceCreateDate())); case "DeviceLastModifiedDate": return Optional.ofNullable(clazz.cast(deviceLastModifiedDate())); case "DeviceLastAuthenticatedDate": return Optional.ofNullable(clazz.cast(deviceLastAuthenticatedDate())); default: return Optional.empty(); } }