Skip to content

Commit f9922e5

Browse files
tiwarishubham635sbanslakridaimanisha1997Copilot
authored
chore: Merge java modernisation changes into main (#691)
<!-- We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines, then fill out the blanks below. Please format the PR title appropriately based on the type of change: <type>[!]: <description> Where <type> is one of: docs, chore, feat, fix, test, misc. Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature). **All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.** Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged! e.g. Fixes #1 Closes #2 --> # Fixes # A short description of what this PR does. ### Checklist - [x] I acknowledge that all my contributions will be made under the project's license - [ ] Run `make test-docker` - [ ] Verify affected language: - [ ] Generate [twilio-go](https://github.com/twilio/twilio-go) from our [OpenAPI specification](https://github.com/twilio/twilio-oai) using the [build_twilio_go.py](./examples/build_twilio_go.py) using `python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go` and inspect the diff - [ ] Run `make test` in `twilio-go` - [ ] Create a pull request in `twilio-go` - [ ] Provide a link below to the pull request - [ ] I have made a material change to the repo (functionality, testing, spelling, grammar) - [ ] I have read the [Contribution Guidelines](https://github.com/twilio/twilio-oai-generator/blob/main/CONTRIBUTING.md) and my PR follows them - [ ] I have titled the PR appropriately - [ ] I have updated my branch with the main branch - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added the necessary documentation about the functionality in the appropriate .md file - [ ] I have added inline documentation to the code I modified If you have questions, please create a GitHub Issue in this repository. --------- Co-authored-by: sbansla <[email protected]> Co-authored-by: sbansla <[email protected]> Co-authored-by: kridai <[email protected]> Co-authored-by: manisha1997 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: shrutiburman <[email protected]>
1 parent 2dba57f commit f9922e5

File tree

298 files changed

+16915
-14262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+16915
-14262
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
language: [ 'csharp', 'go', 'java', 'node', 'php', 'python', 'ruby' ]
17+
language: ['java' ]
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 20
2020
env:

examples/csharp/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackCallSummaryResource.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ private static Request BuildUpdateRequest(UpdateFeedbackCallSummaryOptions optio
5656

5757
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/Feedback/Summary/{Sid}.json";
5858

59-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
60-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
6159
string PathSid = options.PathSid;
6260
path = path.Replace("{"+"Sid"+"}", PathSid);
61+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
62+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
6363

6464
return new Request(
6565
HttpMethod.Post,
@@ -137,6 +137,7 @@ public static async System.Threading.Tasks.Task<FeedbackCallSummaryResource> Upd
137137
return await UpdateAsync(options, client);
138138
}
139139
#endif
140+
140141

141142
/// <summary>
142143
/// Converts a JSON string into a FeedbackCallSummaryResource object

examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public List<KeyValuePair<string, string>> GetParams()
8383

8484

8585
}
86+
8687
/// <summary> delete </summary>
8788
public class DeleteCallOptions : IOptions<CallResource>
8889
{

examples/csharp/src/Twilio/Rest/Api/V2010/Account/CallResource.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public static async System.Threading.Tasks.Task<CallResource> CreateAsync(
134134
return await CreateAsync(options, client);
135135
}
136136
#endif
137+
137138

138139
/// <summary> delete </summary>
139140
/// <param name="options"> Delete Call parameters </param>
@@ -144,10 +145,10 @@ private static Request BuildDeleteRequest(DeleteCallOptions options, ITwilioRest
144145

145146
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{TestInteger}.json";
146147

147-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
148-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
149148
string PathTestInteger = options.PathTestInteger.ToString();
150149
path = path.Replace("{"+"TestInteger"+"}", PathTestInteger);
150+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
151+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
151152

152153
return new Request(
153154
HttpMethod.Delete,
@@ -212,10 +213,10 @@ private static Request BuildFetchRequest(FetchCallOptions options, ITwilioRestCl
212213

213214
string path = "/2010-04-01/Accounts/{AccountSid}/Calls/{TestInteger}.json";
214215

215-
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
216-
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
217216
string PathTestInteger = options.PathTestInteger.ToString();
218217
path = path.Replace("{"+"TestInteger"+"}", PathTestInteger);
218+
string PathAccountSid = options.PathAccountSid ?? client.AccountSid;
219+
path = path.Replace("{"+"AccountSid"+"}", PathAccountSid);
219220

220221
return new Request(
221222
HttpMethod.Get,

examples/csharp/src/Twilio/Rest/Api/V2010/AccountOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public List<KeyValuePair<string, string>> GetHeaderParams()
7676
}
7777

7878
}
79+
7980
/// <summary> delete </summary>
8081
public class DeleteAccountOptions : IOptions<AccountResource>
8182
{

examples/csharp/src/Twilio/Rest/Api/V2010/AccountResource.cs

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,93 @@ namespace Twilio.Rest.Api.V2010
3030
public class AccountResource : Resource
3131
{
3232

33+
public class TestResponseObjectTestObject
34+
{
35+
[JsonProperty("fax")]
36+
private bool Fax {get; set;}
37+
[JsonProperty("mms")]
38+
private bool Mms {get; set;}
39+
[JsonProperty("sms")]
40+
private bool Sms {get; set;}
41+
[JsonProperty("voice")]
42+
private bool Voice {get; set;}
43+
public TestResponseObjectTestObject() { }
44+
public class Builder
45+
{
46+
private TestResponseObjectTestObject _testResponseObjectTestObject = new TestResponseObjectTestObject();
47+
public Builder()
48+
{
49+
}
50+
public Builder WithFax(bool fax)
51+
{
52+
_testResponseObjectTestObject.Fax= fax;
53+
return this;
54+
}
55+
public Builder WithMms(bool mms)
56+
{
57+
_testResponseObjectTestObject.Mms= mms;
58+
return this;
59+
}
60+
public Builder WithSms(bool sms)
61+
{
62+
_testResponseObjectTestObject.Sms= sms;
63+
return this;
64+
}
65+
public Builder WithVoice(bool voice)
66+
{
67+
_testResponseObjectTestObject.Voice= voice;
68+
return this;
69+
}
70+
public TestResponseObjectTestObject Build()
71+
{
72+
return _testResponseObjectTestObject;
73+
}
74+
}
75+
}
76+
public class TestEnumStatus
77+
{
78+
public TestEnumStatus() { }
79+
public class Builder
80+
{
81+
private TestEnumStatus _testEnumStatus = new TestEnumStatus();
82+
public Builder()
83+
{
84+
}
85+
public TestEnumStatus Build()
86+
{
87+
return _testEnumStatus;
88+
}
89+
}
90+
}
91+
public class TestResponseObjectTestArrayOfObjectsInner
92+
{
93+
[JsonProperty("count")]
94+
private decimal Count {get; set;}
95+
[JsonProperty("description")]
96+
private string Description {get; set;}
97+
public TestResponseObjectTestArrayOfObjectsInner() { }
98+
public class Builder
99+
{
100+
private TestResponseObjectTestArrayOfObjectsInner _testResponseObjectTestArrayOfObjectsInner = new TestResponseObjectTestArrayOfObjectsInner();
101+
public Builder()
102+
{
103+
}
104+
public Builder WithCount(decimal count)
105+
{
106+
_testResponseObjectTestArrayOfObjectsInner.Count= count;
107+
return this;
108+
}
109+
public Builder WithDescription(string description)
110+
{
111+
_testResponseObjectTestArrayOfObjectsInner.Description= description;
112+
return this;
113+
}
114+
public TestResponseObjectTestArrayOfObjectsInner Build()
115+
{
116+
return _testResponseObjectTestArrayOfObjectsInner;
117+
}
118+
}
119+
}
33120

34121

35122
[JsonConverter(typeof(StringEnumConverter))]
@@ -140,6 +227,7 @@ public static async System.Threading.Tasks.Task<AccountResource> CreateAsync(
140227
return await CreateAsync(options, client);
141228
}
142229
#endif
230+
143231

144232
/// <summary> delete </summary>
145233
/// <param name="options"> Delete Account parameters </param>
@@ -484,6 +572,7 @@ public static async System.Threading.Tasks.Task<AccountResource> UpdateAsync(
484572
return await UpdateAsync(options, client);
485573
}
486574
#endif
575+
487576

488577
/// <summary>
489578
/// Converts a JSON string into a AccountResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/CallResource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public static async System.Threading.Tasks.Task<CallResource> UpdateAsync(
102102
return await UpdateAsync(options, client);
103103
}
104104
#endif
105+
105106

106107
/// <summary>
107108
/// Converts a JSON string into a CallResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/AwsResource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ public static async System.Threading.Tasks.Task<AwsResource> UpdateAsync(
361361
return await UpdateAsync(options, client);
362362
}
363363
#endif
364+
364365

365366
/// <summary>
366367
/// Converts a JSON string into a AwsResource object

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/NewCredentialsOptions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public class CreateNewCredentialsOptions : IOptions<NewCredentialsResource>
4141
public decimal? TestNumber { get; set; }
4242

4343

44-
public float? TestNumberFloat { get; set; }
44+
public float TestNumberFloat { get; set; }
4545

4646

47-
public double? TestNumberDouble { get; set; }
47+
public double TestNumberDouble { get; set; }
4848

4949

5050
public decimal? TestNumberInt32 { get; set; }
@@ -170,5 +170,6 @@ public List<KeyValuePair<string, string>> GetParams()
170170

171171

172172
}
173+
173174
}
174175

examples/csharp/src/Twilio/Rest/FlexApi/V1/Credential/NewCredentialsResource.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ public static NewCredentialsResource Create(
126126
string testString,
127127
int? testInteger = null,
128128
DateTime? testDate = null,
129-
float? testNumberFloat = null,
129+
float testNumberFloat = null,
130130
object testObject = null,
131131
bool? testBoolean = null,
132132
decimal? testNumber = null,
133-
double? testNumberDouble = null,
133+
double testNumberDouble = null,
134134
decimal? testNumberInt32 = null,
135135
long? testNumberInt64 = null,
136136
DateTime? testDateTime = null,
@@ -171,11 +171,11 @@ public static async System.Threading.Tasks.Task<NewCredentialsResource> CreateAs
171171
string testString,
172172
int? testInteger = null,
173173
DateTime? testDate = null,
174-
float? testNumberFloat = null,
174+
float testNumberFloat = null,
175175
object testObject = null,
176176
bool? testBoolean = null,
177177
decimal? testNumber = null,
178-
double? testNumberDouble = null,
178+
double testNumberDouble = null,
179179
decimal? testNumberInt32 = null,
180180
long? testNumberInt64 = null,
181181
DateTime? testDateTime = null,
@@ -191,6 +191,7 @@ public static async System.Threading.Tasks.Task<NewCredentialsResource> CreateAs
191191
return await CreateAsync(options, client);
192192
}
193193
#endif
194+
194195

195196
/// <summary>
196197
/// Converts a JSON string into a NewCredentialsResource object

0 commit comments

Comments
 (0)