コード例 #1
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: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 26: {
                    string value = _single_name_codec.Read(input);
                    if (name_ == null || value != "")
                    {
                        Name = value;
                    }
                    break;
                }

                case 32: {
                    Status = (global::Google.Ads.GoogleAds.V4.Enums.LabelStatusEnum.Types.LabelStatus)input.ReadEnum();
                    break;
                }

                case 42: {
                    if (textLabel_ == null)
                    {
                        TextLabel = new global::Google.Ads.GoogleAds.V4.Common.TextLabel();
                    }
                    input.ReadMessage(TextLabel);
                    break;
                }
                }
            }
    #endif
        }
コード例 #2
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: {
                    long?value = _single_id_codec.Read(ref input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 26: {
                    string value = _single_name_codec.Read(ref input);
                    if (name_ == null || value != "")
                    {
                        Name = value;
                    }
                    break;
                }

                case 32: {
                    Status = (global::Google.Ads.GoogleAds.V4.Enums.LabelStatusEnum.Types.LabelStatus)input.ReadEnum();
                    break;
                }

                case 42: {
                    if (textLabel_ == null)
                    {
                        TextLabel = new global::Google.Ads.GoogleAds.V4.Common.TextLabel();
                    }
                    input.ReadMessage(TextLabel);
                    break;
                }
                }
            }
        }
コード例 #3
0
ファイル: Label.cs プロジェクト: devchas/google-ads-dotnet
 public void MergeFrom(Label 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.name_ != null)
     {
         if (name_ == null || other.Name != "")
         {
             Name = other.Name;
         }
     }
     if (other.Status != global::Google.Ads.GoogleAds.V4.Enums.LabelStatusEnum.Types.LabelStatus.Unspecified)
     {
         Status = other.Status;
     }
     if (other.textLabel_ != null)
     {
         if (textLabel_ == null)
         {
             TextLabel = new global::Google.Ads.GoogleAds.V4.Common.TextLabel();
         }
         TextLabel.MergeFrom(other.TextLabel);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }