|
| 1 | +/* Generated by camel build tools - do NOT edit this file! */ |
| 2 | +package org.apache.camel.component.iggy; |
| 3 | + |
| 4 | +import javax.annotation.processing.Generated; |
| 5 | +import java.util.Map; |
| 6 | + |
| 7 | +import org.apache.camel.CamelContext; |
| 8 | +import org.apache.camel.spi.ExtendedPropertyConfigurerGetter; |
| 9 | +import org.apache.camel.spi.PropertyConfigurerGetter; |
| 10 | +import org.apache.camel.spi.ConfigurerStrategy; |
| 11 | +import org.apache.camel.spi.GeneratedPropertyConfigurer; |
| 12 | +import org.apache.camel.util.CaseInsensitiveMap; |
| 13 | +import org.apache.camel.support.component.PropertyConfigurerSupport; |
| 14 | + |
| 15 | +/** |
| 16 | + * Generated by camel build tools - do NOT edit this file! |
| 17 | + */ |
| 18 | +@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo") |
| 19 | +@SuppressWarnings("unchecked") |
| 20 | +public class IggyComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { |
| 21 | + |
| 22 | + private org.apache.camel.component.iggy.IggyConfiguration getOrCreateConfiguration(IggyComponent target) { |
| 23 | + if (target.getConfiguration() == null) { |
| 24 | + target.setConfiguration(new org.apache.camel.component.iggy.IggyConfiguration()); |
| 25 | + } |
| 26 | + return target.getConfiguration(); |
| 27 | + } |
| 28 | + |
| 29 | + @Override |
| 30 | + public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { |
| 31 | + IggyComponent target = (IggyComponent) obj; |
| 32 | + switch (ignoreCase ? name.toLowerCase() : name) { |
| 33 | + case "autocreatestream": |
| 34 | + case "autoCreateStream": getOrCreateConfiguration(target).setAutoCreateStream(property(camelContext, boolean.class, value)); return true; |
| 35 | + case "autocreatetopic": |
| 36 | + case "autoCreateTopic": getOrCreateConfiguration(target).setAutoCreateTopic(property(camelContext, boolean.class, value)); return true; |
| 37 | + case "autowiredenabled": |
| 38 | + case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true; |
| 39 | + case "bridgeerrorhandler": |
| 40 | + case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; |
| 41 | + case "clienttransport": |
| 42 | + case "clientTransport": getOrCreateConfiguration(target).setClientTransport(property(camelContext, java.lang.String.class, value)); return true; |
| 43 | + case "compressionalgorithm": |
| 44 | + case "compressionAlgorithm": getOrCreateConfiguration(target).setCompressionAlgorithm(property(camelContext, org.apache.iggy.topic.CompressionAlgorithm.class, value)); return true; |
| 45 | + case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.iggy.IggyConfiguration.class, value)); return true; |
| 46 | + case "consumergroupname": |
| 47 | + case "consumerGroupName": getOrCreateConfiguration(target).setConsumerGroupName(property(camelContext, java.lang.String.class, value)); return true; |
| 48 | + case "consumerscount": |
| 49 | + case "consumersCount": getOrCreateConfiguration(target).setConsumersCount(property(camelContext, int.class, value)); return true; |
| 50 | + case "host": getOrCreateConfiguration(target).setHost(property(camelContext, java.lang.String.class, value)); return true; |
| 51 | + case "lazystartproducer": |
| 52 | + case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; |
| 53 | + case "maxtopicsize": |
| 54 | + case "maxTopicSize": getOrCreateConfiguration(target).setMaxTopicSize(property(camelContext, java.lang.Long.class, value)); return true; |
| 55 | + case "messageexpiry": |
| 56 | + case "messageExpiry": getOrCreateConfiguration(target).setMessageExpiry(property(camelContext, java.lang.Long.class, value)); return true; |
| 57 | + case "partitionid": |
| 58 | + case "partitionId": getOrCreateConfiguration(target).setPartitionId(property(camelContext, java.lang.Long.class, value)); return true; |
| 59 | + case "partitioning": getOrCreateConfiguration(target).setPartitioning(property(camelContext, org.apache.iggy.message.Partitioning.class, value)); return true; |
| 60 | + case "partitionscount": |
| 61 | + case "partitionsCount": getOrCreateConfiguration(target).setPartitionsCount(property(camelContext, java.lang.Long.class, value)); return true; |
| 62 | + case "password": getOrCreateConfiguration(target).setPassword(property(camelContext, java.lang.String.class, value)); return true; |
| 63 | + case "pollbatchsize": |
| 64 | + case "pollBatchSize": getOrCreateConfiguration(target).setPollBatchSize(property(camelContext, java.lang.Long.class, value)); return true; |
| 65 | + case "pollingstrategy": |
| 66 | + case "pollingStrategy": getOrCreateConfiguration(target).setPollingStrategy(property(camelContext, java.lang.String.class, value)); return true; |
| 67 | + case "port": getOrCreateConfiguration(target).setPort(property(camelContext, int.class, value)); return true; |
| 68 | + case "replicationfactor": |
| 69 | + case "replicationFactor": getOrCreateConfiguration(target).setReplicationFactor(property(camelContext, java.lang.Short.class, value)); return true; |
| 70 | + case "shutdowntimeout": |
| 71 | + case "shutdownTimeout": getOrCreateConfiguration(target).setShutdownTimeout(property(camelContext, int.class, value)); return true; |
| 72 | + case "streamid": |
| 73 | + case "streamId": getOrCreateConfiguration(target).setStreamId(property(camelContext, java.lang.Long.class, value)); return true; |
| 74 | + case "streamname": |
| 75 | + case "streamName": getOrCreateConfiguration(target).setStreamName(property(camelContext, java.lang.String.class, value)); return true; |
| 76 | + case "username": getOrCreateConfiguration(target).setUsername(property(camelContext, java.lang.String.class, value)); return true; |
| 77 | + default: return false; |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + @Override |
| 82 | + public Class<?> getOptionType(String name, boolean ignoreCase) { |
| 83 | + switch (ignoreCase ? name.toLowerCase() : name) { |
| 84 | + case "autocreatestream": |
| 85 | + case "autoCreateStream": return boolean.class; |
| 86 | + case "autocreatetopic": |
| 87 | + case "autoCreateTopic": return boolean.class; |
| 88 | + case "autowiredenabled": |
| 89 | + case "autowiredEnabled": return boolean.class; |
| 90 | + case "bridgeerrorhandler": |
| 91 | + case "bridgeErrorHandler": return boolean.class; |
| 92 | + case "clienttransport": |
| 93 | + case "clientTransport": return java.lang.String.class; |
| 94 | + case "compressionalgorithm": |
| 95 | + case "compressionAlgorithm": return org.apache.iggy.topic.CompressionAlgorithm.class; |
| 96 | + case "configuration": return org.apache.camel.component.iggy.IggyConfiguration.class; |
| 97 | + case "consumergroupname": |
| 98 | + case "consumerGroupName": return java.lang.String.class; |
| 99 | + case "consumerscount": |
| 100 | + case "consumersCount": return int.class; |
| 101 | + case "host": return java.lang.String.class; |
| 102 | + case "lazystartproducer": |
| 103 | + case "lazyStartProducer": return boolean.class; |
| 104 | + case "maxtopicsize": |
| 105 | + case "maxTopicSize": return java.lang.Long.class; |
| 106 | + case "messageexpiry": |
| 107 | + case "messageExpiry": return java.lang.Long.class; |
| 108 | + case "partitionid": |
| 109 | + case "partitionId": return java.lang.Long.class; |
| 110 | + case "partitioning": return org.apache.iggy.message.Partitioning.class; |
| 111 | + case "partitionscount": |
| 112 | + case "partitionsCount": return java.lang.Long.class; |
| 113 | + case "password": return java.lang.String.class; |
| 114 | + case "pollbatchsize": |
| 115 | + case "pollBatchSize": return java.lang.Long.class; |
| 116 | + case "pollingstrategy": |
| 117 | + case "pollingStrategy": return java.lang.String.class; |
| 118 | + case "port": return int.class; |
| 119 | + case "replicationfactor": |
| 120 | + case "replicationFactor": return java.lang.Short.class; |
| 121 | + case "shutdowntimeout": |
| 122 | + case "shutdownTimeout": return int.class; |
| 123 | + case "streamid": |
| 124 | + case "streamId": return java.lang.Long.class; |
| 125 | + case "streamname": |
| 126 | + case "streamName": return java.lang.String.class; |
| 127 | + case "username": return java.lang.String.class; |
| 128 | + default: return null; |
| 129 | + } |
| 130 | + } |
| 131 | + |
| 132 | + @Override |
| 133 | + public Object getOptionValue(Object obj, String name, boolean ignoreCase) { |
| 134 | + IggyComponent target = (IggyComponent) obj; |
| 135 | + switch (ignoreCase ? name.toLowerCase() : name) { |
| 136 | + case "autocreatestream": |
| 137 | + case "autoCreateStream": return getOrCreateConfiguration(target).isAutoCreateStream(); |
| 138 | + case "autocreatetopic": |
| 139 | + case "autoCreateTopic": return getOrCreateConfiguration(target).isAutoCreateTopic(); |
| 140 | + case "autowiredenabled": |
| 141 | + case "autowiredEnabled": return target.isAutowiredEnabled(); |
| 142 | + case "bridgeerrorhandler": |
| 143 | + case "bridgeErrorHandler": return target.isBridgeErrorHandler(); |
| 144 | + case "clienttransport": |
| 145 | + case "clientTransport": return getOrCreateConfiguration(target).getClientTransport(); |
| 146 | + case "compressionalgorithm": |
| 147 | + case "compressionAlgorithm": return getOrCreateConfiguration(target).getCompressionAlgorithm(); |
| 148 | + case "configuration": return target.getConfiguration(); |
| 149 | + case "consumergroupname": |
| 150 | + case "consumerGroupName": return getOrCreateConfiguration(target).getConsumerGroupName(); |
| 151 | + case "consumerscount": |
| 152 | + case "consumersCount": return getOrCreateConfiguration(target).getConsumersCount(); |
| 153 | + case "host": return getOrCreateConfiguration(target).getHost(); |
| 154 | + case "lazystartproducer": |
| 155 | + case "lazyStartProducer": return target.isLazyStartProducer(); |
| 156 | + case "maxtopicsize": |
| 157 | + case "maxTopicSize": return getOrCreateConfiguration(target).getMaxTopicSize(); |
| 158 | + case "messageexpiry": |
| 159 | + case "messageExpiry": return getOrCreateConfiguration(target).getMessageExpiry(); |
| 160 | + case "partitionid": |
| 161 | + case "partitionId": return getOrCreateConfiguration(target).getPartitionId(); |
| 162 | + case "partitioning": return getOrCreateConfiguration(target).getPartitioning(); |
| 163 | + case "partitionscount": |
| 164 | + case "partitionsCount": return getOrCreateConfiguration(target).getPartitionsCount(); |
| 165 | + case "password": return getOrCreateConfiguration(target).getPassword(); |
| 166 | + case "pollbatchsize": |
| 167 | + case "pollBatchSize": return getOrCreateConfiguration(target).getPollBatchSize(); |
| 168 | + case "pollingstrategy": |
| 169 | + case "pollingStrategy": return getOrCreateConfiguration(target).getPollingStrategy(); |
| 170 | + case "port": return getOrCreateConfiguration(target).getPort(); |
| 171 | + case "replicationfactor": |
| 172 | + case "replicationFactor": return getOrCreateConfiguration(target).getReplicationFactor(); |
| 173 | + case "shutdowntimeout": |
| 174 | + case "shutdownTimeout": return getOrCreateConfiguration(target).getShutdownTimeout(); |
| 175 | + case "streamid": |
| 176 | + case "streamId": return getOrCreateConfiguration(target).getStreamId(); |
| 177 | + case "streamname": |
| 178 | + case "streamName": return getOrCreateConfiguration(target).getStreamName(); |
| 179 | + case "username": return getOrCreateConfiguration(target).getUsername(); |
| 180 | + default: return null; |
| 181 | + } |
| 182 | + } |
| 183 | +} |
| 184 | + |
0 commit comments