Esempio n. 1
0
        public void MergeFrom(Predicate other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.PredicateCase)
            {
            case PredicateOneofCase.AndPredicate:
                if (AndPredicate == null)
                {
                    AndPredicate = new global::Yandex.Cloud.Serverless.Triggers.V1.AndPredicate();
                }
                AndPredicate.MergeFrom(other.AndPredicate);
                break;

            case PredicateOneofCase.FieldValuePredicate:
                if (FieldValuePredicate == null)
                {
                    FieldValuePredicate = new global::Yandex.Cloud.Serverless.Triggers.V1.FieldValuePredicate();
                }
                FieldValuePredicate.MergeFrom(other.FieldValuePredicate);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Esempio n. 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (predicateCase_ == PredicateOneofCase.AndPredicate)
            {
                hash ^= AndPredicate.GetHashCode();
            }
            if (predicateCase_ == PredicateOneofCase.FieldValuePredicate)
            {
                hash ^= FieldValuePredicate.GetHashCode();
            }
            hash ^= (int)predicateCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }