old_contents: # -*- coding: utf-8 -*-
  
  from __future__ import print_function
  
  import abc
  
  from ..external import six
  
  from .._protos.public.modeldb import DatasetVersionService_pb2 as _DatasetVersionService
  
  from .._tracking import entity
  from .._internal_utils import (
      _utils,
  )
  
  
  @six.add_metaclass(abc.ABCMeta)
  class DatasetVersion(entity._ModelDBEntity):
      def __init__(self, conn, conf, msg):
          super(DatasetVersion, self).__init__(conn, conf, _DatasetVersionService, "dataset-version", msg)
  
      def __repr__(self):
          raise NotImplementedError
  
      @property
      def name(self):
          self._refresh_cache()
          return self._msg.name
  
      @classmethod
      def _generate_default_name(cls):
          return "DatasetVersion {}".format(_utils.generate_default_name())
  
      @classmethod
      def _get_proto_by_id(cls, conn, id):
          raise NotImplementedError
  
      @classmethod
      def _get_proto_by_name(cls, conn, name, workspace):
          raise NotImplementedError("cannot get DatasetVersion by name")
  
      @classmethod
      def _create_proto_internal(cls, conn, dataset, dataset_blob, desc=None, tags=None, attrs=None, time_logged=None, time_updated=None):
          raise NotImplementedError
          # msg = _DatasetVersionService.DatasetVersion(
          #     dataset_blob=dataset_blob._as_proto().dataset
          # )
  
new_contents: # -*- coding: utf-8 -*-
  
  from __future__ import print_function
  
  import abc
  
  from ..external import six
  
  from .._protos.public.modeldb import DatasetVersionService_pb2 as _DatasetVersionService
  
  from .._tracking import entity
  from .._internal_utils import (
      _utils,
  )
  
  
  @six.add_metaclass(abc.ABCMeta)
  class DatasetVersion(entity._ModelDBEntity):
      def __init__(self, conn, conf, msg):
          super(DatasetVersion, self).__init__(conn, conf, _DatasetVersionService, "dataset-version", msg)
  
      def __repr__(self):
          raise NotImplementedError
  
      @property
      def name(self):
          self._refresh_cache()
          return self._msg.name
  
      @classmethod
      def _generate_default_name(cls):
          return "DatasetVersion {}".format(_utils.generate_default_name())
  
      @classmethod
      def _get_proto_by_id(cls, conn, id):
          raise NotImplementedError
  
      @classmethod
      def _get_proto_by_name(cls, conn, name, workspace):
          raise NotImplementedError("cannot get DatasetVersion by name")
  
      @classmethod
      def _create_proto_internal(cls, conn, dataset, dataset_blob, desc=None, tags=None, attrs=None, time_logged=None, time_updated=None):
          raise NotImplementedError
          # msg = _DatasetVersionService.DatasetVersion(
          #     dataset_blob=dataset_blob._as_proto().dataset
          # )
  
      def set_description(self, desc):
          raise NotImplementedError
  
      def get_description(self):
          raise NotImplementedError
  
      def add_tag(self, tag):
          raise NotImplementedError
  
      def add_tags(self, tags):
          raise NotImplementedError
  
      def get_tags(self):
          raise NotImplementedError
  
      def del_tag(self, tag):
          raise NotImplementedError
  
      def add_attribute(self, key, value):
          raise NotImplementedError
  
      def add_attributes(self, attrs):
          raise NotImplementedError
  
      def get_attribute(self, key):
          raise NotImplementedError
  
      def get_attributes(self):
          raise NotImplementedError
  
      def del_attribute(self, key):
          raise NotImplementedError
  
subject: Add DataVer metadata CRUD interface (#1225)