Exemplo 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);
        }
Exemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 18: {
                    global::Yandex.Cloud.Serverless.Triggers.V1.AndPredicate subBuilder = new global::Yandex.Cloud.Serverless.Triggers.V1.AndPredicate();
                    if (predicateCase_ == PredicateOneofCase.AndPredicate)
                    {
                        subBuilder.MergeFrom(AndPredicate);
                    }
                    input.ReadMessage(subBuilder);
                    AndPredicate = subBuilder;
                    break;
                }

                case 34: {
                    global::Yandex.Cloud.Serverless.Triggers.V1.FieldValuePredicate subBuilder = new global::Yandex.Cloud.Serverless.Triggers.V1.FieldValuePredicate();
                    if (predicateCase_ == PredicateOneofCase.FieldValuePredicate)
                    {
                        subBuilder.MergeFrom(FieldValuePredicate);
                    }
                    input.ReadMessage(subBuilder);
                    FieldValuePredicate = subBuilder;
                    break;
                }
                }
            }
        }