예제 #1
0
        public void MergeFrom(HealthCheck other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Name.Length != 0)
            {
                Name = other.Name;
            }
            if (other.interval_ != null)
            {
                if (interval_ == null)
                {
                    Interval = new global::Google.Protobuf.WellKnownTypes.Duration();
                }
                Interval.MergeFrom(other.Interval);
            }
            if (other.timeout_ != null)
            {
                if (timeout_ == null)
                {
                    Timeout = new global::Google.Protobuf.WellKnownTypes.Duration();
                }
                Timeout.MergeFrom(other.Timeout);
            }
            if (other.UnhealthyThreshold != 0L)
            {
                UnhealthyThreshold = other.UnhealthyThreshold;
            }
            if (other.HealthyThreshold != 0L)
            {
                HealthyThreshold = other.HealthyThreshold;
            }
            switch (other.OptionsCase)
            {
            case OptionsOneofCase.TcpOptions:
                if (TcpOptions == null)
                {
                    TcpOptions = new global::Yandex.Cloud.Loadbalancer.V1.HealthCheck.Types.TcpOptions();
                }
                TcpOptions.MergeFrom(other.TcpOptions);
                break;

            case OptionsOneofCase.HttpOptions:
                if (HttpOptions == null)
                {
                    HttpOptions = new global::Yandex.Cloud.Loadbalancer.V1.HealthCheck.Types.HttpOptions();
                }
                HttpOptions.MergeFrom(other.HttpOptions);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }