Sets the enrollment_identity of this EnrollmentId.
        Enrollment identity.

        :param enrollment_identity: The enrollment_identity of this EnrollmentId.
        :type: str
507182
def enrollment_identity(self, enrollment_identity):
        
        if enrollment_identity is None:
            raise ValueError("Invalid value for `enrollment_identity`, must not be `None`")
        if enrollment_identity is not None and not re.search('^A-[A-Za-z0-9:]{95}$', enrollment_identity):
            raise ValueError("Invalid value for `enrollment_identity`, must be a follow pattern or equal to `/^A-[A-Za-z0-9:]{95}$/`")

        self._enrollment_identity = enrollment_identity
625406
def _set_client_id(self, client_id):
        
        with self.lock:
            if self.client_id is None:
                self.client_id = client_id
720075
public void setIdentities(java.util.Collection<IdentityDescription> identities) {
        if (identities == null) {
            this.identities = null;
            return;
        }

        this.identities = new java.util.ArrayList<IdentityDescription>(identities);
    }
957089
def set_info(self, info):
        
        idx = info.get(self.name)
        if idx is not None:
            self.__dict__.update(idx)
61586
def _identity_loader(self) -> Union[Identity, None]:
        
        if not isinstance(current_user._get_current_object(), AnonymousUser):
            return Identity(current_user.id)
521321
def register(self, notification_cls=None):
        
        self.loaded = True
        display_names = [n.display_name for n in self.registry.values()]
        if (
            notification_cls.name not in self.registry
            and notification_cls.display_name not in display_names
        ):
            self.registry.update({notification_cls.name: notification_cls})

            models = getattr(notification_cls, "models", [])
            if not models and getattr(notification_cls, "model", None):
                models = [getattr(notification_cls, "model")]
            for model in models:
                try:
                    if notification_cls.name not in [
                        n.name for n in self.models[model]
                    ]:
                        self.models[model].append(notification_cls)
                except KeyError:
                    self.models.update({model: [notification_cls]})
        else:
            raise AlreadyRegistered(
                f"Notification {notification_cls.name}: "
                f"{notification_cls.display_name} is already registered."
            )
1194077
protected function setIdentity()
    {
        $this->_id 					  = $this->_user->id;
        $this->setState('email', 		$this->_user->email);
        $this->setState('username', 	$this->_user->username);

        // TODO: Replace all instances of displayName with username
        $this->setState('displayName',  $this->_user->username);
        $this->setState('status', 		$this->_user->status);
        $this->setState('role', 		$this->_user->user_role);
        $this->setstate('apiKey',       $this->generateAPIKey());

        $this->errorCode = self::ERROR_NONE;

        return;
    }
51526
def delete_identity(self, identity):
        
        if isinstance(identity, zobjects.Identity):
            self.request(
                'DeleteIdentity', {'identity': identity.to_selector()})
        else:
            self.request('DeleteIdentity', {'identity': {'name': identity}})
331146
def create_enrollment_term(self, account_id, enrollment_term_end_at=None, enrollment_term_name=None, enrollment_term_sis_term_id=None, enrollment_term_start_at=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - account_id
        """ID"""
        path["account_id"] = account_id

        # OPTIONAL - enrollment_term[name]
        """The name of the term."""
        if enrollment_term_name is not None:
            data["enrollment_term[name]"] = enrollment_term_name

        # OPTIONAL - enrollment_term[start_at]
        """The day/time the term starts.
        Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z."""
        if enrollment_term_start_at is not None:
            data["enrollment_term[start_at]"] = enrollment_term_start_at

        # OPTIONAL - enrollment_term[end_at]
        """The day/time the term ends.
        Accepts times in ISO 8601 format, e.g. 2015-01-10T18:48:00Z."""
        if enrollment_term_end_at is not None:
            data["enrollment_term[end_at]"] = enrollment_term_end_at

        # OPTIONAL - enrollment_term[sis_term_id]
        """The unique SIS identifier for the term."""
        if enrollment_term_sis_term_id is not None:
            data["enrollment_term[sis_term_id]"] = enrollment_term_sis_term_id

        self.logger.debug("POST /api/v1/accounts/{account_id}/terms with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("POST", "/api/v1/accounts/{account_id}/terms".format(**path), data=data, params=params, single_item=True)
950197
def set_identifiertext(self, index):
        
        dr = QtCore.Qt.DisplayRole
        t = index.model().index(index.row(), 17, index.parent()).data(dr)
        if t is None:
            t = -1
        else:
            t = t+1
        self.identifier_lb.setText("#%s" % t)
1268602
def set_student_accommodation_type(self, student_accommodation_type):
        
        if not isinstance(student_accommodation_type, StudentAccommodationType):
            raise DaftException("student_accommodation_type should be an instance of StudentAccommodationType.")

        self._student_accommodation_type = str(student_accommodation_type)
1137009
public function setIdentity($identity = null)
    {
        if (null === $identity) {
            $this->setResult();
        }

        $this->setParam('identity', $identity);

        return $this;
    }
1189052
def create(self, id):
        
        resp = self.client.accounts.create(id=id)
        self.display(resp)
384575
def pop_identity(self):
        
        popped = None
        stack = self.get_run_as_identifiers_stack()

        if (stack):
            popped = stack.pop()
            if (stack):
                # persist the changed stack to the session
                session = self.get_session()
                session.set_internal_attribute(self.run_as_identifiers_session_key, stack)

            else:
                # stack is empty, remove it from the session:
                self.clear_run_as_identities()
        return popped
1036178
def __set_identifier(self, value):
        '''
        
        '''
        if not value or not len(value):
            raise ValueError("Invalid invoice ID")

        self.__identifier = value
612161
def register_account_control(self, control):
        
        if self.initialized:
            raise RegisterAccountControlPostInit()
        self.account_controls.append(control)
303921
public function setUserByIdentity(IdentityInterface $identity)
    {
        $user = clone $this->getUser();
        $user->setIdentity($identity);
        $this->setUser($user);
    }