public void MergeFrom(FaultRateLimit other) { if (other == null) { return; } if (other.percentage_ != null) { if (percentage_ == null) { Percentage = new global::Envoy.Type.FractionalPercent(); } Percentage.MergeFrom(other.Percentage); } switch (other.LimitTypeCase) { case LimitTypeOneofCase.FixedLimit: if (FixedLimit == null) { FixedLimit = new global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.FixedLimit(); } FixedLimit.MergeFrom(other.FixedLimit); break; case LimitTypeOneofCase.HeaderLimit: if (HeaderLimit == null) { HeaderLimit = new global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.HeaderLimit(); } HeaderLimit.MergeFrom(other.HeaderLimit); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.FixedLimit subBuilder = new global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.FixedLimit(); if (limitTypeCase_ == LimitTypeOneofCase.FixedLimit) { subBuilder.MergeFrom(FixedLimit); } input.ReadMessage(subBuilder); FixedLimit = subBuilder; break; } case 18: { if (percentage_ == null) { Percentage = new global::Envoy.Type.FractionalPercent(); } input.ReadMessage(Percentage); break; } case 26: { global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.HeaderLimit subBuilder = new global::Envoy.Config.Filter.Fault.V2.FaultRateLimit.Types.HeaderLimit(); if (limitTypeCase_ == LimitTypeOneofCase.HeaderLimit) { subBuilder.MergeFrom(HeaderLimit); } input.ReadMessage(subBuilder); HeaderLimit = subBuilder; break; } } } }