Method With
With(Optional<string>, Optional<TimeSpan>, Optional<EndPoint>, Optional<bool>, Optional<ElectionId>, Optional<Exception>, Optional<TimeSpan>, Optional<DateTime?>, Optional<DateTime>, Optional<DateTime?>, Optional<TimeSpan?>, Optional<int>, Optional<int>, Optional<int>, Optional<int>, Optional<ReplicaSetConfig>, Optional<ServerState>, Optional<TagSet>, Optional<TopologyVersion>, Optional<ServerType>, Optional<SemanticVersion>, Optional<Range<int>>)
Returns a new instance of ServerDescription with some values changed.
public ServerDescription With(Optional<string> reasonChanged = default, Optional<TimeSpan> averageRoundTripTime = default, Optional<EndPoint> canonicalEndPoint = default, Optional<bool> helloOk = default, Optional<ElectionId> electionId = default, Optional<Exception> heartbeatException = default, Optional<TimeSpan> heartbeatInterval = default, Optional<DateTime?> lastHeartbeatTimestamp = default, Optional<DateTime> lastUpdateTimestamp = default, Optional<DateTime?> lastWriteTimestamp = default, Optional<TimeSpan?> logicalSessionTimeout = default, Optional<int> maxBatchCount = default, Optional<int> maxDocumentSize = default, Optional<int> maxMessageSize = default, Optional<int> maxWireDocumentSize = default, Optional<ReplicaSetConfig> replicaSetConfig = default, Optional<ServerState> state = default, Optional<TagSet> tags = default, Optional<TopologyVersion> topologyVersion = default, Optional<ServerType> type = default, Optional<SemanticVersion> version = default, Optional<Range<int>> wireVersionRange = default)Parameters
- reasonChangedOptional<string>
- The reason the server description changed. 
- averageRoundTripTimeOptional<TimeSpan>
- The average round trip time. 
- canonicalEndPointOptional<EndPoint>
- The canonical end point. 
- helloOkOptional<bool>
- Whether the server supports the hello command. 
- electionIdOptional<ElectionId>
- The election identifier. 
- heartbeatExceptionOptional<Exception>
- The heartbeat exception. 
- heartbeatIntervalOptional<TimeSpan>
- The heartbeat interval. 
- lastHeartbeatTimestampOptional<DateTime?>
- The last heartbeat timestamp. 
- lastUpdateTimestampOptional<DateTime>
- The last update timestamp. 
- lastWriteTimestampOptional<DateTime?>
- The last write timestamp. 
- logicalSessionTimeoutOptional<TimeSpan?>
- The logical session timeout. 
- maxBatchCountOptional<int>
- The maximum batch count. 
- maxDocumentSizeOptional<int>
- The maximum size of a document. 
- maxMessageSizeOptional<int>
- The maximum size of a message. 
- maxWireDocumentSizeOptional<int>
- The maximum size of a wire document. 
- replicaSetConfigOptional<ReplicaSetConfig>
- The replica set configuration. 
- stateOptional<ServerState>
- The server state. 
- tagsOptional<TagSet>
- The replica set tags. 
- topologyVersionOptional<TopologyVersion>
- The topology version. 
- typeOptional<ServerType>
- The server type. 
- versionOptional<SemanticVersion>
- The server version. 
- wireVersionRangeOptional<Range<int>>
- The wire version range. 
Returns
- ServerDescription
- A new instance of ServerDescription.