Пример #1
0
 public void MergeFrom(HTTPFault other)
 {
     if (other == null)
     {
         return;
     }
     if (other.delay_ != null)
     {
         if (delay_ == null)
         {
             delay_ = new global::Envoy.Config.Filter.Fault.V2.FaultDelay();
         }
         Delay.MergeFrom(other.Delay);
     }
     if (other.abort_ != null)
     {
         if (abort_ == null)
         {
             abort_ = new global::Envoy.Config.Filter.Http.Fault.V2.FaultAbort();
         }
         Abort.MergeFrom(other.Abort);
     }
     if (other.UpstreamCluster.Length != 0)
     {
         UpstreamCluster = other.UpstreamCluster;
     }
     headers_.Add(other.headers_);
     downstreamNodes_.Add(other.downstreamNodes_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 public void MergeFrom(HTTPFault other) {
   if (other == null) {
     return;
   }
   if (other.delay_ != null) {
     if (delay_ == null) {
       Delay = new global::Envoy.Config.Filter.Fault.V3Alpha.FaultDelay();
     }
     Delay.MergeFrom(other.Delay);
   }
   if (other.abort_ != null) {
     if (abort_ == null) {
       Abort = new global::Envoy.Config.Filter.Http.Fault.V3Alpha.FaultAbort();
     }
     Abort.MergeFrom(other.Abort);
   }
   if (other.UpstreamCluster.Length != 0) {
     UpstreamCluster = other.UpstreamCluster;
   }
   headers_.Add(other.headers_);
   downstreamNodes_.Add(other.downstreamNodes_);
   if (other.maxActiveFaults_ != null) {
     if (maxActiveFaults_ == null || other.MaxActiveFaults != 0) {
       MaxActiveFaults = other.MaxActiveFaults;
     }
   }
   if (other.responseRateLimit_ != null) {
     if (responseRateLimit_ == null) {
       ResponseRateLimit = new global::Envoy.Config.Filter.Fault.V3Alpha.FaultRateLimit();
     }
     ResponseRateLimit.MergeFrom(other.ResponseRateLimit);
   }
   if (other.DelayPercentRuntime.Length != 0) {
     DelayPercentRuntime = other.DelayPercentRuntime;
   }
   if (other.AbortPercentRuntime.Length != 0) {
     AbortPercentRuntime = other.AbortPercentRuntime;
   }
   if (other.DelayDurationRuntime.Length != 0) {
     DelayDurationRuntime = other.DelayDurationRuntime;
   }
   if (other.AbortHttpStatusRuntime.Length != 0) {
     AbortHttpStatusRuntime = other.AbortHttpStatusRuntime;
   }
   if (other.MaxActiveFaultsRuntime.Length != 0) {
     MaxActiveFaultsRuntime = other.MaxActiveFaultsRuntime;
   }
   if (other.ResponseRateLimitPercentRuntime.Length != 0) {
     ResponseRateLimitPercentRuntime = other.ResponseRateLimitPercentRuntime;
   }
   _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }