Пример #1
0
        public void MergeFrom(OfflineUserDataJob 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.externalId_ != null)
            {
                if (externalId_ == null || other.ExternalId != 0L)
                {
                    ExternalId = other.ExternalId;
                }
            }
            if (other.Type != global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType.Unspecified)
            {
                Type = other.Type;
            }
            if (other.Status != global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus.Unspecified)
            {
                Status = other.Status;
            }
            if (other.FailureReason != global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason.Unspecified)
            {
                FailureReason = other.FailureReason;
            }
            switch (other.MetadataCase)
            {
            case MetadataOneofCase.CustomerMatchUserListMetadata:
                if (CustomerMatchUserListMetadata == null)
                {
                    CustomerMatchUserListMetadata = new global::Google.Ads.GoogleAds.V3.Common.CustomerMatchUserListMetadata();
                }
                CustomerMatchUserListMetadata.MergeFrom(other.CustomerMatchUserListMetadata);
                break;

            case MetadataOneofCase.StoreSalesMetadata:
                if (StoreSalesMetadata == null)
                {
                    StoreSalesMetadata = new global::Google.Ads.GoogleAds.V3.Common.StoreSalesMetadata();
                }
                StoreSalesMetadata.MergeFrom(other.StoreSalesMetadata);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Пример #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: {
                    long?value = _single_externalId_codec.Read(ref input);
                    if (externalId_ == null || value != 0L)
                    {
                        ExternalId = value;
                    }
                    break;
                }

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType)input.ReadEnum();
                    break;
                }

                case 40: {
                    Status = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus)input.ReadEnum();
                    break;
                }

                case 48: {
                    FailureReason = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason)input.ReadEnum();
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V3.Common.CustomerMatchUserListMetadata subBuilder = new global::Google.Ads.GoogleAds.V3.Common.CustomerMatchUserListMetadata();
                    if (metadataCase_ == MetadataOneofCase.CustomerMatchUserListMetadata)
                    {
                        subBuilder.MergeFrom(CustomerMatchUserListMetadata);
                    }
                    input.ReadMessage(subBuilder);
                    CustomerMatchUserListMetadata = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V3.Common.StoreSalesMetadata subBuilder = new global::Google.Ads.GoogleAds.V3.Common.StoreSalesMetadata();
                    if (metadataCase_ == MetadataOneofCase.StoreSalesMetadata)
                    {
                        subBuilder.MergeFrom(StoreSalesMetadata);
                    }
                    input.ReadMessage(subBuilder);
                    StoreSalesMetadata = subBuilder;
                    break;
                }
                }
            }
        }
Пример #3
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: {
                    long?value = _single_externalId_codec.Read(input);
                    if (externalId_ == null || value != 0L)
                    {
                        ExternalId = value;
                    }
                    break;
                }

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobTypeEnum.Types.OfflineUserDataJobType)input.ReadEnum();
                    break;
                }

                case 40: {
                    Status = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobStatusEnum.Types.OfflineUserDataJobStatus)input.ReadEnum();
                    break;
                }

                case 48: {
                    FailureReason = (global::Google.Ads.GoogleAds.V3.Enums.OfflineUserDataJobFailureReasonEnum.Types.OfflineUserDataJobFailureReason)input.ReadEnum();
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V3.Common.CustomerMatchUserListMetadata subBuilder = new global::Google.Ads.GoogleAds.V3.Common.CustomerMatchUserListMetadata();
                    if (metadataCase_ == MetadataOneofCase.CustomerMatchUserListMetadata)
                    {
                        subBuilder.MergeFrom(CustomerMatchUserListMetadata);
                    }
                    input.ReadMessage(subBuilder);
                    CustomerMatchUserListMetadata = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V3.Common.StoreSalesMetadata subBuilder = new global::Google.Ads.GoogleAds.V3.Common.StoreSalesMetadata();
                    if (metadataCase_ == MetadataOneofCase.StoreSalesMetadata)
                    {
                        subBuilder.MergeFrom(StoreSalesMetadata);
                    }
                    input.ReadMessage(subBuilder);
                    StoreSalesMetadata = subBuilder;
                    break;
                }
                }
            }
    #endif
        }