Question: I currently have this:

```
multibranchPipelineJob("myjob") {
  branchSources {
    branchSource {
      source {
        bitbucket {
          credentialsId('bitbucket-login-user-pass')
          repoOwner('myteam')
          repository('myrepo')
          autoRegisterHook(true)
        }
      }
    }
  }
}

```

But I also need to add the following settings:
[![enter image description here](https://i.stack.imgur.com/y4pEO.png)](https://i.stack.imgur.com/y4pEO.png)

How do I add these settings in the config? Are they "traits" where do I go to see what traits I have available?

Answer: 
this is what I use (bitbucket wrapped with `organizationFolder`):

```
organizationFolder('example') {
    description('This contains branch source jobs for Bitbucket')
    displayName('The Organization Folder')
    triggers {
        periodic(86400)
    }
    organizations {
        bitbucket {
          repoOwner('myorg')
          credentialsId('BITBUCKET_CRED')
          autoRegisterHooks(false)
          traits {
            sourceRegexFilter {
              // A Java regular expression to restrict the project names.
              regex('.*')
            }
          }
        }
    }
    properties {
        mavenConfigFolderOverrideProperty {
            override(true)
            settings {
                settingsConfigId('DEFAULT_MAVEN_SETTINGS')
            }
        }
    }
    // discover Branches (workaround due to JENKINS-46202)
    configure { node ->
        // node represents <jenkins.branch.OrganizationFolder>        
        def traits = node / 'navigators' / 'com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator' / 'traits'
        traits << 'com.cloudbees.jenkins.plugins.bitbucket.BranchDiscoveryTrait' {
            strategyId(3) // detect all branches
        }
    }    
}

```
You can have a look at the jobDSL-API-Viewer of your jenkins-instance. This will show you all available jodDSL functions for your instance (jobDSL for installed plugins):

<https://your.jenkins.url/plugin/job-dsl/api-viewer/index.html>