forked from apache/camel-k-runtime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
knative: support configuring the knative environment using properties a…
- Loading branch information
1 parent
057ea58
commit 7500b72
Showing
57 changed files
with
1,932 additions
and
557 deletions.
There are no files selected for viewing
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
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
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
59 changes: 59 additions & 0 deletions
59
...c/generated/java/org/apache/camel/component/knative/spi/KnativeEnvironmentConfigurer.java
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,59 @@ | ||
/* Generated by camel build tools - do NOT edit this file! */ | ||
package org.apache.camel.component.knative.spi; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.camel.CamelContext; | ||
import org.apache.camel.spi.GeneratedPropertyConfigurer; | ||
import org.apache.camel.spi.PropertyConfigurerGetter; | ||
import org.apache.camel.util.CaseInsensitiveMap; | ||
import org.apache.camel.component.knative.spi.KnativeEnvironment; | ||
|
||
/** | ||
* Generated by camel build tools - do NOT edit this file! | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public class KnativeEnvironmentConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { | ||
|
||
private static final Map<String, Object> ALL_OPTIONS; | ||
static { | ||
Map<String, Object> map = new CaseInsensitiveMap(); | ||
map.put("Resources", java.util.List.class); | ||
ALL_OPTIONS = map; | ||
} | ||
|
||
@Override | ||
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { | ||
org.apache.camel.component.knative.spi.KnativeEnvironment target = (org.apache.camel.component.knative.spi.KnativeEnvironment) obj; | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "resources": | ||
case "Resources": target.setResources(property(camelContext, java.util.List.class, value)); return true; | ||
default: return false; | ||
} | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getAllOptions(Object target) { | ||
return ALL_OPTIONS; | ||
} | ||
|
||
@Override | ||
public Object getOptionValue(Object obj, String name, boolean ignoreCase) { | ||
org.apache.camel.component.knative.spi.KnativeEnvironment target = (org.apache.camel.component.knative.spi.KnativeEnvironment) obj; | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "resources": | ||
case "Resources": return target.getResources(); | ||
default: return null; | ||
} | ||
} | ||
|
||
@Override | ||
public Object getCollectionValueType(Object target, String name, boolean ignoreCase) { | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "resources": | ||
case "Resources": return org.apache.camel.component.knative.spi.KnativeResource.class; | ||
default: return null; | ||
} | ||
} | ||
} | ||
|
128 changes: 128 additions & 0 deletions
128
.../src/generated/java/org/apache/camel/component/knative/spi/KnativeResourceConfigurer.java
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,128 @@ | ||
/* Generated by camel build tools - do NOT edit this file! */ | ||
package org.apache.camel.component.knative.spi; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.camel.CamelContext; | ||
import org.apache.camel.spi.GeneratedPropertyConfigurer; | ||
import org.apache.camel.spi.PropertyConfigurerGetter; | ||
import org.apache.camel.util.CaseInsensitiveMap; | ||
import org.apache.camel.component.knative.spi.KnativeResource; | ||
|
||
/** | ||
* Generated by camel build tools - do NOT edit this file! | ||
*/ | ||
@SuppressWarnings("unchecked") | ||
public class KnativeResourceConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { | ||
|
||
private static final Map<String, Object> ALL_OPTIONS; | ||
static { | ||
Map<String, Object> map = new CaseInsensitiveMap(); | ||
map.put("CeOverrides", java.util.Map.class); | ||
map.put("CloudEventType", java.lang.String.class); | ||
map.put("ContentType", java.lang.String.class); | ||
map.put("EndpointKind", org.apache.camel.component.knative.spi.Knative.EndpointKind.class); | ||
map.put("Filters", java.util.Map.class); | ||
map.put("Metadata", java.util.Map.class); | ||
map.put("Name", java.lang.String.class); | ||
map.put("ObjectApiVersion", java.lang.String.class); | ||
map.put("ObjectKind", java.lang.String.class); | ||
map.put("ObjectName", java.lang.String.class); | ||
map.put("Path", java.lang.String.class); | ||
map.put("Reply", java.lang.Boolean.class); | ||
map.put("Type", org.apache.camel.component.knative.spi.Knative.Type.class); | ||
map.put("Url", java.lang.String.class); | ||
ALL_OPTIONS = map; | ||
} | ||
|
||
@Override | ||
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { | ||
org.apache.camel.component.knative.spi.KnativeResource target = (org.apache.camel.component.knative.spi.KnativeResource) obj; | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "ceoverrides": | ||
case "CeOverrides": target.setCeOverrides(property(camelContext, java.util.Map.class, value)); return true; | ||
case "cloudeventtype": | ||
case "CloudEventType": target.setCloudEventType(property(camelContext, java.lang.String.class, value)); return true; | ||
case "contenttype": | ||
case "ContentType": target.setContentType(property(camelContext, java.lang.String.class, value)); return true; | ||
case "endpointkind": | ||
case "EndpointKind": target.setEndpointKind(property(camelContext, org.apache.camel.component.knative.spi.Knative.EndpointKind.class, value)); return true; | ||
case "filters": | ||
case "Filters": target.setFilters(property(camelContext, java.util.Map.class, value)); return true; | ||
case "metadata": | ||
case "Metadata": target.setMetadata(property(camelContext, java.util.Map.class, value)); return true; | ||
case "name": | ||
case "Name": target.setName(property(camelContext, java.lang.String.class, value)); return true; | ||
case "objectapiversion": | ||
case "ObjectApiVersion": target.setObjectApiVersion(property(camelContext, java.lang.String.class, value)); return true; | ||
case "objectkind": | ||
case "ObjectKind": target.setObjectKind(property(camelContext, java.lang.String.class, value)); return true; | ||
case "objectname": | ||
case "ObjectName": target.setObjectName(property(camelContext, java.lang.String.class, value)); return true; | ||
case "path": | ||
case "Path": target.setPath(property(camelContext, java.lang.String.class, value)); return true; | ||
case "reply": | ||
case "Reply": target.setReply(property(camelContext, java.lang.Boolean.class, value)); return true; | ||
case "type": | ||
case "Type": target.setType(property(camelContext, org.apache.camel.component.knative.spi.Knative.Type.class, value)); return true; | ||
case "url": | ||
case "Url": target.setUrl(property(camelContext, java.lang.String.class, value)); return true; | ||
default: return false; | ||
} | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getAllOptions(Object target) { | ||
return ALL_OPTIONS; | ||
} | ||
|
||
@Override | ||
public Object getOptionValue(Object obj, String name, boolean ignoreCase) { | ||
org.apache.camel.component.knative.spi.KnativeResource target = (org.apache.camel.component.knative.spi.KnativeResource) obj; | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "ceoverrides": | ||
case "CeOverrides": return target.getCeOverrides(); | ||
case "cloudeventtype": | ||
case "CloudEventType": return target.getCloudEventType(); | ||
case "contenttype": | ||
case "ContentType": return target.getContentType(); | ||
case "endpointkind": | ||
case "EndpointKind": return target.getEndpointKind(); | ||
case "filters": | ||
case "Filters": return target.getFilters(); | ||
case "metadata": | ||
case "Metadata": return target.getMetadata(); | ||
case "name": | ||
case "Name": return target.getName(); | ||
case "objectapiversion": | ||
case "ObjectApiVersion": return target.getObjectApiVersion(); | ||
case "objectkind": | ||
case "ObjectKind": return target.getObjectKind(); | ||
case "objectname": | ||
case "ObjectName": return target.getObjectName(); | ||
case "path": | ||
case "Path": return target.getPath(); | ||
case "reply": | ||
case "Reply": return target.getReply(); | ||
case "type": | ||
case "Type": return target.getType(); | ||
case "url": | ||
case "Url": return target.getUrl(); | ||
default: return null; | ||
} | ||
} | ||
|
||
@Override | ||
public Object getCollectionValueType(Object target, String name, boolean ignoreCase) { | ||
switch (ignoreCase ? name.toLowerCase() : name) { | ||
case "ceoverrides": | ||
case "CeOverrides": return java.lang.String.class; | ||
case "filters": | ||
case "Filters": return java.lang.String.class; | ||
case "metadata": | ||
case "Metadata": return java.lang.String.class; | ||
default: return null; | ||
} | ||
} | ||
} | ||
|
2 changes: 2 additions & 0 deletions
2
...ces/org/apache/camel/configurer/org.apache.camel.component.knative.spi.KnativeEnvironment
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,2 @@ | ||
# Generated by camel build tools - do NOT edit this file! | ||
class=org.apache.camel.component.knative.spi.KnativeEnvironmentConfigurer |
2 changes: 2 additions & 0 deletions
2
...rvices/org/apache/camel/configurer/org.apache.camel.component.knative.spi.KnativeResource
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,2 @@ | ||
# Generated by camel build tools - do NOT edit this file! | ||
class=org.apache.camel.component.knative.spi.KnativeResourceConfigurer |
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
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
Oops, something went wrong.