Exemple #1
0
 public void MergeFrom(Customer other) {
   if (other == null) {
     return;
   }
   if (other.Name.Length != 0) {
     Name = other.Name;
   }
   if (other.OrgDisplayName.Length != 0) {
     OrgDisplayName = other.OrgDisplayName;
   }
   if (other.orgPostalAddress_ != null) {
     if (orgPostalAddress_ == null) {
       OrgPostalAddress = new global::Google.Type.PostalAddress();
     }
     OrgPostalAddress.MergeFrom(other.OrgPostalAddress);
   }
   if (other.primaryContactInfo_ != null) {
     if (primaryContactInfo_ == null) {
       PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo();
     }
     PrimaryContactInfo.MergeFrom(other.PrimaryContactInfo);
   }
   if (other.AlternateEmail.Length != 0) {
     AlternateEmail = other.AlternateEmail;
   }
   if (other.Domain.Length != 0) {
     Domain = other.Domain;
   }
   if (other.createTime_ != null) {
     if (createTime_ == null) {
       CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
     }
     CreateTime.MergeFrom(other.CreateTime);
   }
   if (other.updateTime_ != null) {
     if (updateTime_ == null) {
       UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
     }
     UpdateTime.MergeFrom(other.UpdateTime);
   }
   if (other.CloudIdentityId.Length != 0) {
     CloudIdentityId = other.CloudIdentityId;
   }
   if (other.LanguageCode.Length != 0) {
     LanguageCode = other.LanguageCode;
   }
   if (other.cloudIdentityInfo_ != null) {
     if (cloudIdentityInfo_ == null) {
       CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
     }
     CloudIdentityInfo.MergeFrom(other.CloudIdentityInfo);
   }
   if (other.ChannelPartnerId.Length != 0) {
     ChannelPartnerId = other.ChannelPartnerId;
   }
   _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
 public void MergeFrom(ChannelPartnerLink other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.ResellerCloudIdentityId.Length != 0)
     {
         ResellerCloudIdentityId = other.ResellerCloudIdentityId;
     }
     if (other.LinkState != global::Google.Cloud.Channel.V1.ChannelPartnerLinkState.Unspecified)
     {
         LinkState = other.LinkState;
     }
     if (other.InviteLinkUri.Length != 0)
     {
         InviteLinkUri = other.InviteLinkUri;
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.PublicId.Length != 0)
     {
         PublicId = other.PublicId;
     }
     if (other.channelPartnerCloudIdentityInfo_ != null)
     {
         if (channelPartnerCloudIdentityInfo_ == null)
         {
             ChannelPartnerCloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
         }
         ChannelPartnerCloudIdentityInfo.MergeFrom(other.ChannelPartnerCloudIdentityInfo);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
        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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    OrgDisplayName = input.ReadString();
                    break;
                }

                case 26: {
                    if (orgPostalAddress_ == null)
                    {
                        OrgPostalAddress = new global::Google.Type.PostalAddress();
                    }
                    input.ReadMessage(OrgPostalAddress);
                    break;
                }

                case 34: {
                    if (primaryContactInfo_ == null)
                    {
                        PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo();
                    }
                    input.ReadMessage(PrimaryContactInfo);
                    break;
                }

                case 42: {
                    AlternateEmail = input.ReadString();
                    break;
                }

                case 50: {
                    Domain = input.ReadString();
                    break;
                }

                case 58: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

                case 66: {
                    if (updateTime_ == null)
                    {
                        UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdateTime);
                    break;
                }

                case 74: {
                    CloudIdentityId = input.ReadString();
                    break;
                }

                case 82: {
                    LanguageCode = input.ReadString();
                    break;
                }

                case 98: {
                    if (cloudIdentityInfo_ == null)
                    {
                        CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
                    }
                    input.ReadMessage(CloudIdentityInfo);
                    break;
                }

                case 106: {
                    ChannelPartnerId = input.ReadString();
                    break;
                }
                }
            }
        }
        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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    OrgDisplayName = input.ReadString();
                    break;
                }

                case 26: {
                    if (orgPostalAddress_ == null)
                    {
                        OrgPostalAddress = new global::Google.Type.PostalAddress();
                    }
                    input.ReadMessage(OrgPostalAddress);
                    break;
                }

                case 34: {
                    if (primaryContactInfo_ == null)
                    {
                        PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo();
                    }
                    input.ReadMessage(PrimaryContactInfo);
                    break;
                }

                case 42: {
                    AlternateEmail = input.ReadString();
                    break;
                }

                case 50: {
                    Domain = input.ReadString();
                    break;
                }

                case 58: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

                case 66: {
                    if (updateTime_ == null)
                    {
                        UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdateTime);
                    break;
                }

                case 74: {
                    CloudIdentityId = input.ReadString();
                    break;
                }

                case 82: {
                    LanguageCode = input.ReadString();
                    break;
                }

                case 98: {
                    if (cloudIdentityInfo_ == null)
                    {
                        CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
                    }
                    input.ReadMessage(CloudIdentityInfo);
                    break;
                }

                case 106: {
                    ChannelPartnerId = input.ReadString();
                    break;
                }
                }
            }
    #endif
        }
        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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    ResellerCloudIdentityId = input.ReadString();
                    break;
                }

                case 24: {
                    LinkState = (global::Google.Cloud.Channel.V1.ChannelPartnerLinkState)input.ReadEnum();
                    break;
                }

                case 34: {
                    InviteLinkUri = input.ReadString();
                    break;
                }

                case 42: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

                case 50: {
                    if (updateTime_ == null)
                    {
                        UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdateTime);
                    break;
                }

                case 58: {
                    PublicId = input.ReadString();
                    break;
                }

                case 66: {
                    if (channelPartnerCloudIdentityInfo_ == null)
                    {
                        ChannelPartnerCloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
                    }
                    input.ReadMessage(ChannelPartnerCloudIdentityInfo);
                    break;
                }
                }
            }
        }
        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: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    ResellerCloudIdentityId = input.ReadString();
                    break;
                }

                case 24: {
                    LinkState = (global::Google.Cloud.Channel.V1.ChannelPartnerLinkState)input.ReadEnum();
                    break;
                }

                case 34: {
                    InviteLinkUri = input.ReadString();
                    break;
                }

                case 42: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

                case 50: {
                    if (updateTime_ == null)
                    {
                        UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdateTime);
                    break;
                }

                case 58: {
                    PublicId = input.ReadString();
                    break;
                }

                case 66: {
                    if (channelPartnerCloudIdentityInfo_ == null)
                    {
                        ChannelPartnerCloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo();
                    }
                    input.ReadMessage(ChannelPartnerCloudIdentityInfo);
                    break;
                }
                }
            }
    #endif
        }