Create a new EntityInstance

        :param unicode identity: Unique identity of the Entity

        :returns: Newly created EntityInstance
        :rtype: twilio.rest.authy.v1.service.entity.EntityInstance
490680
def create(self, identity):
        
        data = values.of({'Identity': identity, })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return EntityInstance(self._version, payload, service_sid=self._solution['service_sid'], )
552373
public static Identity createExtendedIdentity(Document doc) throws MarshalException {
		String idName = DomHelpers.prepareExtendedIdentifier(doc);
		return createIdentity(IdentityType.other, idName, null,
				IfmapStrings.OTHER_TYPE_EXTENDED_IDENTIFIER);
	}
434883
def create_entity_class(self):
        '''
        
        '''
        entity = Entity()

        # Partition key and row key must be strings and are required
        entity.PartitionKey = 'pk{}'.format(str(uuid.uuid4()).replace('-', ''))
        entity.RowKey = 'rk{}'.format(str(uuid.uuid4()).replace('-', ''))

        # Some basic types are inferred
        entity.age = 39  # EdmType.INT64
        entity.large = 933311100  # EdmType.INT64
        entity.sex = 'male'  # EdmType.STRING
        entity.married = True  # EdmType.BOOLEAN
        entity.ratio = 3.1  # EdmType.DOUBLE
        entity.birthday = datetime(1970, 10, 4)  # EdmType.DATETIME

        # Binary, Int32 and GUID must be explicitly typed
        entity.binary = EntityProperty(EdmType.BINARY, b'xyz')
        entity.other = EntityProperty(EdmType.INT32, 20)
        entity.clsid = EntityProperty(EdmType.GUID, 'c9da6455-213d-42c9-9a79-3e9149a57833')
        return entity
151021
def create_entity_dict(self):
        '''
        
        '''
        entity = {}

        # Partition key and row key must be strings and are required
        entity['PartitionKey'] = 'pk{}'.format(str(uuid.uuid4()).replace('-', ''))
        entity['RowKey'] = 'rk{}'.format(str(uuid.uuid4()).replace('-', ''))

        # Some basic types are inferred
        entity['age'] = 39  # EdmType.INT64
        entity['large'] = 933311100  # EdmType.INT64
        entity['sex'] = 'male'  # EdmType.STRING
        entity['married'] = True  # EdmType.BOOLEAN
        entity['ratio'] = 3.1  # EdmType.DOUBLE
        entity['birthday'] = datetime(1970, 10, 4)  # EdmType.DATETIME

        # Binary, Int32 and GUID must be explicitly typed
        entity['binary'] = EntityProperty(EdmType.BINARY, b'xyz')
        entity['other'] = EntityProperty(EdmType.INT32, 20)
        entity['clsid'] = EntityProperty(EdmType.GUID, 'c9da6455-213d-42c9-9a79-3e9149a57833')
        return entity
627286
public static UnicodeUtil getInstance() {

    if (instance == null) {
      synchronized (UnicodeUtilImpl.class) {
        if (instance == null) {
          new UnicodeUtilImpl().initialize();
        }
      }
    }
    return instance;
  }
1279597
def create_context(id_type=None, env=None, username=None, password=None,
        tenant_id=None, tenant_name=None, api_key=None, verify_ssl=None):
    
    if env:
        set_environment(env)
    return _create_identity(id_type=id_type, username=username,
            password=password, tenant_id=tenant_id, tenant_name=tenant_name,
            api_key=api_key, verify_ssl=verify_ssl, return_context=True)
33483
def add_person_entity(self, entity, instances_json):
        
        check_type(instances_json, dict, [entity.plural])
        entity_ids = list(map(str, instances_json.keys()))
        self.persons_plural = entity.plural
        self.entity_ids[self.persons_plural] = entity_ids
        self.entity_counts[self.persons_plural] = len(entity_ids)

        for instance_id, instance_object in instances_json.items():
            check_type(instance_object, dict, [entity.plural, instance_id])
            self.init_variable_values(entity, instance_object, str(instance_id))

        return self.get_ids(entity.plural)
620443
def add_entity(self, entity):
        
        self._ensure_loaded()
        self.entities[str(entity)] = entity
1135890
private static ModelNode createOperation(ServerIdentity identity) {
        // The server address
        final ModelNode address = new ModelNode();
        address.add(ModelDescriptionConstants.HOST, identity.getHostName());
        address.add(ModelDescriptionConstants.RUNNING_SERVER, identity.getServerName());
        //
        final ModelNode operation = OPERATION.clone();
        operation.get(ModelDescriptionConstants.OP_ADDR).set(address);
        return operation;
    }
939966
def create_entity2user(enti_uid, user_id):
        '''
        
        '''
        record = TabEntity2User.select().where(
            (TabEntity2User.entity_id == enti_uid) & (TabEntity2User.user_id == user_id)
        )

        if record.count() > 0:
            record = record.get()
            MEntity2User.count_increate(record.uid, record.count)
        else:
            TabEntity2User.create(
                uid=tools.get_uuid(),
                entity_id=enti_uid,
                user_id=user_id,
                count=1,
                timestamp=time.time()
            )
1315057
def create(cls, *args, **kwargs) -> 'Entity':
        
        logger.debug(
            f'Creating new `{cls.__name__}` object using data {kwargs}')

        model_cls = repo_factory.get_model(cls)
        repository = repo_factory.get_repository(cls)

        try:
            # Build the entity from the input arguments
            # Raises validation errors, if any, at this point
            entity = cls(*args, **kwargs)

            # Do unique checks, create this object and return it
            entity._validate_unique()

            # Perform Pre-Save Actions
            entity.pre_save()

            # Build the model object and create it
            model_obj = repository.create(model_cls.from_entity(entity))

            # Update the auto fields of the entity
            for field_name, field_obj in entity.meta_.declared_fields.items():
                if isinstance(field_obj, Auto):
                    if isinstance(model_obj, dict):
                        field_val = model_obj[field_name]
                    else:
                        field_val = getattr(model_obj, field_name)
                    setattr(entity, field_name, field_val)

            # Set Entity status to saved
            entity.state_.mark_saved()

            # Perform Post-Save Actions
            entity.post_save()

            return entity
        except ValidationError:
            # FIXME Log Exception
            raise
756582
def encode(self, entity):
        
        encoded = self._dict_encoder.encode(entity)

        if sys.version_info[0] == 2:
            result = json.dumps(encoded, ensure_ascii=False,
                                default=_iso_handler, encoding='latin1')
        else:
            # For Python 3
            result = json.dumps(encoded, ensure_ascii=False,
                                default=_iso_handler)

        return result
1233663
def get_entity(self, etype, entity_id):
        
        r = fapi.get_entity(self.namespace, self.name, etype,
                               entity_id, self.api_url)
        fapi._check_response_code(r, 200)
        dresp = r.json()
        return Entity(etype, entity_id, dresp['attributes'])
91019
public static Repository newInstance(String uid)
    {
        Repository repository = new Repository();
        repository.setUid(uid);
        return repository;
    }
10571
public Entity newEntity(QualifiedName id, String label) {
	Entity res = newEntity(id);
	if (label != null)
	    res.getLabel().add(newInternationalizedString(label));
	return res;
    }
1120860
public UserEntity createNewUser(String userId) {
    checkAuthorization(Permissions.CREATE, Resources.USER, null);
    return new UserEntity(userId);
  }
427952
def create(server, name, project, apikey, output, threshold, verbose):
    
    if verbose:
        log("Entity Matching Server: {}".format(server))

    if threshold is None:
        raise ValueError("Please provide a threshold")

    # Create a new run
    try:
        response = run_create(server, project, apikey, threshold, name)
    except ServiceError as e:
        log("Unexpected response with status {}".format(e.status_code))
        log(e.text)
    else:
        json.dump(response, output)