Ejemplo n.º 1
0
 public void MergeFrom(BuildOccurrence other)
 {
     if (other == null)
     {
         return;
     }
     if (other.provenance_ != null)
     {
         if (provenance_ == null)
         {
             Provenance = new global::Grafeas.V1.BuildProvenance();
         }
         Provenance.MergeFrom(other.Provenance);
     }
     if (other.ProvenanceBytes.Length != 0)
     {
         ProvenanceBytes = other.ProvenanceBytes;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
        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);
        }