Exemplo n.º 1
0
        public void MergeFrom(NotificationMessage other)
        {
            if (other == null)
            {
                return;
            }
            if (other.NotificationConfigName.Length != 0)
            {
                NotificationConfigName = other.NotificationConfigName;
            }
            if (other.resource_ != null)
            {
                if (resource_ == null)
                {
                    Resource = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Resource();
                }
                Resource.MergeFrom(other.Resource);
            }
            switch (other.EventCase)
            {
            case EventOneofCase.Finding:
                if (Finding == null)
                {
                    Finding = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Finding();
                }
                Finding.MergeFrom(other.Finding);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemplo n.º 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: {
                    NotificationConfigName = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Cloud.SecurityCenter.V1P1Beta1.Finding subBuilder = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Finding();
                    if (eventCase_ == EventOneofCase.Finding)
                    {
                        subBuilder.MergeFrom(Finding);
                    }
                    input.ReadMessage(subBuilder);
                    Finding = subBuilder;
                    break;
                }

                case 26: {
                    if (resource_ == null)
                    {
                        Resource = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Resource();
                    }
                    input.ReadMessage(Resource);
                    break;
                }
                }
            }
    #endif
        }
Exemplo n.º 3
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: {
                    NotificationConfigName = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Cloud.SecurityCenter.V1P1Beta1.Finding subBuilder = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Finding();
                    if (eventCase_ == EventOneofCase.Finding)
                    {
                        subBuilder.MergeFrom(Finding);
                    }
                    input.ReadMessage(subBuilder);
                    Finding = subBuilder;
                    break;
                }

                case 26: {
                    if (resource_ == null)
                    {
                        Resource = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Resource();
                    }
                    input.ReadMessage(Resource);
                    break;
                }
                }
            }
        }