Пример #1
0
        public void MergeFrom(MaintenanceWindow other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.PolicyCase)
            {
            case PolicyOneofCase.Anytime:
                if (Anytime == null)
                {
                    Anytime = new global::Yandex.Cloud.Mdb.Mongodb.V1.AnytimeMaintenanceWindow();
                }
                Anytime.MergeFrom(other.Anytime);
                break;

            case PolicyOneofCase.WeeklyMaintenanceWindow:
                if (WeeklyMaintenanceWindow == null)
                {
                    WeeklyMaintenanceWindow = new global::Yandex.Cloud.Mdb.Mongodb.V1.WeeklyMaintenanceWindow();
                }
                WeeklyMaintenanceWindow.MergeFrom(other.WeeklyMaintenanceWindow);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Пример #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::Yandex.Cloud.Mdb.Mongodb.V1.AnytimeMaintenanceWindow subBuilder = new global::Yandex.Cloud.Mdb.Mongodb.V1.AnytimeMaintenanceWindow();
                    if (policyCase_ == PolicyOneofCase.Anytime)
                    {
                        subBuilder.MergeFrom(Anytime);
                    }
                    input.ReadMessage(subBuilder);
                    Anytime = subBuilder;
                    break;
                }

                case 18: {
                    global::Yandex.Cloud.Mdb.Mongodb.V1.WeeklyMaintenanceWindow subBuilder = new global::Yandex.Cloud.Mdb.Mongodb.V1.WeeklyMaintenanceWindow();
                    if (policyCase_ == PolicyOneofCase.WeeklyMaintenanceWindow)
                    {
                        subBuilder.MergeFrom(WeeklyMaintenanceWindow);
                    }
                    input.ReadMessage(subBuilder);
                    WeeklyMaintenanceWindow = subBuilder;
                    break;
                }
                }
            }
        }