Exemple #1
0
        public void MergeFrom(ConformanceRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.RequestedOutputFormat != 0)
            {
                RequestedOutputFormat = other.RequestedOutputFormat;
            }
            if (other.MessageType.Length != 0)
            {
                MessageType = other.MessageType;
            }
            if (other.TestCategory != 0)
            {
                TestCategory = other.TestCategory;
            }
            if (other.jspbEncodingOptions_ != null)
            {
                if (jspbEncodingOptions_ == null)
                {
                    JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
                }
                JspbEncodingOptions.MergeFrom(other.JspbEncodingOptions);
            }
            switch (other.PayloadCase)
            {
            case PayloadOneofCase.ProtobufPayload:
                ProtobufPayload = other.ProtobufPayload;
                break;

            case PayloadOneofCase.JsonPayload:
                JsonPayload = other.JsonPayload;
                break;

            case PayloadOneofCase.JspbPayload:
                JspbPayload = other.JspbPayload;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (payloadCase_ == PayloadOneofCase.ProtobufPayload)
            {
                hash ^= ProtobufPayload.GetHashCode();
            }
            if (payloadCase_ == PayloadOneofCase.JsonPayload)
            {
                hash ^= JsonPayload.GetHashCode();
            }
            if (payloadCase_ == PayloadOneofCase.JspbPayload)
            {
                hash ^= JspbPayload.GetHashCode();
            }
            if (RequestedOutputFormat != 0)
            {
                hash ^= RequestedOutputFormat.GetHashCode();
            }
            if (MessageType.Length != 0)
            {
                hash ^= MessageType.GetHashCode();
            }
            if (TestCategory != 0)
            {
                hash ^= TestCategory.GetHashCode();
            }
            if (jspbEncodingOptions_ != null)
            {
                hash ^= JspbEncodingOptions.GetHashCode();
            }
            hash ^= (int)payloadCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }