public static DateAndTime getDefaultInstance(String defaultValue) { return new DateAndTime(defaultValue); }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_initiate == null) ? 0 : _initiate.hashCode()); result = prime * result + ((_terminate == null) ? 0 : _terminate.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
@ConstructorProperties("value") public DateAndTime(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
return false; } else if(!_eventTime.equals(other.getEventTime())) { return false;
@XmlElement(name = "login-time") public String getLoginTime() { return managementSession.getLoginTime().getValue(); }
public static DateAndTime getDefaultInstance(String defaultValue) { return new DateAndTime(defaultValue); }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_eventTime == null) ? 0 : _eventTime.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
return false; } else if(!_replayLogCreationTime.equals(other.getReplayLogCreationTime())) { return false;
@ConstructorProperties("value") public DateAndTime(String _value) { if (_value != null) { check_valueLength(_value); } Objects.requireNonNull(_value, "Supplied value may not be null"); CodeHelpers.checkPattern(_value, patterns, regexes); this._value = _value; }
public static DateAndTime getDefaultInstance(String defaultValue) { return new DateAndTime(defaultValue); }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_description == null) ? 0 : _description.hashCode()); result = prime * result + ((_key == null) ? 0 : _key.hashCode()); result = prime * result + ((_name == null) ? 0 : _name.hashCode()); result = prime * result + ((_replayLogCreationTime == null) ? 0 : _replayLogCreationTime.hashCode()); result = prime * result + ((_events == null) ? 0 : _events.hashCode()); result = prime * result + ((_replaySupport == null) ? 0 : _replaySupport.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
return false; } else if(!_lastChange.equals(other.getLastChange())) { return false;
public static DateAndTime getDefaultInstance(String defaultValue) { return new DateAndTime(defaultValue); }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_adminStatus == null) ? 0 : _adminStatus.hashCode()); result = prime * result + ((_higherLayerIf == null) ? 0 : _higherLayerIf.hashCode()); result = prime * result + ((_ifIndex == null) ? 0 : _ifIndex.hashCode()); result = prime * result + ((_key == null) ? 0 : _key.hashCode()); result = prime * result + ((_lastChange == null) ? 0 : _lastChange.hashCode()); result = prime * result + ((_lowerLayerIf == null) ? 0 : _lowerLayerIf.hashCode()); result = prime * result + ((_name == null) ? 0 : _name.hashCode()); result = prime * result + ((_operStatus == null) ? 0 : _operStatus.hashCode()); result = prime * result + ((_physAddress == null) ? 0 : _physAddress.hashCode()); result = prime * result + ((_speed == null) ? 0 : _speed.hashCode()); result = prime * result + ((_statistics == null) ? 0 : _statistics.hashCode()); result = prime * result + ((_type == null) ? 0 : _type.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
return false; } else if(!_discontinuityTime.equals(other.getDiscontinuityTime())) { return false;
private static DateAndTime createDateTime(Date when) { final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_AND_TIME_FORMAT); return new DateAndTime(simpleDateFormat.format(when)); }
@Override public int hashCode() { if (hashValid) { return hash; } final int prime = 31; int result = 1; result = prime * result + ((_discontinuityTime == null) ? 0 : _discontinuityTime.hashCode()); result = prime * result + ((_inBroadcastPkts == null) ? 0 : _inBroadcastPkts.hashCode()); result = prime * result + ((_inDiscards == null) ? 0 : _inDiscards.hashCode()); result = prime * result + ((_inErrors == null) ? 0 : _inErrors.hashCode()); result = prime * result + ((_inMulticastPkts == null) ? 0 : _inMulticastPkts.hashCode()); result = prime * result + ((_inOctets == null) ? 0 : _inOctets.hashCode()); result = prime * result + ((_inUnicastPkts == null) ? 0 : _inUnicastPkts.hashCode()); result = prime * result + ((_inUnknownProtos == null) ? 0 : _inUnknownProtos.hashCode()); result = prime * result + ((_outBroadcastPkts == null) ? 0 : _outBroadcastPkts.hashCode()); result = prime * result + ((_outDiscards == null) ? 0 : _outDiscards.hashCode()); result = prime * result + ((_outErrors == null) ? 0 : _outErrors.hashCode()); result = prime * result + ((_outMulticastPkts == null) ? 0 : _outMulticastPkts.hashCode()); result = prime * result + ((_outOctets == null) ? 0 : _outOctets.hashCode()); result = prime * result + ((_outUnicastPkts == null) ? 0 : _outUnicastPkts.hashCode()); result = prime * result + ((augmentation == null) ? 0 : augmentation.hashCode()); hash = result; hashValid = true; return result; }
private DateAndTime getNowTimeStamp() { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); return new DateAndTime(dateFormat.format(new Date())); } }
/** * Invokes create-subscription rpc on mounted device stream. If lastEventTime is provided and stream supports replay, * rpc will be invoked with start time parameter. * @param stream stream * @param lastEventTime last event time * @return rpc result */ CheckedFuture<DOMRpcResult, DOMRpcException> invokeCreateSubscription(final Stream stream, final Optional<Date> lastEventTime) { final CreateSubscriptionInputBuilder inputBuilder = new CreateSubscriptionInputBuilder() .setStream(stream.getName()); if(lastEventTime.isPresent() && stream.isReplaySupport()) { final ZonedDateTime dateTime = lastEventTime.get().toInstant().atZone(ZoneId.systemDefault()); final String formattedDate = DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(dateTime); inputBuilder.setStartTime(new DateAndTime(formattedDate)); } final CreateSubscriptionInput input = inputBuilder.build(); final ContainerNode nnInput = CODEC_REGISTRY.toNormalizedNodeRpcData(input); return rpcService.invokeRpc(CREATE_SUBSCRIPTION, nnInput); }