public override int GetHashCode() { int hash = 1; if (Type.Length != 0) { hash ^= Type.GetHashCode(); } hash ^= subject_.GetHashCode(); if (PredicateType.Length != 0) { hash ^= PredicateType.GetHashCode(); } if (predicateCase_ == PredicateOneofCase.Provenance) { hash ^= Provenance.GetHashCode(); } if (predicateCase_ == PredicateOneofCase.SlsaProvenance) { hash ^= SlsaProvenance.GetHashCode(); } hash ^= (int)predicateCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(InTotoStatement other) { if (other == null) { return; } if (other.Type.Length != 0) { Type = other.Type; } subject_.Add(other.subject_); if (other.PredicateType.Length != 0) { PredicateType = other.PredicateType; } switch (other.PredicateCase) { case PredicateOneofCase.Provenance: if (Provenance == null) { Provenance = new global::Grafeas.V1.InTotoProvenance(); } Provenance.MergeFrom(other.Provenance); break; case PredicateOneofCase.SlsaProvenance: if (SlsaProvenance == null) { SlsaProvenance = new global::Grafeas.V1.SlsaProvenance(); } SlsaProvenance.MergeFrom(other.SlsaProvenance); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }