public void MergeFrom(Candidate other) { if (other == null) { return; } if (other.Value.Length != 0) { Value = other.Value; } if (other.Text.Length != 0) { Text = other.Text; } if (other.confidence_ != null) { if (confidence_ == null) { Confidence = new global::Ssn.Type.Confidence(); } Confidence.MergeFrom(other.Confidence); } if (other.boundingBox_ != null) { if (boundingBox_ == null) { BoundingBox = new global::Ssn.Type.BoundingPoly(); } BoundingBox.MergeFrom(other.BoundingBox); } if (other.Type != global::Ssn.Type.Candidate.Types.Type.Unknown) { Type = other.Type; } if (other.PageRef != 0) { PageRef = other.PageRef; } if (other.modelMetadata_ != null) { if (modelMetadata_ == null) { ModelMetadata = new global::Ssn.Type.ModelSpec(); } ModelMetadata.MergeFrom(other.ModelMetadata); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Value.Length != 0) { hash ^= Value.GetHashCode(); } if (Text.Length != 0) { hash ^= Text.GetHashCode(); } if (confidence_ != null) { hash ^= Confidence.GetHashCode(); } if (boundingBox_ != null) { hash ^= BoundingBox.GetHashCode(); } if (Type != global::Ssn.Type.Candidate.Types.Type.Unknown) { hash ^= Type.GetHashCode(); } if (PageRef != 0) { hash ^= PageRef.GetHashCode(); } if (modelMetadata_ != null) { hash ^= ModelMetadata.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }