-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CAMEL-20333 camel-kotlin-api: added autogen Language DSL
- Loading branch information
Showing
34 changed files
with
1,972 additions
and
554 deletions.
There are no files selected for viewing
82 changes: 82 additions & 0 deletions
82
...amel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/BeanLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import java.lang.Class | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.MethodCallExpression | ||
|
||
public fun bean(bean: String, i: BeanLanguageDsl.() -> Unit = {}): MethodCallExpression { | ||
val def = MethodCallExpression(bean) | ||
BeanLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class BeanLanguageDsl( | ||
def: MethodCallExpression, | ||
) { | ||
public val def: MethodCallExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun ref(ref: String) { | ||
def.ref = ref | ||
} | ||
|
||
public fun method(method: String) { | ||
def.method = method | ||
} | ||
|
||
public fun beanType(beanType: Class<out Any>) { | ||
def.beanType = beanType | ||
} | ||
|
||
public fun scope(scope: String) { | ||
def.scope = scope | ||
} | ||
|
||
public fun validate(validate: Boolean) { | ||
def.validate = validate.toString() | ||
} | ||
|
||
public fun validate(validate: String) { | ||
def.validate = validate | ||
} | ||
|
||
public fun resultType(resultType: Class<out Any>) { | ||
def.resultType = resultType | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ConstantLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import java.lang.Class | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.ConstantExpression | ||
|
||
public fun constant(constant: String, i: ConstantLanguageDsl.() -> Unit = {}): ConstantExpression { | ||
val def = ConstantExpression(constant) | ||
ConstantLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class ConstantLanguageDsl( | ||
def: ConstantExpression, | ||
) { | ||
public val def: ConstantExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun resultType(resultType: Class<out Any>) { | ||
def.resultType = resultType | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...l-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/CsimpleLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import java.lang.Class | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.CSimpleExpression | ||
|
||
public fun csimple(csimple: String, i: CsimpleLanguageDsl.() -> Unit = {}): CSimpleExpression { | ||
val def = CSimpleExpression(csimple) | ||
CsimpleLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class CsimpleLanguageDsl( | ||
def: CSimpleExpression, | ||
) { | ||
public val def: CSimpleExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun resultType(resultType: Class<out Any>) { | ||
def.resultType = resultType | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
79 changes: 79 additions & 0 deletions
79
...otlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/DatasonnetLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import java.lang.Class | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.DatasonnetExpression | ||
|
||
public fun datasonnet(datasonnet: String, i: DatasonnetLanguageDsl.() -> Unit = {}): | ||
DatasonnetExpression { | ||
val def = DatasonnetExpression(datasonnet) | ||
DatasonnetLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class DatasonnetLanguageDsl( | ||
def: DatasonnetExpression, | ||
) { | ||
public val def: DatasonnetExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun bodyMediaType(bodyMediaType: String) { | ||
def.bodyMediaType = bodyMediaType | ||
} | ||
|
||
public fun outputMediaType(outputMediaType: String) { | ||
def.outputMediaType = outputMediaType | ||
} | ||
|
||
public fun variableName(variableName: String) { | ||
def.variableName = variableName | ||
} | ||
|
||
public fun headerName(headerName: String) { | ||
def.headerName = headerName | ||
} | ||
|
||
public fun propertyName(propertyName: String) { | ||
def.propertyName = propertyName | ||
} | ||
|
||
public fun resultType(resultType: Class<out Any>) { | ||
def.resultType = resultType | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
...api/src/generated/kotlin/org/apache/camel/kotlin/languages/ExchangepropertyLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.ExchangePropertyExpression | ||
|
||
public fun exchangeProperty(exchangeProperty: String, i: ExchangepropertyLanguageDsl.() -> Unit = | ||
{}): ExchangePropertyExpression { | ||
val def = ExchangePropertyExpression(exchangeProperty) | ||
ExchangepropertyLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class ExchangepropertyLanguageDsl( | ||
def: ExchangePropertyExpression, | ||
) { | ||
public val def: ExchangePropertyExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...amel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/FileLanguageDsl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.camel.kotlin.languages | ||
|
||
import java.lang.Class | ||
import kotlin.Any | ||
import kotlin.Boolean | ||
import kotlin.String | ||
import kotlin.Unit | ||
import org.apache.camel.kotlin.CamelDslMarker | ||
import org.apache.camel.model.language.SimpleExpression | ||
|
||
public fun `file`(`file`: String, i: FileLanguageDsl.() -> Unit = {}): SimpleExpression { | ||
val def = SimpleExpression(file) | ||
FileLanguageDsl(def).apply(i) | ||
return def | ||
} | ||
|
||
@CamelDslMarker | ||
public class FileLanguageDsl( | ||
def: SimpleExpression, | ||
) { | ||
public val def: SimpleExpression | ||
|
||
init { | ||
this.def = def | ||
} | ||
|
||
public fun id(id: String) { | ||
def.id = id | ||
} | ||
|
||
public fun resultType(resultType: Class<out Any>) { | ||
def.resultType = resultType | ||
} | ||
|
||
public fun trim(trim: Boolean) { | ||
def.trim = trim.toString() | ||
} | ||
|
||
public fun trim(trim: String) { | ||
def.trim = trim | ||
} | ||
} |
Oops, something went wrong.