Update metadata using the _BOOLEAN_OPTIONS_DICTIONARY mapping
    :param name: option name
    :param value: option value
    :param metadata:
    :return:
19853
def update_metadata_from_rmd_options(name, value, metadata):
    
    for jupyter_option, rmd_option, rev in _BOOLEAN_OPTIONS_DICTIONARY:
        if name == rmd_option:
            try:
                metadata[jupyter_option] = _py_logical_values(value) != rev
                return True
            except RLogicalValueError:
                pass
    return False
1085001
def set_metadata(self, queue, metadata, clear=False):
        
        uri = "/%s/%s/metadata" % (self.uri_base, utils.get_id(queue))
        if clear:
            curr = {}
        else:
            curr = self.get_metadata(queue)
        curr.update(metadata)
        resp, resp_body = self.api.method_put(uri, body=curr)
878921
def set_metadata_if_none(self, metadata: MetaData) -> None:
        
        self._parent.set_metadata_if_none(metadata)
        self._child.set_metadata_if_none(metadata)
715862
function updateBoolean(name) {
  name = ' ' + name;
  function update(value) {
    switch (value) {
      case true:
      case 'true':
        return name;
    }
    return '';
  }
  update[UID] = true;
  return update;
}
1131856
def _merge_metadata_dictionaries(cls, dictionaries):
        
        # three levels of nested dictionaries!
        #   {source name: {variant: {attribute: value}}}
        combined_dictionary = {}
        for source_to_metadata_dict in dictionaries:
            for source_name, variant_to_metadata_dict in source_to_metadata_dict.items():
                combined_dictionary.setdefault(source_name, {})
                combined_source_dict = combined_dictionary[source_name]
                for variant, metadata_dict in variant_to_metadata_dict.items():
                    combined_source_dict.setdefault(variant, {})
                    combined_source_dict[variant].update(metadata_dict)
        return combined_dictionary
616499
def add_value(self, value, metadata=""):
        
        data = {
            'value': value,
            'metadata': metadata
        }

        return self.post('createValue', data)
764949
def update_metadata(uid)
      return false unless store_meta
      path = full_path(uid)
      meta = storage(:get_blob, container_name, path)[0].metadata
      return false if meta.present?
      meta = meta_from_file(path)
      return false if meta.blank?
      storage(:set_blob_metadata, container_name, path, meta)
      storage(:delete_blob, container_name, meta_path(path))
      true
    rescue Azure::Core::Http::HTTPError
      nil
    end
68390
private void setFromMetadata(Metadata md) {
        // TODO: add pom.properties support?
        String vendorkey = Attributes.Name.IMPLEMENTATION_VENDOR.toString();
        String versionkey = Attributes.Name.IMPLEMENTATION_VERSION.toString();
        String namekey = Attributes.Name.IMPLEMENTATION_TITLE.toString();
        if (this.vendor.equals(UNKNOWN) && md.containsKey(vendorkey)) {
            this.vendor = md.get(vendorkey);
        }
        if (this.version.equals(UNKNOWN) && md.containsKey(versionkey)) {
            this.version = md.get(versionkey);
        }
        if (this.name.equals(UNKNOWN) && md.containsKey(namekey)) {
            this.name = md.get(namekey);
        }
    }
743105
public function update_metadata($meta_key, $meta_value)
    {
        $this->meta[$meta_key] = $meta_value;

        update_post_meta($this->ID, $meta_key, $meta_value);
    }
871449
def set_metadata(self, fp):
        
        base_url = self._client.get_url('SET', 'GET', 'single', {'id': self.id})
        self._manager._metadata.set(base_url, fp)

        # reload myself
        r = self._client.request('GET', base_url)
        return self._deserialize(r.json(), self._manager)
1269792
def update_metadata(self, loadbalancer, metadata, node=None):
        
        # Get the existing metadata
        md = self.get_metadata(loadbalancer, raw=True)
        id_lookup = dict([(itm["key"], itm["id"]) for itm in md])
        metadata_list = []
        # Updates must be done individually
        for key, val in metadata.items():
            try:
                meta_id = id_lookup[key]
                if node:
                    uri = "/loadbalancers/%s/nodes/%s/metadata/%s" % (
                            utils.get_id(loadbalancer), utils.get_id(node),
                            meta_id)
                else:
                    uri = "/loadbalancers/%s/metadata" % utils.get_id(loadbalancer)
                req_body = {"meta": {"value": val}}
                resp, body = self.api.method_put(uri, body=req_body)
            except KeyError:
                # Not an existing key; add to metadata_list
                metadata_list.append({"key": key, "value": val})
        if metadata_list:
            # New items; POST them
            if node:
                uri = "/loadbalancers/%s/nodes/%s/metadata" % (
                        utils.get_id(loadbalancer), utils.get_id(node))
            else:
                uri = "/loadbalancers/%s/metadata" % utils.get_id(loadbalancer)
            req_body = {"metadata": metadata_list}
            resp, body = self.api.method_post(uri, body=req_body)
536442
def metaprop(name: str, doc: str, readonly=False):
        """"""
        def get(self):
            return self.meta[name]
        get.__doc__ = "Get %s%s." % (doc, " (readonly)" if readonly else "")

        if not readonly:
            def set(self, value):
                self.meta[name] = value
            set.__doc__ = "Set %s." % doc

            return property(get, set)
        return property(get)
705777
def update(self, *, name=None, position=None, visibility=None):
        

        if name is None and position is None and visibility is None:
            raise ValueError('Provide at least one parameter to update')
        data = {}
        if name:
            data['name'] = name
        if position:
            data['position'] = position
        if visibility:
            data['visibility'] = visibility

        response = self.session.patch(self.build_url(''), data=data)
        if not response:
            return False

        data = response.json()
        self.name = data.get('name', self.name)
        self.position = data.get('position', self.position)
        self.visibility = data.get('visibility', self.visibility)

        return True
296214
def update_name(self, new_name):
        

        if not dtoolcore.utils.name_is_valid(new_name):
            raise(DtoolCoreInvalidNameError())

        self._admin_metadata['name'] = new_name
        if self._storage_broker.has_admin_metadata():
            self._storage_broker.put_admin_metadata(self._admin_metadata)
1178387
function createMetaData (options = {}) {
  const metadata = {
    name: options.name, // The proejcts name
    namespace: options.namespace // The current namespace from the config, not required and should be picked up anyway, but...
  };

  // Add labels to the metadata
  // Labels here should be project name and version
  if (options.labels) {
    metadata.labels = labels(options.labels);
  }

  return metadata;
}
389967
def boolean(attr, metadata={})
      add_attribute(attr, :boolean, metadata)
      define_method("#{attr}=") do |arg|
        v = case arg
        when String then BOOLEAN_TRUE_STRINGS.include?(arg.downcase)
        when Numeric then arg == 1
        when nil then nil
        else !!arg
        end
        instance_variable_set("@#{attr}", v)
      end
      alias_method "#{attr}?", attr
    end
627110
def options(self, request, *args, **kwargs):
        
        if self.metadata_class is None:
            return self.http_method_not_allowed(request, *args, **kwargs)
        data = self.metadata_class().determine_metadata(request, self)
        return Response(data, status=status.HTTP_200_OK)