You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/09/04 09:16:23 UTC
[camel] branch master updated: CAMEL-15478: api component uses enum
type converter instead of its own custom converting.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 4df55c2 CAMEL-15478: api component uses enum type converter instead of its own custom converting.
4df55c2 is described below
commit 4df55c268b6f8755f6dafd81a4df825c902c61b5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Sep 4 11:12:19 2020 +0200
CAMEL-15478: api component uses enum type converter instead of its own custom converting.
---
.../camel/component/as2/internal/AS2ApiName.java | 25 ----------------------
.../as2/internal/AS2ClientManagerApiMethod.java | 25 ----------------------
.../as2/internal/AS2ServerManagerApiMethod.java | 25 ----------------------
.../apache/camel/component/as2/AS2Component.java | 5 +----
.../camel/component/box/internal/BoxApiName.java | 25 ----------------------
.../BoxCollaborationsManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxCommentsManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxEventLogsManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxEventsManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxFilesManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxFoldersManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxGroupsManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxSearchManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxTasksManagerApiMethod.java | 25 ----------------------
.../box/internal/BoxUsersManagerApiMethod.java | 25 ----------------------
.../apache/camel/component/box/BoxComponent.java | 2 +-
.../braintree/internal/AddOnGatewayApiMethod.java | 25 ----------------------
.../internal/AddressGatewayApiMethod.java | 25 ----------------------
.../braintree/internal/BraintreeApiName.java | 25 ----------------------
.../internal/ClientTokenGatewayApiMethod.java | 25 ----------------------
.../CreditCardVerificationGatewayApiMethod.java | 25 ----------------------
.../internal/CustomerGatewayApiMethod.java | 25 ----------------------
.../internal/DiscountGatewayApiMethod.java | 25 ----------------------
.../internal/DisputeGatewayApiMethod.java | 25 ----------------------
.../internal/DocumentUploadGatewayApiMethod.java | 25 ----------------------
.../internal/MerchantAccountGatewayApiMethod.java | 25 ----------------------
.../internal/PaymentMethodGatewayApiMethod.java | 25 ----------------------
.../PaymentMethodNonceGatewayApiMethod.java | 25 ----------------------
.../braintree/internal/PlanGatewayApiMethod.java | 25 ----------------------
.../braintree/internal/ReportGatewayApiMethod.java | 25 ----------------------
.../SettlementBatchSummaryGatewayApiMethod.java | 25 ----------------------
.../internal/SubscriptionGatewayApiMethod.java | 25 ----------------------
.../internal/TransactionGatewayApiMethod.java | 25 ----------------------
.../WebhookNotificationGatewayApiMethod.java | 25 ----------------------
.../component/braintree/BraintreeComponent.java | 2 +-
.../camel/component/fhir/internal/FhirApiName.java | 25 ----------------------
.../fhir/internal/FhirCapabilitiesApiMethod.java | 25 ----------------------
.../fhir/internal/FhirCreateApiMethod.java | 25 ----------------------
.../fhir/internal/FhirDeleteApiMethod.java | 25 ----------------------
.../fhir/internal/FhirHistoryApiMethod.java | 25 ----------------------
.../fhir/internal/FhirLoadPageApiMethod.java | 25 ----------------------
.../component/fhir/internal/FhirMetaApiMethod.java | 25 ----------------------
.../fhir/internal/FhirOperationApiMethod.java | 25 ----------------------
.../fhir/internal/FhirPatchApiMethod.java | 25 ----------------------
.../component/fhir/internal/FhirReadApiMethod.java | 25 ----------------------
.../fhir/internal/FhirSearchApiMethod.java | 25 ----------------------
.../fhir/internal/FhirTransactionApiMethod.java | 25 ----------------------
.../fhir/internal/FhirUpdateApiMethod.java | 25 ----------------------
.../fhir/internal/FhirValidateApiMethod.java | 25 ----------------------
.../apache/camel/component/fhir/FhirComponent.java | 2 +-
.../calendar/internal/CalendarAclApiMethod.java | 25 ----------------------
.../internal/CalendarCalendarListApiMethod.java | 25 ----------------------
.../internal/CalendarCalendarsApiMethod.java | 25 ----------------------
.../internal/CalendarChannelsApiMethod.java | 25 ----------------------
.../calendar/internal/CalendarColorsApiMethod.java | 25 ----------------------
.../calendar/internal/CalendarEventsApiMethod.java | 25 ----------------------
.../internal/CalendarFreebusyApiMethod.java | 25 ----------------------
.../internal/CalendarSettingsApiMethod.java | 25 ----------------------
.../calendar/internal/GoogleCalendarApiName.java | 25 ----------------------
.../google/calendar/GoogleCalendarComponent.java | 2 +-
.../google/drive/internal/DriveAboutApiMethod.java | 25 ----------------------
.../google/drive/internal/DriveAppsApiMethod.java | 25 ----------------------
.../drive/internal/DriveChangesApiMethod.java | 25 ----------------------
.../drive/internal/DriveChannelsApiMethod.java | 25 ----------------------
.../drive/internal/DriveChildrenApiMethod.java | 25 ----------------------
.../drive/internal/DriveCommentsApiMethod.java | 25 ----------------------
.../google/drive/internal/DriveFilesApiMethod.java | 25 ----------------------
.../drive/internal/DriveParentsApiMethod.java | 25 ----------------------
.../drive/internal/DrivePermissionsApiMethod.java | 25 ----------------------
.../drive/internal/DrivePropertiesApiMethod.java | 25 ----------------------
.../drive/internal/DriveRealtimeApiMethod.java | 25 ----------------------
.../drive/internal/DriveRepliesApiMethod.java | 25 ----------------------
.../drive/internal/DriveRevisionsApiMethod.java | 25 ----------------------
.../google/drive/internal/GoogleDriveApiName.java | 25 ----------------------
.../google/drive/GoogleDriveComponent.java | 2 +-
.../google/mail/internal/GmailUsersApiMethod.java | 25 ----------------------
.../mail/internal/GmailUsersDraftsApiMethod.java | 25 ----------------------
.../mail/internal/GmailUsersHistoryApiMethod.java | 25 ----------------------
.../mail/internal/GmailUsersLabelsApiMethod.java | 25 ----------------------
.../mail/internal/GmailUsersMessagesApiMethod.java | 25 ----------------------
.../GmailUsersMessagesAttachmentsApiMethod.java | 25 ----------------------
.../mail/internal/GmailUsersThreadsApiMethod.java | 25 ----------------------
.../google/mail/internal/GoogleMailApiName.java | 25 ----------------------
.../component/google/mail/GoogleMailComponent.java | 2 +-
.../sheets/internal/GoogleSheetsApiName.java | 25 ----------------------
.../internal/SheetsSpreadsheetsApiMethod.java | 25 ----------------------
.../SheetsSpreadsheetsValuesApiMethod.java | 25 ----------------------
.../google/sheets/GoogleSheetsComponent.java | 2 +-
.../component/olingo2/internal/Olingo2ApiName.java | 25 ----------------------
.../olingo2/internal/Olingo2AppApiMethod.java | 25 ----------------------
.../camel/component/olingo2/Olingo2Component.java | 2 +-
.../component/olingo4/internal/Olingo4ApiName.java | 25 ----------------------
.../olingo4/internal/Olingo4AppApiMethod.java | 25 ----------------------
.../camel/component/olingo4/Olingo4Component.java | 2 +-
.../twilio/internal/AccountApiMethod.java | 25 ----------------------
.../twilio/internal/AddressApiMethod.java | 25 ----------------------
.../AddressDependentPhoneNumberApiMethod.java | 25 ----------------------
.../twilio/internal/ApplicationApiMethod.java | 25 ----------------------
.../AvailablePhoneNumberCountryApiMethod.java | 25 ----------------------
.../AvailablePhoneNumberCountryLocalApiMethod.java | 25 ----------------------
...AvailablePhoneNumberCountryMobileApiMethod.java | 25 ----------------------
...ailablePhoneNumberCountryTollFreeApiMethod.java | 25 ----------------------
.../component/twilio/internal/CallApiMethod.java | 25 ----------------------
.../twilio/internal/CallFeedbackApiMethod.java | 25 ----------------------
.../internal/CallFeedbackSummaryApiMethod.java | 25 ----------------------
.../twilio/internal/CallNotificationApiMethod.java | 25 ----------------------
.../twilio/internal/CallRecordingApiMethod.java | 25 ----------------------
.../twilio/internal/ConferenceApiMethod.java | 25 ----------------------
.../internal/ConferenceParticipantApiMethod.java | 25 ----------------------
.../twilio/internal/ConnectAppApiMethod.java | 25 ----------------------
.../internal/IncomingPhoneNumberApiMethod.java | 25 ----------------------
.../IncomingPhoneNumberLocalApiMethod.java | 25 ----------------------
.../IncomingPhoneNumberMobileApiMethod.java | 25 ----------------------
.../IncomingPhoneNumberTollFreeApiMethod.java | 25 ----------------------
.../component/twilio/internal/KeyApiMethod.java | 25 ----------------------
.../twilio/internal/MessageApiMethod.java | 25 ----------------------
.../twilio/internal/MessageFeedbackApiMethod.java | 25 ----------------------
.../twilio/internal/MessageMediaApiMethod.java | 25 ----------------------
.../component/twilio/internal/NewKeyApiMethod.java | 25 ----------------------
.../twilio/internal/NewSigningKeyApiMethod.java | 25 ----------------------
.../twilio/internal/NotificationApiMethod.java | 25 ----------------------
.../twilio/internal/OutgoingCallerIdApiMethod.java | 25 ----------------------
.../component/twilio/internal/QueueApiMethod.java | 25 ----------------------
.../twilio/internal/QueueMemberApiMethod.java | 25 ----------------------
.../internal/RecordingAddOnResultApiMethod.java | 25 ----------------------
.../RecordingAddOnResultPayloadApiMethod.java | 25 ----------------------
.../twilio/internal/RecordingApiMethod.java | 25 ----------------------
.../internal/RecordingTranscriptionApiMethod.java | 25 ----------------------
.../twilio/internal/ShortCodeApiMethod.java | 25 ----------------------
.../twilio/internal/SigningKeyApiMethod.java | 25 ----------------------
.../twilio/internal/SipCredentialApiMethod.java | 25 ----------------------
.../internal/SipCredentialListApiMethod.java | 25 ----------------------
.../twilio/internal/SipDomainApiMethod.java | 25 ----------------------
.../SipDomainCredentialListMappingApiMethod.java | 25 ----------------------
...pDomainIpAccessControlListMappingApiMethod.java | 25 ----------------------
.../internal/SipIpAccessControlListApiMethod.java | 25 ----------------------
.../SipIpAccessControlListIpAddressApiMethod.java | 25 ----------------------
.../component/twilio/internal/TokenApiMethod.java | 25 ----------------------
.../twilio/internal/TranscriptionApiMethod.java | 25 ----------------------
.../component/twilio/internal/TwilioApiName.java | 25 ----------------------
.../internal/UsageRecordAllTimeApiMethod.java | 25 ----------------------
.../twilio/internal/UsageRecordApiMethod.java | 25 ----------------------
.../twilio/internal/UsageRecordDailyApiMethod.java | 25 ----------------------
.../internal/UsageRecordLastMonthApiMethod.java | 25 ----------------------
.../internal/UsageRecordMonthlyApiMethod.java | 25 ----------------------
.../internal/UsageRecordThisMonthApiMethod.java | 25 ----------------------
.../twilio/internal/UsageRecordTodayApiMethod.java | 25 ----------------------
.../internal/UsageRecordYearlyApiMethod.java | 25 ----------------------
.../internal/UsageRecordYesterdayApiMethod.java | 25 ----------------------
.../twilio/internal/UsageTriggerApiMethod.java | 25 ----------------------
.../internal/ValidationRequestApiMethod.java | 25 ----------------------
.../camel/component/twilio/TwilioComponent.java | 2 +-
.../zendesk/internal/ZendeskApiMethod.java | 25 ----------------------
.../component/zendesk/internal/ZendeskApiName.java | 25 ----------------------
.../camel/component/zendesk/ZendeskComponent.java | 5 +++--
.../src/main/resources/api-method-enum.vm | 25 ----------------------
.../src/main/resources/api-name-enum.vm | 25 ----------------------
157 files changed, 14 insertions(+), 3641 deletions(-)
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiName.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiName.java
index cd700de..0e47a9b 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiName.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.as2.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component AS2
@@ -18,8 +16,6 @@ public enum AS2ApiName implements ApiName {
SERVER("server");
- private static final AS2ApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private AS2ApiName(String name) {
@@ -31,25 +27,4 @@ public enum AS2ApiName implements ApiName {
return name;
}
- public static AS2ApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
index 060d4b2..6020b14 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ClientManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.as2.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.as2.api.AS2ClientManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -43,8 +41,6 @@ public enum AS2ClientManagerApiMethod implements ApiMethod {
arg("encryptingAlgorithm", org.apache.camel.component.as2.api.AS2EncryptionAlgorithm.class),
arg("encryptingCertificateChain", new java.security.cert.Certificate[0].getClass()));
- private static final AS2ClientManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AS2ClientManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -54,27 +50,6 @@ public enum AS2ClientManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AS2ClientManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ServerManagerApiMethod.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ServerManagerApiMethod.java
index c5926f2..035c0a1 100644
--- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ServerManagerApiMethod.java
+++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/internal/AS2ServerManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.as2.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.as2.api.AS2ServerManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -28,8 +26,6 @@ public enum AS2ServerManagerApiMethod implements ApiMethod {
arg("requestUriPattern", String.class),
arg("handler", org.apache.http.protocol.HttpRequestHandler.class));
- private static final AS2ServerManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AS2ServerManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -39,27 +35,6 @@ public enum AS2ServerManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AS2ServerManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Component.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Component.java
index 42d74d3..7cc78cd 100644
--- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Component.java
+++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Component.java
@@ -28,9 +28,6 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- * Represents the component that manages {@link AS2Endpoint}.
- */
@Component("as2")
public class AS2Component extends AbstractApiComponent<AS2ApiName, AS2Configuration, AS2ApiCollection> {
@@ -46,7 +43,7 @@ public class AS2Component extends AbstractApiComponent<AS2ApiName, AS2Configurat
@Override
protected AS2ApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return AS2ApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(AS2ApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxApiName.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxApiName.java
index 169ea21..7220759 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxApiName.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.box.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Box
@@ -34,8 +32,6 @@ public enum BoxApiName implements ApiName {
USERS("users");
- private static final BoxApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private BoxApiName(String name) {
@@ -47,25 +43,4 @@ public enum BoxApiName implements ApiName {
return name;
}
- public static BoxApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCollaborationsManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCollaborationsManagerApiMethod.java
index 198d182..570c9cb 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCollaborationsManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCollaborationsManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxCollaborationsManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -61,8 +59,6 @@ public enum BoxCollaborationsManagerApiMethod implements ApiMethod {
arg("collaborationId", String.class),
arg("info", com.box.sdk.BoxCollaboration.Info.class));
- private static final BoxCollaborationsManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxCollaborationsManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -72,27 +68,6 @@ public enum BoxCollaborationsManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxCollaborationsManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCommentsManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCommentsManagerApiMethod.java
index 2e94b3a..3eaec0d 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCommentsManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxCommentsManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxCommentsManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -55,8 +53,6 @@ public enum BoxCommentsManagerApiMethod implements ApiMethod {
arg("commentId", String.class),
arg("message", String.class));
- private static final BoxCommentsManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxCommentsManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -66,27 +62,6 @@ public enum BoxCommentsManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxCommentsManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventLogsManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventLogsManagerApiMethod.java
index 1c67637..7711309 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventLogsManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventLogsManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxEventLogsManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -30,8 +28,6 @@ public enum BoxEventLogsManagerApiMethod implements ApiMethod {
arg("before", java.util.Date.class),
arg("types", new com.box.sdk.BoxEvent.Type[0].getClass()));
- private static final BoxEventLogsManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxEventLogsManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -41,27 +37,6 @@ public enum BoxEventLogsManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxEventLogsManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventsManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventsManagerApiMethod.java
index e94d861..7210bc7 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventsManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxEventsManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxEventsManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -28,8 +26,6 @@ public enum BoxEventsManagerApiMethod implements ApiMethod {
arg("listener", com.box.sdk.EventListener.class),
arg("startingPosition", Long.class));
- private static final BoxEventsManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxEventsManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -39,27 +35,6 @@ public enum BoxEventsManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxEventsManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFilesManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFilesManagerApiMethod.java
index cef9aa3..2fdd88e 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFilesManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFilesManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxFilesManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -173,8 +171,6 @@ public enum BoxFilesManagerApiMethod implements ApiMethod {
arg("fileSize", Long.class),
arg("listener", com.box.sdk.ProgressListener.class));
- private static final BoxFilesManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxFilesManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -184,27 +180,6 @@ public enum BoxFilesManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxFilesManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFoldersManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFoldersManagerApiMethod.java
index c434c6f..7dce2b4 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFoldersManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxFoldersManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxFoldersManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -96,8 +94,6 @@ public enum BoxFoldersManagerApiMethod implements ApiMethod {
arg("folderId", String.class),
arg("info", com.box.sdk.BoxFolder.Info.class));
- private static final BoxFoldersManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxFoldersManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -107,27 +103,6 @@ public enum BoxFoldersManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxFoldersManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxGroupsManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxGroupsManagerApiMethod.java
index 45746b3..7e46941 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxGroupsManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxGroupsManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxGroupsManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -80,8 +78,6 @@ public enum BoxGroupsManagerApiMethod implements ApiMethod {
arg("groupMembershipId", String.class),
arg("info", com.box.sdk.BoxGroupMembership.Info.class));
- private static final BoxGroupsManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxGroupsManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -91,27 +87,6 @@ public enum BoxGroupsManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxGroupsManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxSearchManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxSearchManagerApiMethod.java
index 0427054..5970634 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxSearchManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxSearchManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxSearchManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -28,8 +26,6 @@ public enum BoxSearchManagerApiMethod implements ApiMethod {
arg("folderId", String.class),
arg("query", String.class));
- private static final BoxSearchManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxSearchManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -39,27 +35,6 @@ public enum BoxSearchManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxSearchManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxTasksManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxTasksManagerApiMethod.java
index 5d6a786..7d0a0f3 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxTasksManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxTasksManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxTasksManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -72,8 +70,6 @@ public enum BoxTasksManagerApiMethod implements ApiMethod {
arg("taskId", String.class),
arg("info", com.box.sdk.BoxTask.Info.class));
- private static final BoxTasksManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxTasksManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -83,27 +79,6 @@ public enum BoxTasksManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxTasksManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxUsersManagerApiMethod.java b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxUsersManagerApiMethod.java
index 722965c..25fad42 100644
--- a/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxUsersManagerApiMethod.java
+++ b/components/camel-box/camel-box-component/src/generated/java/org/apache/camel/component/box/internal/BoxUsersManagerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.box.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.box.api.BoxUsersManager;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -86,8 +84,6 @@ public enum BoxUsersManagerApiMethod implements ApiMethod {
arg("userId", String.class),
arg("info", com.box.sdk.BoxUser.Info.class));
- private static final BoxUsersManagerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private BoxUsersManagerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -97,27 +93,6 @@ public enum BoxUsersManagerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static BoxUsersManagerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxComponent.java b/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxComponent.java
index 6b4341f..55c1dfa 100644
--- a/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxComponent.java
+++ b/components/camel-box/camel-box-component/src/main/java/org/apache/camel/component/box/BoxComponent.java
@@ -45,7 +45,7 @@ public class BoxComponent extends AbstractApiComponent<BoxApiName, BoxConfigurat
@Override
protected BoxApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return BoxApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(BoxApiName.class, apiNameStr);
}
/**
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddOnGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddOnGatewayApiMethod.java
index 1630bdd..3803583 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddOnGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddOnGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.AddOnGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -26,8 +24,6 @@ public enum AddOnGatewayApiMethod implements ApiMethod {
java.util.List.class,
"all");
- private static final AddOnGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AddOnGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -37,27 +33,6 @@ public enum AddOnGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AddOnGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddressGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddressGatewayApiMethod.java
index 5832c5e..bd70fb3 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddressGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/AddressGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.AddressGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -47,8 +45,6 @@ public enum AddressGatewayApiMethod implements ApiMethod {
arg("id", String.class),
arg("request", com.braintreegateway.AddressRequest.class));
- private static final AddressGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AddressGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -58,27 +54,6 @@ public enum AddressGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AddressGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/BraintreeApiName.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/BraintreeApiName.java
index 4cb1f78..2d8dc54 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/BraintreeApiName.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/BraintreeApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.braintree.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Braintree
@@ -48,8 +46,6 @@ public enum BraintreeApiName implements ApiName {
WEBHOOK_NOTIFICATION("webhookNotification");
- private static final BraintreeApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private BraintreeApiName(String name) {
@@ -61,25 +57,4 @@ public enum BraintreeApiName implements ApiName {
return name;
}
- public static BraintreeApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ClientTokenGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ClientTokenGatewayApiMethod.java
index 916762f..34f0613 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ClientTokenGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ClientTokenGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.ClientTokenGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum ClientTokenGatewayApiMethod implements ApiMethod {
"generate",
arg("request", com.braintreegateway.ClientTokenRequest.class));
- private static final ClientTokenGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ClientTokenGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum ClientTokenGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ClientTokenGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CreditCardVerificationGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CreditCardVerificationGatewayApiMethod.java
index fb1c7a8..8b71470 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CreditCardVerificationGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CreditCardVerificationGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.CreditCardVerificationGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -37,8 +35,6 @@ public enum CreditCardVerificationGatewayApiMethod implements ApiMethod {
"search",
arg("query", com.braintreegateway.CreditCardVerificationSearchRequest.class));
- private static final CreditCardVerificationGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CreditCardVerificationGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -48,27 +44,6 @@ public enum CreditCardVerificationGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CreditCardVerificationGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CustomerGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CustomerGatewayApiMethod.java
index 6108ebe..b6d7b69 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CustomerGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/CustomerGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.CustomerGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -58,8 +56,6 @@ public enum CustomerGatewayApiMethod implements ApiMethod {
arg("id", String.class),
arg("request", com.braintreegateway.CustomerRequest.class));
- private static final CustomerGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CustomerGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -69,27 +65,6 @@ public enum CustomerGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CustomerGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DiscountGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DiscountGatewayApiMethod.java
index d8ceea7..0fb2cac 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DiscountGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DiscountGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.DiscountGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -26,8 +24,6 @@ public enum DiscountGatewayApiMethod implements ApiMethod {
java.util.List.class,
"all");
- private static final DiscountGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DiscountGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -37,27 +33,6 @@ public enum DiscountGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DiscountGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DisputeGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DisputeGatewayApiMethod.java
index cd620f1..cd947fb 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DisputeGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DisputeGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.DisputeGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -72,8 +70,6 @@ public enum DisputeGatewayApiMethod implements ApiMethod {
"search",
arg("query", com.braintreegateway.DisputeSearchRequest.class));
- private static final DisputeGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DisputeGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -83,27 +79,6 @@ public enum DisputeGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DisputeGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DocumentUploadGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DocumentUploadGatewayApiMethod.java
index 7c5ed45..65b6597 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DocumentUploadGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/DocumentUploadGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.DocumentUploadGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum DocumentUploadGatewayApiMethod implements ApiMethod {
"create",
arg("request", com.braintreegateway.DocumentUploadRequest.class));
- private static final DocumentUploadGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DocumentUploadGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum DocumentUploadGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DocumentUploadGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/MerchantAccountGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/MerchantAccountGatewayApiMethod.java
index 2ca3e40..2b32ba1 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/MerchantAccountGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/MerchantAccountGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.MerchantAccountGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -52,8 +50,6 @@ public enum MerchantAccountGatewayApiMethod implements ApiMethod {
arg("id", String.class),
arg("request", com.braintreegateway.MerchantAccountRequest.class));
- private static final MerchantAccountGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private MerchantAccountGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -63,27 +59,6 @@ public enum MerchantAccountGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static MerchantAccountGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodGatewayApiMethod.java
index d29a80f..e3deb41 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.PaymentMethodGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -65,8 +63,6 @@ public enum PaymentMethodGatewayApiMethod implements ApiMethod {
arg("token", String.class),
arg("request", com.braintreegateway.PaymentMethodRequest.class));
- private static final PaymentMethodGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private PaymentMethodGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -76,27 +72,6 @@ public enum PaymentMethodGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static PaymentMethodGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodNonceGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodNonceGatewayApiMethod.java
index 2218d95..c5a1950 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodNonceGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PaymentMethodNonceGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.PaymentMethodNonceGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -37,8 +35,6 @@ public enum PaymentMethodNonceGatewayApiMethod implements ApiMethod {
"find",
arg("paymentMethodNonce", String.class));
- private static final PaymentMethodNonceGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private PaymentMethodNonceGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -48,27 +44,6 @@ public enum PaymentMethodNonceGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static PaymentMethodNonceGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PlanGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PlanGatewayApiMethod.java
index bb79faf..3a21398 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PlanGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/PlanGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.PlanGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -26,8 +24,6 @@ public enum PlanGatewayApiMethod implements ApiMethod {
java.util.List.class,
"all");
- private static final PlanGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private PlanGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -37,27 +33,6 @@ public enum PlanGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static PlanGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ReportGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ReportGatewayApiMethod.java
index 35275ce..734f634 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ReportGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/ReportGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.ReportGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum ReportGatewayApiMethod implements ApiMethod {
"transactionLevelFees",
arg("request", com.braintreegateway.TransactionLevelFeeReportRequest.class));
- private static final ReportGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ReportGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum ReportGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ReportGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SettlementBatchSummaryGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SettlementBatchSummaryGatewayApiMethod.java
index 756a0a6..d8f71d6 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SettlementBatchSummaryGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SettlementBatchSummaryGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.SettlementBatchSummaryGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum SettlementBatchSummaryGatewayApiMethod implements ApiMethod {
arg("settlementDate", java.util.Calendar.class),
arg("groupByCustomField", String.class));
- private static final SettlementBatchSummaryGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SettlementBatchSummaryGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum SettlementBatchSummaryGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SettlementBatchSummaryGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SubscriptionGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SubscriptionGatewayApiMethod.java
index fd5e54e..a683d67 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SubscriptionGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/SubscriptionGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.SubscriptionGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -78,8 +76,6 @@ public enum SubscriptionGatewayApiMethod implements ApiMethod {
arg("id", String.class),
arg("request", com.braintreegateway.SubscriptionRequest.class));
- private static final SubscriptionGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SubscriptionGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -89,27 +85,6 @@ public enum SubscriptionGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SubscriptionGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/TransactionGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/TransactionGatewayApiMethod.java
index 0b303e3..64bb0a9 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/TransactionGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/TransactionGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.TransactionGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -120,8 +118,6 @@ public enum TransactionGatewayApiMethod implements ApiMethod {
"voidTransaction",
arg("id", String.class));
- private static final TransactionGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private TransactionGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -131,27 +127,6 @@ public enum TransactionGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static TransactionGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/WebhookNotificationGatewayApiMethod.java b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/WebhookNotificationGatewayApiMethod.java
index c2a0618..cfe0222 100644
--- a/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/WebhookNotificationGatewayApiMethod.java
+++ b/components/camel-braintree/src/generated/java/org/apache/camel/component/braintree/internal/WebhookNotificationGatewayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.braintree.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.braintreegateway.WebhookNotificationGateway;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum WebhookNotificationGatewayApiMethod implements ApiMethod {
"verify",
arg("challenge", String.class));
- private static final WebhookNotificationGatewayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private WebhookNotificationGatewayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum WebhookNotificationGatewayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static WebhookNotificationGatewayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
index 4f3affc..d68b83d 100644
--- a/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
+++ b/components/camel-braintree/src/main/java/org/apache/camel/component/braintree/BraintreeComponent.java
@@ -51,7 +51,7 @@ public class BraintreeComponent extends AbstractApiComponent<BraintreeApiName, B
@Override
protected BraintreeApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return BraintreeApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(BraintreeApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirApiName.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirApiName.java
index 525df66..fb6c9cc 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirApiName.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.fhir.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Fhir
@@ -40,8 +38,6 @@ public enum FhirApiName implements ApiName {
VALIDATE("validate");
- private static final FhirApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private FhirApiName(String name) {
@@ -53,25 +49,4 @@ public enum FhirApiName implements ApiName {
return name;
}
- public static FhirApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCapabilitiesApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCapabilitiesApiMethod.java
index 71eebe7..48a8f0b 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCapabilitiesApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCapabilitiesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirCapabilities;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -28,8 +26,6 @@ public enum FhirCapabilitiesApiMethod implements ApiMethod {
arg("type", Class.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirCapabilitiesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirCapabilitiesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -39,27 +35,6 @@ public enum FhirCapabilitiesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirCapabilitiesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCreateApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCreateApiMethod.java
index 2e655a3..1d91233 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCreateApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirCreateApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirCreate;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -38,8 +36,6 @@ public enum FhirCreateApiMethod implements ApiMethod {
arg("preferReturn", ca.uhn.fhir.rest.api.PreferReturnEnum.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirCreateApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirCreateApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -49,27 +45,6 @@ public enum FhirCreateApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirCreateApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirDeleteApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirDeleteApiMethod.java
index 2f017b9..8ce4cd4 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirDeleteApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirDeleteApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirDelete;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -47,8 +45,6 @@ public enum FhirDeleteApiMethod implements ApiMethod {
arg("url", String.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirDeleteApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirDeleteApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -58,27 +54,6 @@ public enum FhirDeleteApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirDeleteApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirHistoryApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirHistoryApiMethod.java
index fc125bf..cd8f1df 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirHistoryApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirHistoryApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirHistory;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -51,8 +49,6 @@ public enum FhirHistoryApiMethod implements ApiMethod {
arg("iCutoff", org.hl7.fhir.instance.model.api.IPrimitiveType.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirHistoryApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirHistoryApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -62,27 +58,6 @@ public enum FhirHistoryApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirHistoryApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirLoadPageApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirLoadPageApiMethod.java
index 3b9387a..3999793 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirLoadPageApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirLoadPageApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirLoadPage;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -41,8 +39,6 @@ public enum FhirLoadPageApiMethod implements ApiMethod {
arg("bundle", org.hl7.fhir.instance.model.api.IBaseBundle.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirLoadPageApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirLoadPageApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -52,27 +48,6 @@ public enum FhirLoadPageApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirLoadPageApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirMetaApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirMetaApiMethod.java
index 4bf5852..f1114d6 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirMetaApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirMetaApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirMeta;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -56,8 +54,6 @@ public enum FhirMetaApiMethod implements ApiMethod {
arg("theResourceName", String.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirMetaApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirMetaApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -67,27 +63,6 @@ public enum FhirMetaApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirMetaApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirOperationApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirOperationApiMethod.java
index b0bcea5..10800f2 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirOperationApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirOperationApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirOperation;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -74,8 +72,6 @@ public enum FhirOperationApiMethod implements ApiMethod {
arg("responseClass", Class.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirOperationApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirOperationApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -85,27 +81,6 @@ public enum FhirOperationApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirOperationApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirPatchApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirPatchApiMethod.java
index 9653ace..fe48918 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirPatchApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirPatchApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirPatch;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -46,8 +44,6 @@ public enum FhirPatchApiMethod implements ApiMethod {
arg("preferReturn", ca.uhn.fhir.rest.api.PreferReturnEnum.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirPatchApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirPatchApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -57,27 +53,6 @@ public enum FhirPatchApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirPatchApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirReadApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirReadApiMethod.java
index 753436b..3c07927 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirReadApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirReadApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirRead;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -134,8 +132,6 @@ public enum FhirReadApiMethod implements ApiMethod {
arg("throwError", Boolean.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirReadApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirReadApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -145,27 +141,6 @@ public enum FhirReadApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirReadApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirSearchApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirSearchApiMethod.java
index 39a165d..f9a5a05 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirSearchApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirSearchApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirSearch;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -28,8 +26,6 @@ public enum FhirSearchApiMethod implements ApiMethod {
arg("url", String.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirSearchApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirSearchApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -39,27 +35,6 @@ public enum FhirSearchApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirSearchApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirTransactionApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirTransactionApiMethod.java
index 5a7f86b..c408ff1 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirTransactionApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirTransactionApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirTransaction;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -40,8 +38,6 @@ public enum FhirTransactionApiMethod implements ApiMethod {
arg("resources", java.util.List.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirTransactionApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirTransactionApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -51,27 +47,6 @@ public enum FhirTransactionApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirTransactionApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirUpdateApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirUpdateApiMethod.java
index 6839eb3..e738f3b 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirUpdateApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirUpdateApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirUpdate;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -70,8 +68,6 @@ public enum FhirUpdateApiMethod implements ApiMethod {
arg("preferReturn", ca.uhn.fhir.rest.api.PreferReturnEnum.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirUpdateApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirUpdateApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -81,27 +77,6 @@ public enum FhirUpdateApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirUpdateApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirValidateApiMethod.java b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirValidateApiMethod.java
index 0367bd4..03a45da 100644
--- a/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirValidateApiMethod.java
+++ b/components/camel-fhir/camel-fhir-component/src/generated/java/org/apache/camel/component/fhir/internal/FhirValidateApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.fhir.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.fhir.api.FhirValidate;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -34,8 +32,6 @@ public enum FhirValidateApiMethod implements ApiMethod {
arg("resourceAsString", String.class),
arg("extraParameters", java.util.Map.class));
- private static final FhirValidateApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private FhirValidateApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -45,27 +41,6 @@ public enum FhirValidateApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static FhirValidateApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirComponent.java b/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirComponent.java
index 6e64e22..8566256 100644
--- a/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirComponent.java
+++ b/components/camel-fhir/camel-fhir-component/src/main/java/org/apache/camel/component/fhir/FhirComponent.java
@@ -48,7 +48,7 @@ public class FhirComponent extends AbstractApiComponent<FhirApiName, FhirConfigu
@Override
protected FhirApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return FhirApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(FhirApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarAclApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarAclApiMethod.java
index ca1eea1..de28b57 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarAclApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarAclApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Acl;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -65,8 +63,6 @@ public enum CalendarAclApiMethod implements ApiMethod {
arg("calendarId", String.class),
arg("contentChannel", com.google.api.services.calendar.model.Channel.class));
- private static final CalendarAclApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarAclApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -76,27 +72,6 @@ public enum CalendarAclApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarAclApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarListApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarListApiMethod.java
index d9efe08..040aea2 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarListApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarListApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.CalendarList;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -58,8 +56,6 @@ public enum CalendarCalendarListApiMethod implements ApiMethod {
"watch",
arg("contentChannel", com.google.api.services.calendar.model.Channel.class));
- private static final CalendarCalendarListApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarCalendarListApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -69,27 +65,6 @@ public enum CalendarCalendarListApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarCalendarListApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarsApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarsApiMethod.java
index efbafd6..7ae2e38 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarsApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarCalendarsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Calendars;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -54,8 +52,6 @@ public enum CalendarCalendarsApiMethod implements ApiMethod {
arg("calendarId", String.class),
arg("content", com.google.api.services.calendar.model.Calendar.class));
- private static final CalendarCalendarsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarCalendarsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -65,27 +61,6 @@ public enum CalendarCalendarsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarCalendarsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarChannelsApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarChannelsApiMethod.java
index ff601c1..bfc8e03 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarChannelsApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarChannelsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Channels;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum CalendarChannelsApiMethod implements ApiMethod {
"stop",
arg("contentChannel", com.google.api.services.calendar.model.Channel.class));
- private static final CalendarChannelsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarChannelsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum CalendarChannelsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarChannelsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarColorsApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarColorsApiMethod.java
index 0bd810a..08e1887 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarColorsApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarColorsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Colors;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -26,8 +24,6 @@ public enum CalendarColorsApiMethod implements ApiMethod {
com.google.api.services.calendar.Calendar.Colors.Get.class,
"get");
- private static final CalendarColorsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarColorsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -37,27 +33,6 @@ public enum CalendarColorsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarColorsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarEventsApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarEventsApiMethod.java
index d52bcf5..a45015b 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarEventsApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarEventsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Events;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -90,8 +88,6 @@ public enum CalendarEventsApiMethod implements ApiMethod {
arg("calendarId", String.class),
arg("contentChannel", com.google.api.services.calendar.model.Channel.class));
- private static final CalendarEventsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarEventsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -101,27 +97,6 @@ public enum CalendarEventsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarEventsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarFreebusyApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarFreebusyApiMethod.java
index 42016bc..9f803d7 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarFreebusyApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarFreebusyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Freebusy;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum CalendarFreebusyApiMethod implements ApiMethod {
"query",
arg("content", com.google.api.services.calendar.model.FreeBusyRequest.class));
- private static final CalendarFreebusyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarFreebusyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum CalendarFreebusyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarFreebusyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarSettingsApiMethod.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarSettingsApiMethod.java
index d678cae..8efb2dd 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarSettingsApiMethod.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/CalendarSettingsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.calendar.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.calendar.Calendar.Settings;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -36,8 +34,6 @@ public enum CalendarSettingsApiMethod implements ApiMethod {
"watch",
arg("contentChannel", com.google.api.services.calendar.model.Channel.class));
- private static final CalendarSettingsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CalendarSettingsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -47,27 +43,6 @@ public enum CalendarSettingsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CalendarSettingsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/GoogleCalendarApiName.java b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/GoogleCalendarApiName.java
index 2636c91..a2aed46 100644
--- a/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/GoogleCalendarApiName.java
+++ b/components/camel-google-calendar/src/generated/java/org/apache/camel/component/google/calendar/internal/GoogleCalendarApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.google.calendar.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component GoogleCalendar
@@ -30,8 +28,6 @@ public enum GoogleCalendarApiName implements ApiName {
SETTINGS("settings");
- private static final GoogleCalendarApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private GoogleCalendarApiName(String name) {
@@ -43,25 +39,4 @@ public enum GoogleCalendarApiName implements ApiName {
return name;
}
- public static GoogleCalendarApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
index ba92e69..1e27616 100644
--- a/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
+++ b/components/camel-google-calendar/src/main/java/org/apache/camel/component/google/calendar/GoogleCalendarComponent.java
@@ -53,7 +53,7 @@ public class GoogleCalendarComponent
@Override
protected GoogleCalendarApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return GoogleCalendarApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(GoogleCalendarApiName.class, apiNameStr);
}
public Calendar getClient(GoogleCalendarConfiguration config) {
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAboutApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAboutApiMethod.java
index 01df3d7..dbc6158 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAboutApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAboutApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.About;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -26,8 +24,6 @@ public enum DriveAboutApiMethod implements ApiMethod {
com.google.api.services.drive.Drive.About.Get.class,
"get");
- private static final DriveAboutApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveAboutApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -37,27 +33,6 @@ public enum DriveAboutApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveAboutApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAppsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAppsApiMethod.java
index 760f183..70c5a93 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAppsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveAppsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Apps;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum DriveAppsApiMethod implements ApiMethod {
com.google.api.services.drive.Drive.Apps.List.class,
"list");
- private static final DriveAppsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveAppsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum DriveAppsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveAppsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChangesApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChangesApiMethod.java
index 0c69fdc..791d8c3 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChangesApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChangesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Changes;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -40,8 +38,6 @@ public enum DriveChangesApiMethod implements ApiMethod {
"watch",
arg("contentChannel", com.google.api.services.drive.model.Channel.class));
- private static final DriveChangesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveChangesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -51,27 +47,6 @@ public enum DriveChangesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveChangesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChannelsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChannelsApiMethod.java
index 60795bb..bc06a4f 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChannelsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChannelsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Channels;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum DriveChannelsApiMethod implements ApiMethod {
"stop",
arg("contentChannel", com.google.api.services.drive.model.Channel.class));
- private static final DriveChannelsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveChannelsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum DriveChannelsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveChannelsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChildrenApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChildrenApiMethod.java
index 358d4bf..289f1bb 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChildrenApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveChildrenApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Children;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -45,8 +43,6 @@ public enum DriveChildrenApiMethod implements ApiMethod {
"list",
arg("folderId", String.class));
- private static final DriveChildrenApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveChildrenApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -56,27 +52,6 @@ public enum DriveChildrenApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveChildrenApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveCommentsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveCommentsApiMethod.java
index 3d2ff2b..260b688 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveCommentsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveCommentsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Comments;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum DriveCommentsApiMethod implements ApiMethod {
arg("commentId", String.class),
arg("content", com.google.api.services.drive.model.Comment.class));
- private static final DriveCommentsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveCommentsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum DriveCommentsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveCommentsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveFilesApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveFilesApiMethod.java
index c969146..7e5db6e 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveFilesApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveFilesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Files;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -107,8 +105,6 @@ public enum DriveFilesApiMethod implements ApiMethod {
arg("fileId", String.class),
arg("contentChannel", com.google.api.services.drive.model.Channel.class));
- private static final DriveFilesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveFilesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -118,27 +114,6 @@ public enum DriveFilesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveFilesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveParentsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveParentsApiMethod.java
index 10b285a..73a4abf 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveParentsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveParentsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Parents;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -45,8 +43,6 @@ public enum DriveParentsApiMethod implements ApiMethod {
"list",
arg("fileId", String.class));
- private static final DriveParentsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveParentsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -56,27 +52,6 @@ public enum DriveParentsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveParentsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePermissionsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePermissionsApiMethod.java
index 65f9eee..a11130d 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePermissionsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePermissionsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Permissions;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -64,8 +62,6 @@ public enum DrivePermissionsApiMethod implements ApiMethod {
arg("permissionId", String.class),
arg("content", com.google.api.services.drive.model.Permission.class));
- private static final DrivePermissionsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DrivePermissionsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -75,27 +71,6 @@ public enum DrivePermissionsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DrivePermissionsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePropertiesApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePropertiesApiMethod.java
index 011dde2..5915c7f 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePropertiesApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DrivePropertiesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Properties;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum DrivePropertiesApiMethod implements ApiMethod {
arg("propertyKey", String.class),
arg("content", com.google.api.services.drive.model.Property.class));
- private static final DrivePropertiesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DrivePropertiesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum DrivePropertiesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DrivePropertiesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRealtimeApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRealtimeApiMethod.java
index 7b72467..f04bf1c 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRealtimeApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRealtimeApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Realtime;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -38,8 +36,6 @@ public enum DriveRealtimeApiMethod implements ApiMethod {
arg("fileId", String.class),
arg("mediaContent", com.google.api.client.http.AbstractInputStreamContent.class));
- private static final DriveRealtimeApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveRealtimeApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -49,27 +45,6 @@ public enum DriveRealtimeApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveRealtimeApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRepliesApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRepliesApiMethod.java
index b91ed9d..ea19e57 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRepliesApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRepliesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Replies;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -65,8 +63,6 @@ public enum DriveRepliesApiMethod implements ApiMethod {
arg("replyId", String.class),
arg("content", com.google.api.services.drive.model.CommentReply.class));
- private static final DriveRepliesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveRepliesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -76,27 +72,6 @@ public enum DriveRepliesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveRepliesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRevisionsApiMethod.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRevisionsApiMethod.java
index c5cc922..7c7871d 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRevisionsApiMethod.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/DriveRevisionsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.drive.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.drive.Drive.Revisions;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -53,8 +51,6 @@ public enum DriveRevisionsApiMethod implements ApiMethod {
arg("revisionId", String.class),
arg("content", com.google.api.services.drive.model.Revision.class));
- private static final DriveRevisionsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private DriveRevisionsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -64,27 +60,6 @@ public enum DriveRevisionsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static DriveRevisionsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/GoogleDriveApiName.java b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/GoogleDriveApiName.java
index e8eaf11..8a8cf85 100644
--- a/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/GoogleDriveApiName.java
+++ b/components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/internal/GoogleDriveApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.google.drive.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component GoogleDrive
@@ -40,8 +38,6 @@ public enum GoogleDriveApiName implements ApiName {
DRIVE_REVISIONS("drive-revisions");
- private static final GoogleDriveApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private GoogleDriveApiName(String name) {
@@ -53,25 +49,4 @@ public enum GoogleDriveApiName implements ApiName {
return name;
}
- public static GoogleDriveApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
index 8dc700d..708d452 100644
--- a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -51,7 +51,7 @@ public class GoogleDriveComponent
@Override
protected GoogleDriveApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return GoogleDriveApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(GoogleDriveApiName.class, apiNameStr);
}
public Drive getClient(GoogleDriveConfiguration googleDriveConfiguration) {
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersApiMethod.java
index fb3859f..417342c 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -38,8 +36,6 @@ public enum GmailUsersApiMethod implements ApiMethod {
arg("userId", String.class),
arg("content", com.google.api.services.gmail.model.WatchRequest.class));
- private static final GmailUsersApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -49,27 +45,6 @@ public enum GmailUsersApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersDraftsApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersDraftsApiMethod.java
index be8eb6a..603243d 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersDraftsApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersDraftsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.Drafts;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -80,8 +78,6 @@ public enum GmailUsersDraftsApiMethod implements ApiMethod {
arg("content", com.google.api.services.gmail.model.Draft.class),
arg("mediaContent", com.google.api.client.http.AbstractInputStreamContent.class));
- private static final GmailUsersDraftsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersDraftsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -91,27 +87,6 @@ public enum GmailUsersDraftsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersDraftsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersHistoryApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersHistoryApiMethod.java
index 2f70bb2..1f2dfbc 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersHistoryApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersHistoryApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.History;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -27,8 +25,6 @@ public enum GmailUsersHistoryApiMethod implements ApiMethod {
"list",
arg("userId", String.class));
- private static final GmailUsersHistoryApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersHistoryApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -38,27 +34,6 @@ public enum GmailUsersHistoryApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersHistoryApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersLabelsApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersLabelsApiMethod.java
index 1a31499..7424ab1 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersLabelsApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersLabelsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.Labels;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum GmailUsersLabelsApiMethod implements ApiMethod {
arg("id", String.class),
arg("content", com.google.api.services.gmail.model.Label.class));
- private static final GmailUsersLabelsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersLabelsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum GmailUsersLabelsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersLabelsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesApiMethod.java
index b0e0dbe..d197d3c 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.Messages;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -113,8 +111,6 @@ public enum GmailUsersMessagesApiMethod implements ApiMethod {
arg("userId", String.class),
arg("id", String.class));
- private static final GmailUsersMessagesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersMessagesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -124,27 +120,6 @@ public enum GmailUsersMessagesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersMessagesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesAttachmentsApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesAttachmentsApiMethod.java
index 69fe198..c9bf78c 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesAttachmentsApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersMessagesAttachmentsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.Messages.Attachments;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -29,8 +27,6 @@ public enum GmailUsersMessagesAttachmentsApiMethod implements ApiMethod {
arg("messageId", String.class),
arg("id", String.class));
- private static final GmailUsersMessagesAttachmentsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersMessagesAttachmentsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -40,27 +36,6 @@ public enum GmailUsersMessagesAttachmentsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersMessagesAttachmentsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersThreadsApiMethod.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersThreadsApiMethod.java
index a703af5..1b31f3b 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersThreadsApiMethod.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GmailUsersThreadsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.mail.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.gmail.Gmail.Users.Threads;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -58,8 +56,6 @@ public enum GmailUsersThreadsApiMethod implements ApiMethod {
arg("userId", String.class),
arg("id", String.class));
- private static final GmailUsersThreadsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private GmailUsersThreadsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -69,27 +65,6 @@ public enum GmailUsersThreadsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static GmailUsersThreadsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GoogleMailApiName.java b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GoogleMailApiName.java
index 55e220b..915f956 100644
--- a/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GoogleMailApiName.java
+++ b/components/camel-google-mail/src/generated/java/org/apache/camel/component/google/mail/internal/GoogleMailApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.google.mail.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component GoogleMail
@@ -28,8 +26,6 @@ public enum GoogleMailApiName implements ApiName {
USERS("users");
- private static final GoogleMailApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private GoogleMailApiName(String name) {
@@ -41,25 +37,4 @@ public enum GoogleMailApiName implements ApiName {
return name;
}
- public static GoogleMailApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
index 8846caa..a4bca71 100644
--- a/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
+++ b/components/camel-google-mail/src/main/java/org/apache/camel/component/google/mail/GoogleMailComponent.java
@@ -52,7 +52,7 @@ public class GoogleMailComponent
@Override
protected GoogleMailApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return GoogleMailApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(GoogleMailApiName.class, apiNameStr);
}
public Gmail getClient(GoogleMailConfiguration googleMailConfiguration) {
diff --git a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/GoogleSheetsApiName.java b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/GoogleSheetsApiName.java
index 04a1f11..8006a7c 100644
--- a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/GoogleSheetsApiName.java
+++ b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/GoogleSheetsApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.google.sheets.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component GoogleSheets
@@ -18,8 +16,6 @@ public enum GoogleSheetsApiName implements ApiName {
DATA("data");
- private static final GoogleSheetsApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private GoogleSheetsApiName(String name) {
@@ -31,25 +27,4 @@ public enum GoogleSheetsApiName implements ApiName {
return name;
}
- public static GoogleSheetsApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsApiMethod.java b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsApiMethod.java
index 3da049d..a6c9b3e 100644
--- a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsApiMethod.java
+++ b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.sheets.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.sheets.v4.Sheets.Spreadsheets;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -56,8 +54,6 @@ public enum SheetsSpreadsheetsApiMethod implements ApiMethod {
com.google.api.services.sheets.v4.Sheets.Spreadsheets.Values.class,
"values");
- private static final SheetsSpreadsheetsApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SheetsSpreadsheetsApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -67,27 +63,6 @@ public enum SheetsSpreadsheetsApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SheetsSpreadsheetsApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsValuesApiMethod.java b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsValuesApiMethod.java
index f800530..41e7a2c 100644
--- a/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsValuesApiMethod.java
+++ b/components/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/internal/SheetsSpreadsheetsValuesApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.google.sheets.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.google.api.services.sheets.v4.Sheets.Spreadsheets.Values;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -84,8 +82,6 @@ public enum SheetsSpreadsheetsValuesApiMethod implements ApiMethod {
arg("range", String.class),
arg("values", com.google.api.services.sheets.v4.model.ValueRange.class));
- private static final SheetsSpreadsheetsValuesApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SheetsSpreadsheetsValuesApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -95,27 +91,6 @@ public enum SheetsSpreadsheetsValuesApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SheetsSpreadsheetsValuesApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsComponent.java b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsComponent.java
index 6818714..8e8efad 100644
--- a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsComponent.java
+++ b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsComponent.java
@@ -53,7 +53,7 @@ public class GoogleSheetsComponent
@Override
protected GoogleSheetsApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return GoogleSheetsApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(GoogleSheetsApiName.class, apiNameStr);
}
public Sheets getClient(GoogleSheetsConfiguration config) {
diff --git a/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2ApiName.java b/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2ApiName.java
index 2bfa282..fe595ed 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2ApiName.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2ApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.olingo2.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Olingo2
@@ -16,8 +14,6 @@ public enum Olingo2ApiName implements ApiName {
DEFAULT("");
- private static final Olingo2ApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private Olingo2ApiName(String name) {
@@ -29,25 +25,4 @@ public enum Olingo2ApiName implements ApiName {
return name;
}
- public static Olingo2ApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2AppApiMethod.java b/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2AppApiMethod.java
index 2d182c3..b94a42d 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2AppApiMethod.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/generated/java/org/apache/camel/component/olingo2/internal/Olingo2AppApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.olingo2.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.olingo2.api.Olingo2App;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -91,8 +89,6 @@ public enum Olingo2AppApiMethod implements ApiMethod {
arg("endpointHttpHeaders", java.util.Map.class),
arg("responseHandler", org.apache.camel.component.olingo2.api.Olingo2ResponseHandler.class));
- private static final Olingo2AppApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private Olingo2AppApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -102,27 +98,6 @@ public enum Olingo2AppApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static Olingo2AppApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
index 6302d50..f6f7d8d 100644
--- a/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
+++ b/components/camel-olingo2/camel-olingo2-component/src/main/java/org/apache/camel/component/olingo2/Olingo2Component.java
@@ -62,7 +62,7 @@ public class Olingo2Component extends AbstractApiComponent<Olingo2ApiName, Oling
@Override
protected Olingo2ApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return Olingo2ApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(Olingo2ApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4ApiName.java b/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4ApiName.java
index e53ca38..87bccef 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4ApiName.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4ApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.olingo4.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Olingo4
@@ -16,8 +14,6 @@ public enum Olingo4ApiName implements ApiName {
DEFAULT("");
- private static final Olingo4ApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private Olingo4ApiName(String name) {
@@ -29,25 +25,4 @@ public enum Olingo4ApiName implements ApiName {
return name;
}
- public static Olingo4ApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4AppApiMethod.java b/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4AppApiMethod.java
index 755f9ef..eedff0e 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4AppApiMethod.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/generated/java/org/apache/camel/component/olingo4/internal/Olingo4AppApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.olingo4.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.apache.camel.component.olingo4.api.Olingo4App;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -100,8 +98,6 @@ public enum Olingo4AppApiMethod implements ApiMethod {
arg("endpointHttpHeaders", java.util.Map.class),
arg("responseHandler", org.apache.camel.component.olingo4.api.Olingo4ResponseHandler.class));
- private static final Olingo4AppApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private Olingo4AppApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -111,27 +107,6 @@ public enum Olingo4AppApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static Olingo4AppApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
index 8606478..5026610 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Component.java
@@ -62,7 +62,7 @@ public class Olingo4Component extends AbstractApiComponent<Olingo4ApiName, Oling
@Override
protected Olingo4ApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return Olingo4ApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(Olingo4ApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AccountApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AccountApiMethod.java
index f278408..ba04864 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AccountApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AccountApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.Account;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -48,8 +46,6 @@ public enum AccountApiMethod implements ApiMethod {
"updater",
arg("pathSid", String.class));
- private static final AccountApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AccountApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -59,27 +55,6 @@ public enum AccountApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AccountApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressApiMethod.java
index 3f4eeeb..c8d9c93 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Address;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -85,8 +83,6 @@ public enum AddressApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final AddressApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AddressApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -96,27 +92,6 @@ public enum AddressApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AddressApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressDependentPhoneNumberApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressDependentPhoneNumberApiMethod.java
index d43f9da..e3f2628 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressDependentPhoneNumberApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AddressDependentPhoneNumberApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.address.DependentPhoneNumber;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum AddressDependentPhoneNumberApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathAddressSid", String.class));
- private static final AddressDependentPhoneNumberApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AddressDependentPhoneNumberApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum AddressDependentPhoneNumberApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AddressDependentPhoneNumberApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ApplicationApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ApplicationApiMethod.java
index 21e4db3..5be193a 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ApplicationApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ApplicationApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Application;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -73,8 +71,6 @@ public enum ApplicationApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final ApplicationApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ApplicationApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -84,27 +80,6 @@ public enum ApplicationApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ApplicationApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryApiMethod.java
index 9647e2c..f62992d 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.AvailablePhoneNumberCountry;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -42,8 +40,6 @@ public enum AvailablePhoneNumberCountryApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final AvailablePhoneNumberCountryApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AvailablePhoneNumberCountryApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -53,27 +49,6 @@ public enum AvailablePhoneNumberCountryApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AvailablePhoneNumberCountryApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryLocalApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryLocalApiMethod.java
index 31165da..db16255 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryLocalApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryLocalApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.availablephonenumbercountry.Local;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum AvailablePhoneNumberCountryLocalApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathCountryCode", String.class));
- private static final AvailablePhoneNumberCountryLocalApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AvailablePhoneNumberCountryLocalApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum AvailablePhoneNumberCountryLocalApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AvailablePhoneNumberCountryLocalApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryMobileApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryMobileApiMethod.java
index ab38d30..3f6bd22 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryMobileApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryMobileApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.availablephonenumbercountry.Mobile;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum AvailablePhoneNumberCountryMobileApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathCountryCode", String.class));
- private static final AvailablePhoneNumberCountryMobileApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AvailablePhoneNumberCountryMobileApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum AvailablePhoneNumberCountryMobileApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AvailablePhoneNumberCountryMobileApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryTollFreeApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryTollFreeApiMethod.java
index 010455b..d01a3ed 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryTollFreeApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryTollFreeApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.availablephonenumbercountry.TollFree;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum AvailablePhoneNumberCountryTollFreeApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathCountryCode", String.class));
- private static final AvailablePhoneNumberCountryTollFreeApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private AvailablePhoneNumberCountryTollFreeApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum AvailablePhoneNumberCountryTollFreeApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static AvailablePhoneNumberCountryTollFreeApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallApiMethod.java
index 6b488f2..6eb853f 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Call;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -109,8 +107,6 @@ public enum CallApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final CallApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CallApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -120,27 +116,6 @@ public enum CallApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CallApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackApiMethod.java
index 15f1ad7..fd11c9c 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.call.Feedback;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum CallFeedbackApiMethod implements ApiMethod {
arg("pathCallSid", String.class),
arg("qualityScore", Integer.class));
- private static final CallFeedbackApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CallFeedbackApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum CallFeedbackApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CallFeedbackApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackSummaryApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackSummaryApiMethod.java
index ddcb0ccd..233c542 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackSummaryApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallFeedbackSummaryApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.call.FeedbackSummary;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -57,8 +55,6 @@ public enum CallFeedbackSummaryApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final CallFeedbackSummaryApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CallFeedbackSummaryApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -68,27 +64,6 @@ public enum CallFeedbackSummaryApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CallFeedbackSummaryApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallNotificationApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallNotificationApiMethod.java
index 49e3f90..c4e6bea 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallNotificationApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallNotificationApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.call.Notification;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -46,8 +44,6 @@ public enum CallNotificationApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathCallSid", String.class));
- private static final CallNotificationApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CallNotificationApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -57,27 +53,6 @@ public enum CallNotificationApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CallNotificationApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallRecordingApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallRecordingApiMethod.java
index 7cbf5a2..1de8b57 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallRecordingApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/CallRecordingApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.call.Recording;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -85,8 +83,6 @@ public enum CallRecordingApiMethod implements ApiMethod {
arg("pathSid", String.class),
arg("status", com.twilio.rest.api.v2010.account.call.Recording.Status.class));
- private static final CallRecordingApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private CallRecordingApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -96,27 +92,6 @@ public enum CallRecordingApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static CallRecordingApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceApiMethod.java
index 0196803..b437414 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Conference;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -53,8 +51,6 @@ public enum ConferenceApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final ConferenceApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ConferenceApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -64,27 +60,6 @@ public enum ConferenceApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ConferenceApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceParticipantApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceParticipantApiMethod.java
index ad991a6..ddfc2d4 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceParticipantApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConferenceParticipantApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.conference.Participant;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -87,8 +85,6 @@ public enum ConferenceParticipantApiMethod implements ApiMethod {
arg("pathConferenceSid", String.class),
arg("pathCallSid", String.class));
- private static final ConferenceParticipantApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ConferenceParticipantApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -98,27 +94,6 @@ public enum ConferenceParticipantApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ConferenceParticipantApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConnectAppApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConnectAppApiMethod.java
index 8f31924..b1286b87 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConnectAppApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ConnectAppApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.ConnectApp;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -64,8 +62,6 @@ public enum ConnectAppApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final ConnectAppApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ConnectAppApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -75,27 +71,6 @@ public enum ConnectAppApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ConnectAppApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberApiMethod.java
index 29ec4bf..d3122a9 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.IncomingPhoneNumber;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -86,8 +84,6 @@ public enum IncomingPhoneNumberApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final IncomingPhoneNumberApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private IncomingPhoneNumberApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -97,27 +93,6 @@ public enum IncomingPhoneNumberApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static IncomingPhoneNumberApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberLocalApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberLocalApiMethod.java
index 2e6f2b9..311bde2 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberLocalApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberLocalApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.incomingphonenumber.Local;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -42,8 +40,6 @@ public enum IncomingPhoneNumberLocalApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final IncomingPhoneNumberLocalApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private IncomingPhoneNumberLocalApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -53,27 +49,6 @@ public enum IncomingPhoneNumberLocalApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static IncomingPhoneNumberLocalApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberMobileApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberMobileApiMethod.java
index 0712b96..6d61738 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberMobileApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberMobileApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.incomingphonenumber.Mobile;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -42,8 +40,6 @@ public enum IncomingPhoneNumberMobileApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final IncomingPhoneNumberMobileApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private IncomingPhoneNumberMobileApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -53,27 +49,6 @@ public enum IncomingPhoneNumberMobileApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static IncomingPhoneNumberMobileApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberTollFreeApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberTollFreeApiMethod.java
index e399a7b..9c2694d 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberTollFreeApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/IncomingPhoneNumberTollFreeApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.incomingphonenumber.TollFree;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -42,8 +40,6 @@ public enum IncomingPhoneNumberTollFreeApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final IncomingPhoneNumberTollFreeApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private IncomingPhoneNumberTollFreeApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -53,27 +49,6 @@ public enum IncomingPhoneNumberTollFreeApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static IncomingPhoneNumberTollFreeApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/KeyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/KeyApiMethod.java
index 99352a4..dde7ab7 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/KeyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/KeyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Key;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -64,8 +62,6 @@ public enum KeyApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final KeyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private KeyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -75,27 +71,6 @@ public enum KeyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static KeyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageApiMethod.java
index dd35c3f..628ea26 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Message;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -126,8 +124,6 @@ public enum MessageApiMethod implements ApiMethod {
arg("pathSid", String.class),
arg("body", String.class));
- private static final MessageApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private MessageApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -137,27 +133,6 @@ public enum MessageApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static MessageApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageFeedbackApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageFeedbackApiMethod.java
index 2009ec5..66f2e2b 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageFeedbackApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageFeedbackApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.message.Feedback;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum MessageFeedbackApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathMessageSid", String.class));
- private static final MessageFeedbackApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private MessageFeedbackApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum MessageFeedbackApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static MessageFeedbackApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageMediaApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageMediaApiMethod.java
index ce498cc..689d286 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageMediaApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/MessageMediaApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.message.Media;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum MessageMediaApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathMessageSid", String.class));
- private static final MessageMediaApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private MessageMediaApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum MessageMediaApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static MessageMediaApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewKeyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewKeyApiMethod.java
index c59c72f..6d9ecf7 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewKeyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewKeyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.NewKey;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum NewKeyApiMethod implements ApiMethod {
"creator",
arg("pathAccountSid", String.class));
- private static final NewKeyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private NewKeyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum NewKeyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static NewKeyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewSigningKeyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewSigningKeyApiMethod.java
index d390e2e..5e8de9b 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewSigningKeyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NewSigningKeyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.NewSigningKey;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum NewSigningKeyApiMethod implements ApiMethod {
"creator",
arg("pathAccountSid", String.class));
- private static final NewSigningKeyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private NewSigningKeyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum NewSigningKeyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static NewSigningKeyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NotificationApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NotificationApiMethod.java
index 89870c5..e40d0d5 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NotificationApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/NotificationApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Notification;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -42,8 +40,6 @@ public enum NotificationApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final NotificationApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private NotificationApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -53,27 +49,6 @@ public enum NotificationApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static NotificationApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/OutgoingCallerIdApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/OutgoingCallerIdApiMethod.java
index 96f3db8..be0a5ba 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/OutgoingCallerIdApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/OutgoingCallerIdApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.OutgoingCallerId;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -64,8 +62,6 @@ public enum OutgoingCallerIdApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final OutgoingCallerIdApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private OutgoingCallerIdApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -75,27 +71,6 @@ public enum OutgoingCallerIdApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static OutgoingCallerIdApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueApiMethod.java
index 1b2f1e0..e1be6a9 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Queue;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -75,8 +73,6 @@ public enum QueueApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final QueueApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private QueueApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -86,27 +82,6 @@ public enum QueueApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static QueueApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueMemberApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueMemberApiMethod.java
index 982e41b..f7546ea 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueMemberApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/QueueMemberApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.queue.Member;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -61,8 +59,6 @@ public enum QueueMemberApiMethod implements ApiMethod {
arg("pathCallSid", String.class),
arg("url", java.net.URI.class));
- private static final QueueMemberApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private QueueMemberApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -72,27 +68,6 @@ public enum QueueMemberApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static QueueMemberApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultApiMethod.java
index 2926977..0b9a65b 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.recording.AddOnResult;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum RecordingAddOnResultApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathReferenceSid", String.class));
- private static final RecordingAddOnResultApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private RecordingAddOnResultApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum RecordingAddOnResultApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static RecordingAddOnResultApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultPayloadApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultPayloadApiMethod.java
index 50e78c9..5cda7ec 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultPayloadApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingAddOnResultPayloadApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.recording.addonresult.Payload;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -65,8 +63,6 @@ public enum RecordingAddOnResultPayloadApiMethod implements ApiMethod {
arg("pathReferenceSid", String.class),
arg("pathAddOnResultSid", String.class));
- private static final RecordingAddOnResultPayloadApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private RecordingAddOnResultPayloadApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -76,27 +72,6 @@ public enum RecordingAddOnResultPayloadApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static RecordingAddOnResultPayloadApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingApiMethod.java
index fa22c6a..762567a 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Recording;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -53,8 +51,6 @@ public enum RecordingApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final RecordingApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private RecordingApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -64,27 +60,6 @@ public enum RecordingApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static RecordingApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingTranscriptionApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingTranscriptionApiMethod.java
index 565ad38..0b8014a 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingTranscriptionApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/RecordingTranscriptionApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.recording.Transcription;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -59,8 +57,6 @@ public enum RecordingTranscriptionApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathRecordingSid", String.class));
- private static final RecordingTranscriptionApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private RecordingTranscriptionApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -70,27 +66,6 @@ public enum RecordingTranscriptionApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static RecordingTranscriptionApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ShortCodeApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ShortCodeApiMethod.java
index 244c796..3d1d3fa 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ShortCodeApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ShortCodeApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.ShortCode;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -53,8 +51,6 @@ public enum ShortCodeApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final ShortCodeApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ShortCodeApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -64,27 +60,6 @@ public enum ShortCodeApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ShortCodeApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SigningKeyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SigningKeyApiMethod.java
index 1d5bf1b..200c43e 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SigningKeyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SigningKeyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.SigningKey;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -64,8 +62,6 @@ public enum SigningKeyApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final SigningKeyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SigningKeyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -75,27 +71,6 @@ public enum SigningKeyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SigningKeyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialApiMethod.java
index b76d376..6a9a825 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -87,8 +85,6 @@ public enum SipCredentialApiMethod implements ApiMethod {
arg("pathCredentialListSid", String.class),
arg("pathSid", String.class));
- private static final SipCredentialApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipCredentialApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -98,27 +94,6 @@ public enum SipCredentialApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipCredentialApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialListApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialListApiMethod.java
index 3f733d7..ca9954c 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialListApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipCredentialListApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.CredentialList;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -77,8 +75,6 @@ public enum SipCredentialListApiMethod implements ApiMethod {
arg("pathSid", String.class),
arg("friendlyName", String.class));
- private static final SipCredentialListApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipCredentialListApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -88,27 +84,6 @@ public enum SipCredentialListApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipCredentialListApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainApiMethod.java
index 4dfece4..cdefd63 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.Domain;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -75,8 +73,6 @@ public enum SipDomainApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final SipDomainApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipDomainApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -86,27 +82,6 @@ public enum SipDomainApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipDomainApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainCredentialListMappingApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainCredentialListMappingApiMethod.java
index 3d178b8..e1a0530 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainCredentialListMappingApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainCredentialListMappingApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.domain.CredentialListMapping;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -72,8 +70,6 @@ public enum SipDomainCredentialListMappingApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathDomainSid", String.class));
- private static final SipDomainCredentialListMappingApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipDomainCredentialListMappingApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -83,27 +79,6 @@ public enum SipDomainCredentialListMappingApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipDomainCredentialListMappingApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainIpAccessControlListMappingApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainIpAccessControlListMappingApiMethod.java
index 36a9a8d..80fe171 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainIpAccessControlListMappingApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipDomainIpAccessControlListMappingApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.domain.IpAccessControlListMapping;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -72,8 +70,6 @@ public enum SipDomainIpAccessControlListMappingApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathDomainSid", String.class));
- private static final SipDomainIpAccessControlListMappingApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipDomainIpAccessControlListMappingApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -83,27 +79,6 @@ public enum SipDomainIpAccessControlListMappingApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipDomainIpAccessControlListMappingApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListApiMethod.java
index 6704918..c6a4758 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.IpAccessControlList;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -77,8 +75,6 @@ public enum SipIpAccessControlListApiMethod implements ApiMethod {
arg("pathSid", String.class),
arg("friendlyName", String.class));
- private static final SipIpAccessControlListApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipIpAccessControlListApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -88,27 +84,6 @@ public enum SipIpAccessControlListApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipIpAccessControlListApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListIpAddressApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListIpAddressApiMethod.java
index 2854546..292c758 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListIpAddressApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/SipIpAccessControlListIpAddressApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.sip.ipaccesscontrollist.IpAddress;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -87,8 +85,6 @@ public enum SipIpAccessControlListIpAddressApiMethod implements ApiMethod {
arg("pathIpAccessControlListSid", String.class),
arg("pathSid", String.class));
- private static final SipIpAccessControlListIpAddressApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private SipIpAccessControlListIpAddressApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -98,27 +94,6 @@ public enum SipIpAccessControlListIpAddressApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static SipIpAccessControlListIpAddressApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TokenApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TokenApiMethod.java
index 009fd70..7b47420 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TokenApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TokenApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Token;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum TokenApiMethod implements ApiMethod {
"creator",
arg("pathAccountSid", String.class));
- private static final TokenApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private TokenApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum TokenApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static TokenApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TranscriptionApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TranscriptionApiMethod.java
index 0328dec..65e20d8 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TranscriptionApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TranscriptionApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.Transcription;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -53,8 +51,6 @@ public enum TranscriptionApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final TranscriptionApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private TranscriptionApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -64,27 +60,6 @@ public enum TranscriptionApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static TranscriptionApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TwilioApiName.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TwilioApiName.java
index 5bb4c2e..a00cab2 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TwilioApiName.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/TwilioApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.twilio.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Twilio
@@ -126,8 +124,6 @@ public enum TwilioApiName implements ApiName {
USAGE_RECORD_YESTERDAY("usage-record-yesterday");
- private static final TwilioApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private TwilioApiName(String name) {
@@ -139,25 +135,4 @@ public enum TwilioApiName implements ApiName {
return name;
}
- public static TwilioApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordAllTimeApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordAllTimeApiMethod.java
index f9ee99a..a654af7 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordAllTimeApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordAllTimeApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.AllTime;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordAllTimeApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordAllTimeApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordAllTimeApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordAllTimeApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordAllTimeApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordApiMethod.java
index 17fb24c..6072333 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.Record;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordDailyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordDailyApiMethod.java
index 82f7931..80365db 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordDailyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordDailyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.Daily;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordDailyApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordDailyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordDailyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordDailyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordDailyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordLastMonthApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordLastMonthApiMethod.java
index 529c071..9f92ef5 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordLastMonthApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordLastMonthApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.LastMonth;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordLastMonthApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordLastMonthApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordLastMonthApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordLastMonthApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordLastMonthApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordMonthlyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordMonthlyApiMethod.java
index f42237e..a19607e 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordMonthlyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordMonthlyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.Monthly;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordMonthlyApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordMonthlyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordMonthlyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordMonthlyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordMonthlyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordThisMonthApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordThisMonthApiMethod.java
index 0008019..f13bf13 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordThisMonthApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordThisMonthApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.ThisMonth;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordThisMonthApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordThisMonthApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordThisMonthApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordThisMonthApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordThisMonthApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordTodayApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordTodayApiMethod.java
index fe8a5be..13288f2 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordTodayApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordTodayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.Today;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordTodayApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordTodayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordTodayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordTodayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordTodayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYearlyApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYearlyApiMethod.java
index 3681eda..f065bfd 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYearlyApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYearlyApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.Yearly;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordYearlyApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordYearlyApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordYearlyApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordYearlyApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordYearlyApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYesterdayApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYesterdayApiMethod.java
index 66a723d..76b0815 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYesterdayApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageRecordYesterdayApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.record.Yesterday;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -31,8 +29,6 @@ public enum UsageRecordYesterdayApiMethod implements ApiMethod {
"reader",
arg("pathAccountSid", String.class));
- private static final UsageRecordYesterdayApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageRecordYesterdayApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -42,27 +38,6 @@ public enum UsageRecordYesterdayApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageRecordYesterdayApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageTriggerApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageTriggerApiMethod.java
index a0fecfd..f7ad80f 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageTriggerApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/UsageTriggerApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.usage.Trigger;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -79,8 +77,6 @@ public enum UsageTriggerApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("pathSid", String.class));
- private static final UsageTriggerApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private UsageTriggerApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -90,27 +86,6 @@ public enum UsageTriggerApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static UsageTriggerApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ValidationRequestApiMethod.java b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ValidationRequestApiMethod.java
index 2ce415b..61db82c 100644
--- a/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ValidationRequestApiMethod.java
+++ b/components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/ValidationRequestApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.twilio.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import com.twilio.rest.api.v2010.account.ValidationRequest;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -33,8 +31,6 @@ public enum ValidationRequestApiMethod implements ApiMethod {
arg("pathAccountSid", String.class),
arg("phoneNumber", com.twilio.type.PhoneNumber.class));
- private static final ValidationRequestApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ValidationRequestApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -44,27 +40,6 @@ public enum ValidationRequestApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ValidationRequestApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
index 76c2d4d..fbcc02d 100644
--- a/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
+++ b/components/camel-twilio/src/main/java/org/apache/camel/component/twilio/TwilioComponent.java
@@ -57,7 +57,7 @@ public class TwilioComponent extends AbstractApiComponent<TwilioApiName, TwilioC
@Override
protected TwilioApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return TwilioApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(TwilioApiName.class, apiNameStr);
}
@Override
diff --git a/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiMethod.java b/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiMethod.java
index 80d44ff..6ca9ea6 100644
--- a/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiMethod.java
+++ b/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiMethod.java
@@ -6,14 +6,12 @@ package org.apache.camel.component.zendesk.internal;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import org.zendesk.client.v2.Zendesk;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -1801,8 +1799,6 @@ public enum ZendeskApiMethod implements ApiMethod {
arg("userId", long.class),
arg("identityId", long.class));
- private static final ZendeskApiMethod[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ZendeskApiMethod(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -1812,27 +1808,6 @@ public enum ZendeskApiMethod implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static ZendeskApiMethod fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiName.java b/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiName.java
index e02f675..6fecc1f 100644
--- a/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiName.java
+++ b/components/camel-zendesk/src/generated/java/org/apache/camel/component/zendesk/internal/ZendeskApiName.java
@@ -4,9 +4,7 @@
*/
package org.apache.camel.component.zendesk.internal;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component Zendesk
@@ -16,8 +14,6 @@ public enum ZendeskApiName implements ApiName {
DEFAULT("");
- private static final ZendeskApiName[] CACHED_ENUM_VALUES = values();
-
private final String name;
private ZendeskApiName(String name) {
@@ -29,25 +25,4 @@ public enum ZendeskApiName implements ApiName {
return name;
}
- public static ZendeskApiName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}
diff --git a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
index 7173587..a53e633 100644
--- a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
+++ b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
@@ -57,7 +57,7 @@ public class ZendeskComponent extends AbstractApiComponent<ZendeskApiName, Zende
@Override
protected ZendeskApiName getApiName(String apiNameStr) throws IllegalArgumentException {
- return ZendeskApiName.fromValue(apiNameStr);
+ return getCamelContext().getTypeConverter().convertTo(ZendeskApiName.class, apiNameStr);
}
/**
@@ -183,7 +183,8 @@ public class ZendeskComponent extends AbstractApiComponent<ZendeskApiName, Zende
protected Endpoint createEndpoint(
String uri, String methodName, ZendeskApiName apiName,
ZendeskConfiguration endpointConfiguration) {
- endpointConfiguration.setMethodName(ZendeskApiMethod.fromValue(methodName));
+
+ endpointConfiguration.setMethodName(getCamelContext().getTypeConverter().convertTo(ZendeskApiMethod.class, methodName));
if (endpointConfiguration.getServerUrl() == null) {
endpointConfiguration.setServerUrl(serverUrl);
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-method-enum.vm b/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-method-enum.vm
index 4f2d559..4165fb5 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-method-enum.vm
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-method-enum.vm
@@ -38,14 +38,12 @@ package $packageName;
import java.lang.reflect.Method;
import java.util.List;
-import java.util.Locale;
import $proxyType.CanonicalName;
import org.apache.camel.support.component.ApiMethod;
import org.apache.camel.support.component.ApiMethodArg;
import org.apache.camel.support.component.ApiMethodImpl;
-import org.apache.camel.util.StringHelper;
import static org.apache.camel.support.component.ApiMethodArg.arg;
@@ -61,8 +59,6 @@ public enum $enumName implements ApiMethod {
arg("$arg.Name", $helper.getType($arg.Type))#end)#if ( $foreach.hasNext ),$newLine#else;#end
#end
- private static final ${enumName}[] CACHED_ENUM_VALUES = values();
-
private final ApiMethod apiMethod;
private ${enumName}(Class<?> resultType, String name, ApiMethodArg... args) {
@@ -72,27 +68,6 @@ public enum $enumName implements ApiMethod {
@Override
public String getName() { return apiMethod.getName(); }
- public static $enumName fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
@Override
public Class<?> getResultType() { return apiMethod.getResultType(); }
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-name-enum.vm b/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-name-enum.vm
index 024665a..68b4e5c 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-name-enum.vm
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/resources/api-name-enum.vm
@@ -36,9 +36,7 @@
*/
package $packageName;
-import java.util.Locale;
import org.apache.camel.support.component.ApiName;
-import org.apache.camel.util.StringHelper;
/**
* Camel {@link ApiName} Enumeration for Component $componentName
@@ -51,8 +49,6 @@ public enum $apiNameEnum implements ApiName {
#end
- private static final ${apiNameEnum}[] CACHED_ENUM_VALUES = values();
-
private final String name;
private ${apiNameEnum}(String name) {
@@ -64,25 +60,4 @@ public enum $apiNameEnum implements ApiName {
return name;
}
- public static $apiNameEnum fromValue(String value) throws IllegalArgumentException {
- value = getEnumConstant(value);
- for (int i = 0; i < CACHED_ENUM_VALUES.length; i++) {
- if (CACHED_ENUM_VALUES[i].toString().equalsIgnoreCase(value)) {
- return CACHED_ENUM_VALUES[i];
- }
- }
- throw new IllegalArgumentException("Invalid value " + value);
- }
-
- private static String getEnumConstant(String enumValue) {
- if (enumValue == null || enumValue.isEmpty()) {
- return "DEFAULT";
- }
- String value = StringHelper.camelCaseToDash(enumValue);
- // replace dash with underscore and upper case
- value = value.replace('-', '_');
- value = value.toUpperCase(Locale.ENGLISH);
- return value;
- }
-
}