Set the object attributes for a single object and resolve the
        qualifiers. This sets attributes for Properties, Methods, and
        Parameters.
9698
def _set_new_object(self, new_obj, inherited_obj, new_class, superclass,
                        qualifier_repo, propagated, type_str):
        
        assert isinstance(new_obj, (CIMMethod, CIMProperty, CIMParameter))
        if inherited_obj:
            inherited_obj_qual = inherited_obj.qualifiers
        else:
            inherited_obj_qual = None

        if propagated:
            assert superclass is not None

        new_obj.propagated = propagated
        if propagated:
            assert inherited_obj is not None
            new_obj.class_origin = inherited_obj.class_origin
        else:
            assert inherited_obj is None
            new_obj.class_origin = new_class.classname
        self._resolve_qualifiers(new_obj.qualifiers,
                                 inherited_obj_qual,
                                 new_class,
                                 superclass,
                                 new_obj.name, type_str,
                                 qualifier_repo,
                                 propagate=propagated)
755827
def set_attributes(self, **kwargs):
        
        if self._subresource_map:
            self.set_subresources(**kwargs)
            for key in self._subresource_map.keys():
                # Don't let these attributes be overridden later
                kwargs.pop(key, None)
        for field, value in kwargs.items():
            if field in self.Meta.attributes:
                setattr(self, field, value)
290636
public static void setProperty(Object obj, String propertyName, final Object value) {
		Method method = getSetterMethod(obj.getClass(), propertyName, value.getClass());
		if (method != null) {
			invokeMethod(obj, method, value);
		} else {
			setFieldValue(obj, propertyName, value);
		}
	}
119902
def _set_attributes(self):
        """"""
        for parameter, data in self._data.items():
            if isinstance(data, dict) or isinstance(data, OrderedDict):
                field_names, field_values = zip(*data.items())
                sorted_indices = np.argsort(field_names)
                attr = namedtuple(
                    parameter, [field_names[i] for i in sorted_indices]
                )
                setattr(
                    self, parameter,
                    attr(*[field_values[i] for i in sorted_indices])
                )
            else:
                setattr(self, parameter, data)
1134567
public void set(String name, Object obj) throws IOException {
        if (!(obj instanceof Integer)) {
            throw new IOException("Attribute must be of type Integer.");
        }
        if (name.equalsIgnoreCase(REASON)) {
            reasonCode = ((Integer)obj).intValue();
        } else {
            throw new IOException
                ("Name not supported by CRLReasonCodeExtension");
        }
        encodeThis();
    }
726466
def set_attributes(self, **attributes):
        

        auto_set = IxeObject.get_auto_set()
        IxeObject.set_auto_set(False)
        for name, value in attributes.items():
            setattr(self, name, value)
        if auto_set:
            self.ix_set()
        IxeObject.set_auto_set(auto_set)
1321120
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(IS_CA)) {
            if (!(obj instanceof Boolean)) {
              throw new IOException("Attribute value should be of type Boolean.");
            }
            ca = ((Boolean)obj).booleanValue();
        } else if (name.equalsIgnoreCase(PATH_LEN)) {
            if (!(obj instanceof Integer)) {
              throw new IOException("Attribute value should be of type Integer.");
            }
            pathLen = ((Integer)obj).intValue();
        } else {
          throw new IOException("Attribute name not recognized by " +
                                "CertAttrSet:BasicConstraints.");
        }
        encodeThis();
    }
1035422
@SuppressWarnings("unchecked") // Checked with instanceof
    public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(ID)) {
            if (obj instanceof CertificatePolicyId)
                policyIdentifier = (CertificatePolicyId)obj;
            else
                throw new IOException("Attribute value must be instance " +
                    "of CertificatePolicyId.");
        } else if (name.equalsIgnoreCase(QUALIFIERS)) {
            if (policyIdentifier == null) {
                throw new IOException("Attribute must have a " +
                    "CertificatePolicyIdentifier value before " +
                    "PolicyQualifierInfo can be set.");
            }
            if (obj instanceof Set) {
                Iterator<?> i = ((Set<?>)obj).iterator();
                while (i.hasNext()) {
                    Object obj1 = i.next();
                    if (!(obj1 instanceof PolicyQualifierInfo)) {
                        throw new IOException("Attribute value must be a" +
                                    "Set of PolicyQualifierInfo objects.");
                    }
                }
                policyQualifiers = (Set<PolicyQualifierInfo>) obj;
            } else {
                throw new IOException("Attribute value must be of type Set.");
            }
        } else {
            throw new IOException("Attribute name [" + name +
                "] not recognized by PolicyInformation");
        }
    }
1053987
def _set_properties(self, data):
        
        for property in data.keys():
            if property in vars(self):
                setattr(self, property, data[property])
1263259
def set(self, obj, build_kwargs):
        """"""
        if build_kwargs is None:
            build_kwargs = {}

        cached = {}
        if 'queryset' in build_kwargs:
            cached = {
                'model': build_kwargs['queryset'].model,
                'pks': list(build_kwargs['queryset'].values_list('pk', flat=True)),
            }

        elif 'obj' in build_kwargs:
            cached = {
                'obj': build_kwargs['obj'],
            }

        if not hasattr(self._thread_local, 'cache'):
            self._thread_local.cache = {}
        self._thread_local.cache[self._get_cache_key(obj)] = cached
419124
public void set(Object... params) {
        for (int i = 0; i < params.length; i += 2) {
            hashAttributes.put((String) params[i], params[i + 1]);
        }

        if (plugin != null) {
            plugin.invalidate();
        }
    }
320657
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            if (!(obj instanceof KeyIdentifier)) {
              throw new IOException("Attribute value should be of" +
                                    " type KeyIdentifier.");
            }
            id = (KeyIdentifier)obj;
        } else {
          throw new IOException("Attribute name not recognized by " +
                "CertAttrSet:SubjectKeyIdentifierExtension.");
        }
        encodeThis();
    }
240462
public void setDirectlyRelevantTypeQualifiers(MethodDescriptor methodDescriptor, Collection<TypeQualifierValue<?>> qualifiers) {
        methodToDirectlyRelevantQualifiersMap.put(methodDescriptor, qualifiers);
        allKnownQualifiers.addAll(qualifiers);
    }
940423
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            if (!(obj instanceof KeyIdentifier)) {
              throw new IOException("Attribute value should be of " +
                                    "type KeyIdentifier.");
            }
            id = (KeyIdentifier)obj;
        } else if (name.equalsIgnoreCase(AUTH_NAME)) {
            if (!(obj instanceof GeneralNames)) {
              throw new IOException("Attribute value should be of " +
                                    "type GeneralNames.");
            }
            names = (GeneralNames)obj;
        } else if (name.equalsIgnoreCase(SERIAL_NUMBER)) {
            if (!(obj instanceof SerialNumber)) {
              throw new IOException("Attribute value should be of " +
                                    "type SerialNumber.");
            }
            serialNum = (SerialNumber)obj;
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:AuthorityKeyIdentifier.");
        }
        encodeThis();
    }
901407
def _reset(self, **kwargs):
        
        # set object attributes from params
        for key in kwargs:
            setattr(self, key, kwargs[key])

        # set defaults (if need be) where the default is not None
        for attr in self.ATTRIBUTES:
            if not hasattr(self, attr) and self.ATTRIBUTES[attr] is not None:
                setattr(self, attr, self.ATTRIBUTES[attr])
613693
public void setAttributes(Map<String, ?> attributes) {
        if (attributes == null) {
            attributes = new HashMap<>();
        }

        this.attributes.clear();
        this.attributes.putAll(attributes);
    }
635604
public void setAttribute(Object key, Object value) {
		if (attributes == null) {
			attributes = new HashMap(5);
		}
		attributes.put(key, value);
	}