コード例 #1
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: {
                    Name = input.ReadString();
                    break;
                }

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

                case 26: {
                    Description = input.ReadString();
                    break;
                }

                case 50: {
                    global::Google.Cloud.Notebooks.V1.VmImage subBuilder = new global::Google.Cloud.Notebooks.V1.VmImage();
                    if (imageTypeCase_ == ImageTypeOneofCase.VmImage)
                    {
                        subBuilder.MergeFrom(VmImage);
                    }
                    input.ReadMessage(subBuilder);
                    VmImage = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Cloud.Notebooks.V1.ContainerImage subBuilder = new global::Google.Cloud.Notebooks.V1.ContainerImage();
                    if (imageTypeCase_ == ImageTypeOneofCase.ContainerImage)
                    {
                        subBuilder.MergeFrom(ContainerImage);
                    }
                    input.ReadMessage(subBuilder);
                    ContainerImage = subBuilder;
                    break;
                }

                case 66: {
                    PostStartupScript = input.ReadString();
                    break;
                }

                case 74: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }
                }
            }
        }
コード例 #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: {
                    Name = input.ReadString();
                    break;
                }

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

                case 26: {
                    Description = input.ReadString();
                    break;
                }

                case 50: {
                    global::Google.Cloud.Notebooks.V1.VmImage subBuilder = new global::Google.Cloud.Notebooks.V1.VmImage();
                    if (imageTypeCase_ == ImageTypeOneofCase.VmImage)
                    {
                        subBuilder.MergeFrom(VmImage);
                    }
                    input.ReadMessage(subBuilder);
                    VmImage = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Cloud.Notebooks.V1.ContainerImage subBuilder = new global::Google.Cloud.Notebooks.V1.ContainerImage();
                    if (imageTypeCase_ == ImageTypeOneofCase.ContainerImage)
                    {
                        subBuilder.MergeFrom(ContainerImage);
                    }
                    input.ReadMessage(subBuilder);
                    ContainerImage = subBuilder;
                    break;
                }

                case 66: {
                    PostStartupScript = input.ReadString();
                    break;
                }

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