示例#1
0
 public void MergeFrom(RBAC other)
 {
     if (other == null)
     {
         return;
     }
     if (other.rules_ != null)
     {
         if (rules_ == null)
         {
             Rules = new global::Envoy.Config.Rbac.V3Alpha.RBAC();
         }
         Rules.MergeFrom(other.Rules);
     }
     if (other.shadowRules_ != null)
     {
         if (shadowRules_ == null)
         {
             ShadowRules = new global::Envoy.Config.Rbac.V3Alpha.RBAC();
         }
         ShadowRules.MergeFrom(other.ShadowRules);
     }
     if (other.StatPrefix.Length != 0)
     {
         StatPrefix = other.StatPrefix;
     }
     if (other.EnforcementType != global::Envoy.Config.Filter.Network.Rbac.V3Alpha.RBAC.Types.EnforcementType.OneTimeOnFirstByte)
     {
         EnforcementType = other.EnforcementType;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (rules_ != null)
            {
                hash ^= Rules.GetHashCode();
            }
            if (shadowRules_ != null)
            {
                hash ^= ShadowRules.GetHashCode();
            }
            if (StatPrefix.Length != 0)
            {
                hash ^= StatPrefix.GetHashCode();
            }
            if (EnforcementType != global::Envoy.Config.Filter.Network.Rbac.V3Alpha.RBAC.Types.EnforcementType.OneTimeOnFirstByte)
            {
                hash ^= EnforcementType.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }