Esempio n. 1
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: {
                    Name = input.ReadString();
                    break;
                }

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

                case 24: {
                    ModelType = (global::Tensorflow.Serving.ModelType)input.ReadEnum();
                    break;
                }

                case 34: {
                    ModelPlatform = input.ReadString();
                    break;
                }

                case 50: {
                    if (loggingConfig_ == null)
                    {
                        LoggingConfig = new global::Tensorflow.Serving.LoggingConfig();
                    }
                    input.ReadMessage(LoggingConfig);
                    break;
                }

                case 58: {
                    if (modelVersionPolicy_ == null)
                    {
                        ModelVersionPolicy = new global::Tensorflow.Serving.FileSystemStoragePathSourceConfig.Types.ServableVersionPolicy();
                    }
                    input.ReadMessage(ModelVersionPolicy);
                    break;
                }

                case 66: {
                    versionLabels_.AddEntriesFrom(input, _map_versionLabels_codec);
                    break;
                }
                }
            }
        }
Esempio n. 2
0
 public void MergeFrom(ModelConfig other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.BasePath.Length != 0)
     {
         BasePath = other.BasePath;
     }
     if (other.ModelType != 0)
     {
         ModelType = other.ModelType;
     }
     if (other.ModelPlatform.Length != 0)
     {
         ModelPlatform = other.ModelPlatform;
     }
     if (other.modelVersionPolicy_ != null)
     {
         if (modelVersionPolicy_ == null)
         {
             ModelVersionPolicy = new global::Tensorflow.Serving.FileSystemStoragePathSourceConfig.Types.ServableVersionPolicy();
         }
         ModelVersionPolicy.MergeFrom(other.ModelVersionPolicy);
     }
     versionLabels_.Add(other.versionLabels_);
     if (other.loggingConfig_ != null)
     {
         if (loggingConfig_ == null)
         {
             LoggingConfig = new global::Tensorflow.Serving.LoggingConfig();
         }
         LoggingConfig.MergeFrom(other.LoggingConfig);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }