Пример #1
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

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

                case 10: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 18: {
                    string value = _single_sharedSet_codec.Read(ref input);
                    if (sharedSet_ == null || value != "")
                    {
                        SharedSet = value;
                    }
                    break;
                }

                case 26: {
                    global::Google.Ads.GoogleAds.V4.Common.KeywordInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.KeywordInfo();
                    if (criterionCase_ == CriterionOneofCase.Keyword)
                    {
                        subBuilder.MergeFrom(Keyword);
                    }
                    input.ReadMessage(subBuilder);
                    Keyword = subBuilder;
                    break;
                }

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.CriterionTypeEnum.Types.CriterionType)input.ReadEnum();
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeVideo)
                    {
                        subBuilder.MergeFrom(YoutubeVideo);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeVideo = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeChannel)
                    {
                        subBuilder.MergeFrom(YoutubeChannel);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeChannel = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V4.Common.PlacementInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.PlacementInfo();
                    if (criterionCase_ == CriterionOneofCase.Placement)
                    {
                        subBuilder.MergeFrom(Placement);
                    }
                    input.ReadMessage(subBuilder);
                    Placement = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileAppCategory)
                    {
                        subBuilder.MergeFrom(MobileAppCategory);
                    }
                    input.ReadMessage(subBuilder);
                    MobileAppCategory = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileApplication)
                    {
                        subBuilder.MergeFrom(MobileApplication);
                    }
                    input.ReadMessage(subBuilder);
                    MobileApplication = subBuilder;
                    break;
                }

                case 210: {
                    long?value = _single_criterionId_codec.Read(ref input);
                    if (criterionId_ == null || value != 0L)
                    {
                        CriterionId = value;
                    }
                    break;
                }
                }
            }
        }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            uint tag;
            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 18: {
                    string value = _single_sharedSet_codec.Read(input);
                    if (sharedSet_ == null || value != "")
                    {
                        SharedSet = value;
                    }
                    break;
                }

                case 26: {
                    global::Google.Ads.GoogleAds.V4.Common.KeywordInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.KeywordInfo();
                    if (criterionCase_ == CriterionOneofCase.Keyword)
                    {
                        subBuilder.MergeFrom(Keyword);
                    }
                    input.ReadMessage(subBuilder);
                    Keyword = subBuilder;
                    break;
                }

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.CriterionTypeEnum.Types.CriterionType)input.ReadEnum();
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeVideo)
                    {
                        subBuilder.MergeFrom(YoutubeVideo);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeVideo = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeChannel)
                    {
                        subBuilder.MergeFrom(YoutubeChannel);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeChannel = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V4.Common.PlacementInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.PlacementInfo();
                    if (criterionCase_ == CriterionOneofCase.Placement)
                    {
                        subBuilder.MergeFrom(Placement);
                    }
                    input.ReadMessage(subBuilder);
                    Placement = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileAppCategory)
                    {
                        subBuilder.MergeFrom(MobileAppCategory);
                    }
                    input.ReadMessage(subBuilder);
                    MobileAppCategory = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileApplication)
                    {
                        subBuilder.MergeFrom(MobileApplication);
                    }
                    input.ReadMessage(subBuilder);
                    MobileApplication = subBuilder;
                    break;
                }

                case 210: {
                    long?value = _single_criterionId_codec.Read(input);
                    if (criterionId_ == null || value != 0L)
                    {
                        CriterionId = value;
                    }
                    break;
                }
                }
            }
    #endif
        }
Пример #3
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 10: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 18: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 24: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.CriterionTypeEnum.Types.CriterionType)input.ReadEnum();
                    break;
                }

                case 34: {
                    global::Google.Ads.GoogleAds.V4.Common.ContentLabelInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.ContentLabelInfo();
                    if (criterionCase_ == CriterionOneofCase.ContentLabel)
                    {
                        subBuilder.MergeFrom(ContentLabel);
                    }
                    input.ReadMessage(subBuilder);
                    ContentLabel = subBuilder;
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileApplication)
                    {
                        subBuilder.MergeFrom(MobileApplication);
                    }
                    input.ReadMessage(subBuilder);
                    MobileApplication = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileAppCategory)
                    {
                        subBuilder.MergeFrom(MobileAppCategory);
                    }
                    input.ReadMessage(subBuilder);
                    MobileAppCategory = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V4.Common.PlacementInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.PlacementInfo();
                    if (criterionCase_ == CriterionOneofCase.Placement)
                    {
                        subBuilder.MergeFrom(Placement);
                    }
                    input.ReadMessage(subBuilder);
                    Placement = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeVideo)
                    {
                        subBuilder.MergeFrom(YoutubeVideo);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeVideo = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo();
                    if (criterionCase_ == CriterionOneofCase.YoutubeChannel)
                    {
                        subBuilder.MergeFrom(YoutubeChannel);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeChannel = subBuilder;
                    break;
                }
                }
            }
        }
Пример #4
0
        public void MergeFrom(SharedCriterion other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.sharedSet_ != null)
            {
                if (sharedSet_ == null || other.SharedSet != "")
                {
                    SharedSet = other.SharedSet;
                }
            }
            if (other.criterionId_ != null)
            {
                if (criterionId_ == null || other.CriterionId != 0L)
                {
                    CriterionId = other.CriterionId;
                }
            }
            if (other.Type != global::Google.Ads.GoogleAds.V4.Enums.CriterionTypeEnum.Types.CriterionType.Unspecified)
            {
                Type = other.Type;
            }
            switch (other.CriterionCase)
            {
            case CriterionOneofCase.Keyword:
                if (Keyword == null)
                {
                    Keyword = new global::Google.Ads.GoogleAds.V4.Common.KeywordInfo();
                }
                Keyword.MergeFrom(other.Keyword);
                break;

            case CriterionOneofCase.YoutubeVideo:
                if (YoutubeVideo == null)
                {
                    YoutubeVideo = new global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo();
                }
                YoutubeVideo.MergeFrom(other.YoutubeVideo);
                break;

            case CriterionOneofCase.YoutubeChannel:
                if (YoutubeChannel == null)
                {
                    YoutubeChannel = new global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo();
                }
                YoutubeChannel.MergeFrom(other.YoutubeChannel);
                break;

            case CriterionOneofCase.Placement:
                if (Placement == null)
                {
                    Placement = new global::Google.Ads.GoogleAds.V4.Common.PlacementInfo();
                }
                Placement.MergeFrom(other.Placement);
                break;

            case CriterionOneofCase.MobileAppCategory:
                if (MobileAppCategory == null)
                {
                    MobileAppCategory = new global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo();
                }
                MobileAppCategory.MergeFrom(other.MobileAppCategory);
                break;

            case CriterionOneofCase.MobileApplication:
                if (MobileApplication == null)
                {
                    MobileApplication = new global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo();
                }
                MobileApplication.MergeFrom(other.MobileApplication);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Пример #5
0
        public void MergeFrom(CustomerNegativeCriterion other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.id_ != null)
            {
                if (id_ == null || other.Id != 0L)
                {
                    Id = other.Id;
                }
            }
            if (other.Type != global::Google.Ads.GoogleAds.V4.Enums.CriterionTypeEnum.Types.CriterionType.Unspecified)
            {
                Type = other.Type;
            }
            switch (other.CriterionCase)
            {
            case CriterionOneofCase.ContentLabel:
                if (ContentLabel == null)
                {
                    ContentLabel = new global::Google.Ads.GoogleAds.V4.Common.ContentLabelInfo();
                }
                ContentLabel.MergeFrom(other.ContentLabel);
                break;

            case CriterionOneofCase.MobileApplication:
                if (MobileApplication == null)
                {
                    MobileApplication = new global::Google.Ads.GoogleAds.V4.Common.MobileApplicationInfo();
                }
                MobileApplication.MergeFrom(other.MobileApplication);
                break;

            case CriterionOneofCase.MobileAppCategory:
                if (MobileAppCategory == null)
                {
                    MobileAppCategory = new global::Google.Ads.GoogleAds.V4.Common.MobileAppCategoryInfo();
                }
                MobileAppCategory.MergeFrom(other.MobileAppCategory);
                break;

            case CriterionOneofCase.Placement:
                if (Placement == null)
                {
                    Placement = new global::Google.Ads.GoogleAds.V4.Common.PlacementInfo();
                }
                Placement.MergeFrom(other.Placement);
                break;

            case CriterionOneofCase.YoutubeVideo:
                if (YoutubeVideo == null)
                {
                    YoutubeVideo = new global::Google.Ads.GoogleAds.V4.Common.YouTubeVideoInfo();
                }
                YoutubeVideo.MergeFrom(other.YoutubeVideo);
                break;

            case CriterionOneofCase.YoutubeChannel:
                if (YoutubeChannel == null)
                {
                    YoutubeChannel = new global::Google.Ads.GoogleAds.V4.Common.YouTubeChannelInfo();
                }
                YoutubeChannel.MergeFrom(other.YoutubeChannel);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }