Deletes a specific Knowledge base.

    Args:
        project_id: The GCP project linked with the agent.
        knowledge_base_id: Id of the Knowledge base.
505430
def delete_knowledge_base(project_id, knowledge_base_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.KnowledgeBasesClient()
    knowledge_base_path = client.knowledge_base_path(
        project_id, knowledge_base_id)

    response = client.delete_knowledge_base(knowledge_base_path)

    print('Knowledge Base deleted.'.format(response))
346473
function deleteProject(_ref9, _ref10) {
    var state = _ref9.state,
        commit = _ref9.commit,
        rootState = _ref9.rootState;

    var _ref11 = _slicedToArray(_ref10, 2),
        pid = _ref11[0],
        localRemove = _ref11[1];

    if (localRemove) commit('c3s/project/SET_PROJECT', null);
    return makeRequest(commit, rootState.c3s.client.apis.Projects.delete_project, {
      id: pid
    }, undefined);
  }
1043608
def delete_project(self, resource):
        
        self.project_service.set_auth(self._token_project)
        self.project_service.delete(resource)
272019
def delete(self, resource_id, **kwargs):
        

        return self.client._delete(self._url(resource_id), **kwargs)
461733
def project_delete_event(self, proj_info):
        """"""

        LOG.debug("Processing project_delete_event...")
        proj_id = proj_info.get('resource_info')
        proj_name = self.get_project_name(proj_id)
        if proj_name:
            try:
                self.dcnm_client.delete_project(proj_name,
                                                self.cfg.dcnm.
                                                default_partition_name)
            except dexc.DfaClientRequestFailed:
                # Failed to delete project in DCNM.
                # Save the info and mark it as failure and retry it later.
                LOG.error("Failed to create project %s on DCNM.",
                          proj_name)
                self.update_project_info_cache(proj_id, name=proj_name,
                                               opcode='delete',
                                               result=constants.DELETE_FAIL)
            else:
                self.update_project_info_cache(proj_id, opcode='delete')
                LOG.debug('Deleted project:%s', proj_name)
            self.project_delete_notif(proj_id, proj_name)
141114
def drop_project(project_name):
    
    conn, c = open_data_base_connection()
    # Need to delete all the run_tables before removing the project_table and the entry from the main_table
    run_table_name = project_name + '_run_table'

    c.execute("SELECT run_name FROM {}".format(run_table_name))
    run_names = np.array(c.fetchall()).squeeze(axis=1)

    # remove one run at a time
    for run in run_names:
        drop_run(project_name, run)

    c.execute("DROP TABLE IF EXISTS {}".format(run_table_name))

    # Remove the project row from main table
    c.execute("""DELETE FROM main_table WHERE project_name='{}'""".format(project_name))
    conn.commit()
    print("{} project deleted".format(project_name))
498081
def delete_project(self, project_name):
        
        headers = {}
        params = {}
        resource = "/"

        (resp, header) = self._send("DELETE", project_name, None, resource, params, headers)
        return DeleteProjectResponse(header, resp)
346506
def delete_cli(access_token, project_member_id, base_url=OH_BASE_URL,
               file_basename=None, file_id=None, all_files=False):
    
    response = delete_file(access_token, project_member_id,
                           base_url, file_basename, file_id, all_files)
    if (response.status_code == 200):
        print("File deleted successfully")
    else:
        print("Bad response while deleting file.")
229295
def delete_project(self, project_name):
        
        project = self._get_project_for_name(project_name)
        project.delete()
        self.clear_project_cache()
607652
def delete(
        self
    ):
        

        projectTitle = self.title
        theseProjects = self.parent.projects[:]
        for p in theseProjects:
            if p.title == projectTitle:
                theseProjects.remove(p)
                break
        self.parent.projects = theseProjects

        doc = self
        while doc:
            if not doc.parent:
                break
            else:
                doc = doc.parent

        doc.content = doc.to_string(indentLevel=0, title=False)

        return None
451823
def set_project_id(self, project_id):
    
    self._project_id = project_id
    if self == Context._global_context:
      du.save_project_id(self._project_id)
1087914
public void cleanupProjectArtifacts(final int projectId) {
    try {
      this.storageCleaner.cleanupProjectArtifacts(projectId);
    } catch (final Exception e) {
      log.error("Error occured during cleanup. Ignoring and continuing...", e);
    }
  }
987270
def delete(self, resource_id):
        
        resource = self._resource(resource_id)
        error_message = is_valid_method(self.__model__, resource)
        if error_message:
            raise BadRequestException(error_message)
        db.session().delete(resource)
        db.session().commit()
        return self._no_content_response()
500281
def list_knowledge_bases(project_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.KnowledgeBasesClient()
    project_path = client.project_path(project_id)

    print('Knowledge Bases for: {}'.format(project_id))
    for knowledge_base in client.list_knowledge_bases(project_path):
        print(' - Display Name: {}'.format(knowledge_base.display_name))
        print(' - Knowledge ID: {}\n'.format(knowledge_base.name))
978512
public void deleteProjectBadge(Serializable projectId, Integer badgeId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBadge.URL
                + "/" + badgeId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
956142
def remove_project_avatar(self, project_id):
        
        route_values = {}
        if project_id is not None:
            route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
        self._send(http_method='DELETE',
                   location_id='54b2a2a0-859b-4d05-827c-ec4c862f641a',
                   version='5.1-preview.1',
                   route_values=route_values)
203272
def delete_team(self, project_id, team_id):
        
        route_values = {}
        if project_id is not None:
            route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
        if team_id is not None:
            route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
        self._send(http_method='DELETE',
                   location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
                   version='5.1-preview.2',
                   route_values=route_values)