Return a fully-qualified session_entity_type string.
511709
def session_entity_type_path(cls, project, session, entity_type):
        """"""
        return google.api_core.path_template.expand(
            'projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}',
            project=project,
            session=session,
            entity_type=entity_type,
        )
1367144
static String getJunctionTableIndexName(
      EntityType entityType, Attribute attr, Attribute idxAttr) {
    String indexNamePostfix = "_idx";
    int nrAdditionalChars = 1 + indexNamePostfix.length();
    String entityPart =
        generateId(entityType, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    String attrPart = generateId(attr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    String idxAttrPart = generateId(idxAttr, (MAX_IDENTIFIER_BYTE_LENGTH - nrAdditionalChars) / 3);
    return getQuotedIdentifier(entityPart + '_' + attrPart + '_' + idxAttrPart + indexNamePostfix);
  }
635932
def db(self, connection_string=None):
        """"""

        connection_string = connection_string or self.settings["db"]

        if not hasattr(self, "_db_conns"):
            self._db_conns = {}
        if not connection_string in self._db_conns:
            self._db_conns[connection_string] = oz.sqlalchemy.session(connection_string=connection_string)

        return self._db_conns[connection_string]
382419
def get_session_data(ctx, username, password, salt, server_public, private, preset):
    """"""
    session = SRPClientSession(
        SRPContext(username, password, prime=preset[0], generator=preset[1]),
        private=private)

    session.process(server_public, salt, base64=True)

    click.secho('Client session key: %s' % session.key_b64)
    click.secho('Client session key proof: %s' % session.key_proof_b64)
    click.secho('Client session key hash: %s' % session.key_proof_hash_b64)
473674
def get_field_info(wrapper,entity_type):
    ''
    fields = wrapper.new('GetFieldInfo')
    fields.psObjectType = entity_type
    return wrapper.GetFieldInfo(fields)
188471
@Override
	public List<RecordSessionUrl> getUrlsForType (int type) throws DatabaseException {
    	SqlPreparedStatementWrapper psGetAlluRLSForType = null;
        try {
        	psGetAlluRLSForType = DbSQL.getSingleton().getPreparedStatement("sessionurl.ps.geturlsfortype");
			psGetAlluRLSForType.getPs().setInt(1, type);
			try (ResultSet rs = psGetAlluRLSForType.getPs().executeQuery()) {
				List<RecordSessionUrl> result = new ArrayList<>();
				while (rs.next()) {
					result.add(new RecordSessionUrl(rs.getLong(URLID), rs.getInt(TYPE), rs.getString(URL)));
				}
				return result;
			}
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psGetAlluRLSForType);
		}
    }
154075
def type(self) -> EntityType:
        
        if self.data is None:
            guessed_type = self.client.guess_entity_type(self.id)
            if guessed_type is not None:
                return guessed_type
            # If guessing was failed follow the straightforward way.
        return EntityType(self.attributes['type'])
179657
private function getPHPDocType($db_type, $relation = null)
    {
        switch ($db_type) {
            case 'datetime':
                return 'string|\Carbon\Carbon';
            case 'text':
                return 'string';
            case '1t1':
            case 'mt1':
                return '\\'.$this->commandData->config->nsModel.'\\'.$relation->inputs[0].' '.camel_case($relation->inputs[0]);
            case '1tm':
                return '\Illuminate\Database\Eloquent\Collection'.' '.$relation->inputs[0];
            case 'mtm':
            case 'hmt':
                return '\Illuminate\Database\Eloquent\Collection'.' '.camel_case($relation->inputs[1]);
            default:
                return $db_type;
        }
    }
160462
def dump_type(self, obj):
        """"""
        if not isinstance(obj.relation_type, RelationType):
            return resolve_relation_type_config(obj.relation_type).name
        else:
            return obj.relation_type.name
1171118
def get_entity_description(entity):
    

    try:
        entity_name = entity.__name__.strip('_')
    except AttributeError:
        # entity is a class instance
        entity_name = entity.__class__.__name__

    label = '* %s' % formatting.camelcase_to_spaces(entity_name)
    if entity.__doc__ is not None:
        entity_docstring = formatting.dedent(smart_text(entity.__doc__)).replace('\n', '\n\t')
        return '%s\n * %s' % (label, entity_docstring)

    return label
472818
def _get_actual_reset_type(self, reset_type):
        """"""
        
        # Default to reset_type session option if reset_type parameter is None. If the session
        # option isn't set, then use the core's default reset type.
        if reset_type is None:
            if 'reset_type' not in self.session.options:
                reset_type = self.default_reset_type
            else:
                try:
                    # Convert session option value to enum.
                    resetOption = self.session.options['reset_type']
                    reset_type = cmdline.convert_reset_type(resetOption)
                    
                    # The converted option will be None if the option value is 'default'.
                    if reset_type is None:
                        reset_type = self.default_reset_type
                except ValueError:
                    reset_type = self.default_reset_type
        else:
            assert isinstance(reset_type, Target.ResetType)
        
        # If the reset type is just SW, then use our default software reset type.
        if reset_type is Target.ResetType.SW:
            reset_type = self.default_software_reset_type
        
        # Fall back to emulated sw reset if the vectreset is specified and the core doesn't support it.
        if (reset_type is Target.ResetType.SW_VECTRESET) and (not self._supports_vectreset):
            reset_type = Target.ResetType.SW_EMULATED
        
        return reset_type
360649
protected EntityType getEntityType(String attr) {
    String alias = Strings.substringBefore(attr, ".");
    EntityType entityType = (EntityType) entityTypes.get(alias);
    if (null == entityType) entityType = (EntityType) entityTypes.get(attr);
    return entityType;
  }
1008660
def create_entity_type(project_id, display_name, kind):
    """"""
    import dialogflow_v2 as dialogflow
    entity_types_client = dialogflow.EntityTypesClient()

    parent = entity_types_client.project_agent_path(project_id)
    entity_type = dialogflow.types.EntityType(
        display_name=display_name, kind=kind)

    response = entity_types_client.create_entity_type(parent, entity_type)

    print('Entity type created: \n{}'.format(response))
1236012
def get_full_xml_representation(entity, private_key):
    
    from federation.entities.diaspora.mappers import get_outbound_entity
    diaspora_entity = get_outbound_entity(entity, private_key)
    xml = diaspora_entity.to_xml()
    return "<XML><post>%s</post></XML>" % etree.tostring(xml).decode("utf-8")
131742
def session_path(cls, project, session):
        """"""
        return google.api_core.path_template.expand(
            'projects/{project}/agent/sessions/{session}',
            project=project,
            session=session,
        )
543310
def to_cls(self):
        """"""
        # Checks if ``to_cls`` is a string
        #   If it is, checks if the entity is imported and available
        #   If it is, register the class
        try:
            if isinstance(self._to_cls, str):
                self._to_cls = fetch_entity_cls_from_registry(self._to_cls)
        except AssertionError:
            # Preserve ``to_cls`` as a string and we will hook up the entity later
            pass

        return self._to_cls
491855
def delete_session_entity_type(project_id, session_id,
                               entity_type_display_name):
    """"""
    import dialogflow_v2 as dialogflow
    session_entity_types_client = dialogflow.SessionEntityTypesClient()

    session_entity_type_name = (
        session_entity_types_client.session_entity_type_path(
            project_id, session_id, entity_type_display_name))

    session_entity_types_client.delete_session_entity_type(
        session_entity_type_name)