diff --git a/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountCreator.java b/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountCreator.java index c4793a5e2..328c1fc60 100644 --- a/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountCreator.java @@ -132,6 +132,7 @@ private void addPostParams(final Request request) { } } + private void addHeaderParams(final Request request) { if (xTwilioWebhookEnabled != null) { request.addHeaderParam("X-Twilio-Webhook-Enabled", xTwilioWebhookEnabled.toString()); diff --git a/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountUpdater.java b/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountUpdater.java index 01bc06773..6fd40fbb3 100644 --- a/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountUpdater.java +++ b/examples/java/src/main/java/com/twilio/rest/api/v2010/AccountUpdater.java @@ -109,4 +109,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java b/examples/java/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java index 6a6c70523..c7220bc83 100644 --- a/examples/java/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java @@ -148,4 +148,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/api/v2010/account/call/FeedbackCallSummaryUpdater.java b/examples/java/src/main/java/com/twilio/rest/api/v2010/account/call/FeedbackCallSummaryUpdater.java index dd84baa09..b25dddaa3 100644 --- a/examples/java/src/main/java/com/twilio/rest/api/v2010/account/call/FeedbackCallSummaryUpdater.java +++ b/examples/java/src/main/java/com/twilio/rest/api/v2010/account/call/FeedbackCallSummaryUpdater.java @@ -125,4 +125,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/AwsUpdater.java b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/AwsUpdater.java index 82c1dbc0d..705843b74 100644 --- a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/AwsUpdater.java +++ b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/AwsUpdater.java @@ -103,4 +103,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentials.java b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentials.java index 6960b5343..e28e0ac64 100644 --- a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentials.java +++ b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentials.java @@ -84,13 +84,13 @@ public class NewCredentials extends Resource { public static NewCredentialsCreator creator(final String testString, final Integer testInteger, final Float testNumberFloat){ return new NewCredentialsCreator(testString, testInteger, testNumberFloat); } - public static NewCredentialsCreator creator(final String testString, final Integer testInteger, final Map testObject){ + public static NewCredentialsCreator creator(final String testString, final Integer testInteger, final Object testObject){ return new NewCredentialsCreator(testString, testInteger, testObject); } public static NewCredentialsCreator creator(final String testString, final LocalDate testDate, final Float testNumberFloat){ return new NewCredentialsCreator(testString, testDate, testNumberFloat); } - public static NewCredentialsCreator creator(final String testString, final LocalDate testDate, final Map testObject){ + public static NewCredentialsCreator creator(final String testString, final LocalDate testDate, final Object testObject){ return new NewCredentialsCreator(testString, testDate, testObject); } diff --git a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentialsCreator.java b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentialsCreator.java index 2acabd640..c578b5303 100644 --- a/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentialsCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/flexapi/v1/credential/NewCredentialsCreator.java @@ -62,13 +62,13 @@ public class NewCredentialsCreator extends Creator{ private Double testNumberDouble; private BigDecimal testNumberInt32; private Long testNumberInt64; - private Map testObject; + private Object testObject; private ZonedDateTime testDateTime; private LocalDate testDate; private NewCredentials.Status testEnum; - private List> testObjectArray; - private Map testAnyType; - private List> testAnyArray; + private List testObjectArray; + private Object testAnyType; + private List testAnyArray; private List permissions; private String someA2PThing; @@ -77,7 +77,7 @@ public NewCredentialsCreator(final String testString, final Integer testInteger, this.testInteger = testInteger; this.testNumberFloat = testNumberFloat; } - public NewCredentialsCreator(final String testString, final Integer testInteger, final Map testObject) { + public NewCredentialsCreator(final String testString, final Integer testInteger, final Object testObject) { this.testString = testString; this.testInteger = testInteger; this.testObject = testObject; @@ -87,7 +87,7 @@ public NewCredentialsCreator(final String testString, final LocalDate testDate, this.testDate = testDate; this.testNumberFloat = testNumberFloat; } - public NewCredentialsCreator(final String testString, final LocalDate testDate, final Map testObject) { + public NewCredentialsCreator(final String testString, final LocalDate testDate, final Object testObject) { this.testString = testString; this.testDate = testDate; this.testObject = testObject; @@ -125,7 +125,7 @@ public NewCredentialsCreator setTestNumberInt64(final Long testNumberInt64){ this.testNumberInt64 = testNumberInt64; return this; } - public NewCredentialsCreator setTestObject(final Map testObject){ + public NewCredentialsCreator setTestObject(final Object testObject){ this.testObject = testObject; return this; } @@ -141,22 +141,22 @@ public NewCredentialsCreator setTestEnum(final NewCredentials.Status testEnum){ this.testEnum = testEnum; return this; } - public NewCredentialsCreator setTestObjectArray(final List> testObjectArray){ + public NewCredentialsCreator setTestObjectArray(final List testObjectArray){ this.testObjectArray = testObjectArray; return this; } - public NewCredentialsCreator setTestObjectArray(final Map testObjectArray){ + public NewCredentialsCreator setTestObjectArray(final Object testObjectArray){ return setTestObjectArray(Promoter.listOfOne(testObjectArray)); } - public NewCredentialsCreator setTestAnyType(final Map testAnyType){ + public NewCredentialsCreator setTestAnyType(final Object testAnyType){ this.testAnyType = testAnyType; return this; } - public NewCredentialsCreator setTestAnyArray(final List> testAnyArray){ + public NewCredentialsCreator setTestAnyArray(final List testAnyArray){ this.testAnyArray = testAnyArray; return this; } - public NewCredentialsCreator setTestAnyArray(final Map testAnyArray){ + public NewCredentialsCreator setTestAnyArray(final Object testAnyArray){ return setTestAnyArray(Promoter.listOfOne(testAnyArray)); } public NewCredentialsCreator setPermissions(final List permissions){ @@ -247,7 +247,7 @@ private void addPostParams(final Request request) { } if (testObjectArray != null) { - for (Map prop : testObjectArray) { + for (Object prop : testObjectArray) { request.addPostParam("TestObjectArray", Converter.mapToJson(prop)); } @@ -257,7 +257,7 @@ private void addPostParams(final Request request) { } if (testAnyArray != null) { - for (Map prop : testAnyArray) { + for (Object prop : testAnyArray) { request.addPostParam("TestAnyArray", Converter.mapToJson(prop)); } @@ -273,4 +273,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java index bcf936e19..bc7d0253d 100644 --- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java +++ b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKey.java @@ -77,7 +77,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString public class ApiKey extends Resource { - private static final long serialVersionUID = 99197666922652L; + private static final long serialVersionUID = 33828408490571L; @@ -134,7 +134,7 @@ public static ApiKey fromJson(final InputStream json, final ObjectMapper objectM private final String friendlyName; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; - private final Map policy; + private final Object policy; @JsonCreator private ApiKey( @@ -151,7 +151,7 @@ private ApiKey( final String dateUpdated, @JsonProperty("policy") - final Map policy + final Object policy ) { this.sid = sid; this.friendlyName = friendlyName; @@ -172,7 +172,7 @@ public final ZonedDateTime getDateCreated() { public final ZonedDateTime getDateUpdated() { return this.dateUpdated; } - public final Map getPolicy() { + public final Object getPolicy() { return this.policy; } diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java index 63dfdac9f..dc8d6b3b6 100644 --- a/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java +++ b/examples/java/src/main/java/com/twilio/rest/iam/v1/ApiKeyUpdater.java @@ -51,7 +51,7 @@ public class ApiKeyUpdater extends Updater{ private String pathSid; private String friendlyName; - private Map policy; + private Object policy; public ApiKeyUpdater(final String pathSid){ this.pathSid = pathSid; @@ -61,7 +61,7 @@ public ApiKeyUpdater setFriendlyName(final String friendlyName){ this.friendlyName = friendlyName; return this; } - public ApiKeyUpdater setPolicy(final Map policy){ + public ApiKeyUpdater setPolicy(final Object policy){ this.policy = policy; return this; } @@ -103,4 +103,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java index 54fc4d897..4e7e12d66 100644 --- a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java +++ b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKey.java @@ -77,7 +77,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString public class NewApiKey extends Resource { - private static final long serialVersionUID = 217181042856619L; + private static final long serialVersionUID = 58775637028152L; @@ -127,7 +127,7 @@ public static NewApiKey fromJson(final InputStream json, final ObjectMapper obje private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; private final String secret; - private final Map policy; + private final Object policy; @JsonCreator private NewApiKey( @@ -147,7 +147,7 @@ private NewApiKey( final String secret, @JsonProperty("policy") - final Map policy + final Object policy ) { this.sid = sid; this.friendlyName = friendlyName; @@ -172,7 +172,7 @@ public final ZonedDateTime getDateUpdated() { public final String getSecret() { return this.secret; } - public final Map getPolicy() { + public final Object getPolicy() { return this.policy; } diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java index 5732c0c52..f47ca8658 100644 --- a/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java @@ -57,7 +57,7 @@ public class NewApiKeyCreator extends Creator{ private String accountSid; private String friendlyName; private NewApiKey.Keytype keyType; - private Map policy; + private Object policy; public NewApiKeyCreator(final String accountSid) { this.accountSid = accountSid; @@ -75,7 +75,7 @@ public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType){ this.keyType = keyType; return this; } - public NewApiKeyCreator setPolicy(final Map policy){ + public NewApiKeyCreator setPolicy(final Object policy){ this.policy = policy; return this; } @@ -124,4 +124,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java b/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java index 07b2c793c..8efed5e4a 100644 --- a/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/iam/v1/TokenCreator.java @@ -162,4 +162,5 @@ private void addPostParams(final NoAuthRequest request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/previewiam/v1/TokenCreator.java b/examples/java/src/main/java/com/twilio/rest/previewiam/v1/TokenCreator.java index 39be29372..b441abe37 100644 --- a/examples/java/src/main/java/com/twilio/rest/previewiam/v1/TokenCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/previewiam/v1/TokenCreator.java @@ -162,4 +162,5 @@ private void addPostParams(final NoAuthRequest request) { } } + } diff --git a/examples/java/src/main/java/com/twilio/rest/versionless/deployedDevices/FleetCreator.java b/examples/java/src/main/java/com/twilio/rest/versionless/deployedDevices/FleetCreator.java index 5bf8a973d..4a98021c8 100644 --- a/examples/java/src/main/java/com/twilio/rest/versionless/deployedDevices/FleetCreator.java +++ b/examples/java/src/main/java/com/twilio/rest/versionless/deployedDevices/FleetCreator.java @@ -95,4 +95,5 @@ private void addPostParams(final Request request) { } } + } diff --git a/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts b/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts index 42d342f48..1e3fc1422 100644 --- a/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts +++ b/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts @@ -47,7 +47,7 @@ export interface NewCredentialsListInstanceCreateOptions { /** */ testNumberInt64?: number; /** */ - testObject?: Record; + testObject?: Record; /** */ testDateTime?: Date; /** */ diff --git a/examples/node/src/rest/iam/v1/apiKey.ts b/examples/node/src/rest/iam/v1/apiKey.ts index 38c1c1249..881869193 100644 --- a/examples/node/src/rest/iam/v1/apiKey.ts +++ b/examples/node/src/rest/iam/v1/apiKey.ts @@ -213,7 +213,7 @@ interface ApiKeyResource { friendly_name: string; date_created: Date; date_updated: Date; - policy: Record; + policy: Record; } export class ApiKeyInstance { @@ -253,7 +253,7 @@ export class ApiKeyInstance { /** * The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */ - policy: Record; + policy: Record; private get _proxy(): ApiKeyContext { this._context = diff --git a/examples/node/src/rest/iam/v1/newApiKey.ts b/examples/node/src/rest/iam/v1/newApiKey.ts index 6d67542d4..abd1242fb 100644 --- a/examples/node/src/rest/iam/v1/newApiKey.ts +++ b/examples/node/src/rest/iam/v1/newApiKey.ts @@ -134,7 +134,7 @@ interface NewApiKeyResource { date_created: Date; date_updated: Date; secret: string; - policy: Record; + policy: Record; } export class NewApiKeyInstance { @@ -173,7 +173,7 @@ export class NewApiKeyInstance { /** * Collection of allow assertions. */ - policy: Record; + policy: Record; /** * Provide a user-friendly representation diff --git a/src/main/resources/config/java.json b/src/main/resources/config/java.json index 6474d4674..665507839 100644 --- a/src/main/resources/config/java.json +++ b/src/main/resources/config/java.json @@ -60,7 +60,7 @@ "inbound_sms_price": "InboundSmsPrice", "integer": "Integer", "long": "Long", - "object": "Map", + "object": "Object", "outbound_call_price": "OutboundCallPrice", "outbound_call_price_with_origin": "OutboundCallPriceWithOrigin", "outbound_prefix_price": "OutboundPrefixPrice", diff --git a/src/main/resources/config/node.json b/src/main/resources/config/node.json index 8d75a9db5..da85fa770 100644 --- a/src/main/resources/config/node.json +++ b/src/main/resources/config/node.json @@ -19,7 +19,7 @@ "boolean": "boolean", "integer": "number", "long": "number", - "object": "Record", + "object": "Record", "phone_number_capabilities": "PhoneNumberCapabilities", "prefixed_collapsible_map": "Record", "string_map": "Record", diff --git a/src/main/resources/twilio-java/postParams.mustache b/src/main/resources/twilio-java/postParams.mustache index 9eeca1952..e3b451dbe 100644 --- a/src/main/resources/twilio-java/postParams.mustache +++ b/src/main/resources/twilio-java/postParams.mustache @@ -3,7 +3,7 @@ if ({{paramName}} != null) { {{#isFreeFormObject}} {{#isArray}} - for (Map prop : {{paramName}}) { + for (Object prop : {{paramName}}) { request.addPostParam("{{baseName}}", Converter.mapToJson(prop)); } {{/isArray}} @@ -45,4 +45,4 @@ {{>dateParams}} } {{/formParams}} - } \ No newline at end of file + }