Setter method for collector_encoding, mapped from YANG variable /telemetry/collector/collector_encoding (collector-encoding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_collector_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_collector_encoding() directly.

def _set_collector_encoding(self, v, load=False):
    """
    Setter method for collector_encoding, mapped from YANG variable /telemetry/collector/collector_encoding (collector-encoding-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_collector_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_collector_encoding() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'json': {'value': 2}, u'gpb': {'value': 1}},), is_leaf=True, yang_name="collector-encoding", rest_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Collector encoding format', u'alt-name': u'encoding', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-telemetry', defining_module='brocade-telemetry', yang_type='collector-encoding-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """collector_encoding must be of a type compatible with collector-encoding-type""",
          'defined-type': "brocade-telemetry:collector-encoding-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'json': {'value': 2}, u'gpb': {'value': 1}},), is_leaf=True, yang_name="collector-encoding", rest_name="encoding", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Collector encoding format', u'alt-name': u'encoding', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-telemetry', defining_module='brocade-telemetry', yang_type='collector-encoding-type', is_config=True)""",
        })

    self.__collector_encoding = t
    if hasattr(self, '_set'):
      self._set()