Skip to content

Commit a292aa4

Browse files
Andras-Csanyipadamstx
andauthoredApr 13, 2021
fix(Enterprise Management): update service after recent API changes and add examples (#93)
Co-authored-by: Phil Adams <padamstx@gmail.com>
1 parent bcc1fe6 commit a292aa4

File tree

16 files changed

+955
-629
lines changed

16 files changed

+955
-629
lines changed
 

‎modules/enterprise-management/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/EnterpriseManagement.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-629bbb97-20201207-171303
15+
* IBM OpenAPI SDK Code Generator Version: 3.30.0-bd714324-20210406-200538
1616
*/
1717

1818
package com.ibm.cloud.platform_services.enterprise_management.v1;
@@ -162,6 +162,9 @@ public ServiceCall<ListAccountGroupsResponse> listAccountGroups(ListAccountGroup
162162
if (listAccountGroupsOptions.parentAccountGroupId() != null) {
163163
builder.query("parent_account_group_id", String.valueOf(listAccountGroupsOptions.parentAccountGroupId()));
164164
}
165+
if (listAccountGroupsOptions.nextDocid() != null) {
166+
builder.query("next_docid", String.valueOf(listAccountGroupsOptions.nextDocid()));
167+
}
165168
if (listAccountGroupsOptions.parent() != null) {
166169
builder.query("parent", String.valueOf(listAccountGroupsOptions.parent()));
167170
}
@@ -349,6 +352,9 @@ public ServiceCall<ListAccountsResponse> listAccounts(ListAccountsOptions listAc
349352
if (listAccountsOptions.accountGroupId() != null) {
350353
builder.query("account_group_id", String.valueOf(listAccountsOptions.accountGroupId()));
351354
}
355+
if (listAccountsOptions.nextDocid() != null) {
356+
builder.query("next_docid", String.valueOf(listAccountsOptions.nextDocid()));
357+
}
352358
if (listAccountsOptions.parent() != null) {
353359
builder.query("parent", String.valueOf(listAccountsOptions.parent()));
354360
}
@@ -500,6 +506,9 @@ public ServiceCall<ListEnterprisesResponse> listEnterprises(ListEnterprisesOptio
500506
if (listEnterprisesOptions.accountId() != null) {
501507
builder.query("account_id", String.valueOf(listEnterprisesOptions.accountId()));
502508
}
509+
if (listEnterprisesOptions.nextDocid() != null) {
510+
builder.query("next_docid", String.valueOf(listEnterprisesOptions.nextDocid()));
511+
}
503512
if (listEnterprisesOptions.limit() != null) {
504513
builder.query("limit", String.valueOf(listEnterprisesOptions.limit()));
505514
}

‎modules/enterprise-management/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountGroupsOptions.java

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -21,6 +21,7 @@ public class ListAccountGroupsOptions extends GenericModel {
2121

2222
protected String enterpriseId;
2323
protected String parentAccountGroupId;
24+
protected String nextDocid;
2425
protected String parent;
2526
protected Long limit;
2627

@@ -30,12 +31,14 @@ public class ListAccountGroupsOptions extends GenericModel {
3031
public static class Builder {
3132
private String enterpriseId;
3233
private String parentAccountGroupId;
34+
private String nextDocid;
3335
private String parent;
3436
private Long limit;
3537

3638
private Builder(ListAccountGroupsOptions listAccountGroupsOptions) {
3739
this.enterpriseId = listAccountGroupsOptions.enterpriseId;
3840
this.parentAccountGroupId = listAccountGroupsOptions.parentAccountGroupId;
41+
this.nextDocid = listAccountGroupsOptions.nextDocid;
3942
this.parent = listAccountGroupsOptions.parent;
4043
this.limit = listAccountGroupsOptions.limit;
4144
}
@@ -77,6 +80,17 @@ public Builder parentAccountGroupId(String parentAccountGroupId) {
7780
return this;
7881
}
7982

83+
/**
84+
* Set the nextDocid.
85+
*
86+
* @param nextDocid the nextDocid
87+
* @return the ListAccountGroupsOptions builder
88+
*/
89+
public Builder nextDocid(String nextDocid) {
90+
this.nextDocid = nextDocid;
91+
return this;
92+
}
93+
8094
/**
8195
* Set the parent.
8296
*
@@ -103,6 +117,7 @@ public Builder limit(long limit) {
103117
protected ListAccountGroupsOptions(Builder builder) {
104118
enterpriseId = builder.enterpriseId;
105119
parentAccountGroupId = builder.parentAccountGroupId;
120+
nextDocid = builder.nextDocid;
106121
parent = builder.parent;
107122
limit = builder.limit;
108123
}
@@ -138,6 +153,18 @@ public String parentAccountGroupId() {
138153
return parentAccountGroupId;
139154
}
140155

156+
/**
157+
* Gets the nextDocid.
158+
*
159+
* The first item to be returned in the page of results. This value can be obtained from the next_url property from
160+
* the previous call of the operation. If not specified, then the first page of results is returned.
161+
*
162+
* @return the nextDocid
163+
*/
164+
public String nextDocid() {
165+
return nextDocid;
166+
}
167+
141168
/**
142169
* Gets the parent.
143170
*

‎modules/enterprise-management/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountsOptions.java

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -21,6 +21,7 @@ public class ListAccountsOptions extends GenericModel {
2121

2222
protected String enterpriseId;
2323
protected String accountGroupId;
24+
protected String nextDocid;
2425
protected String parent;
2526
protected Long limit;
2627

@@ -30,12 +31,14 @@ public class ListAccountsOptions extends GenericModel {
3031
public static class Builder {
3132
private String enterpriseId;
3233
private String accountGroupId;
34+
private String nextDocid;
3335
private String parent;
3436
private Long limit;
3537

3638
private Builder(ListAccountsOptions listAccountsOptions) {
3739
this.enterpriseId = listAccountsOptions.enterpriseId;
3840
this.accountGroupId = listAccountsOptions.accountGroupId;
41+
this.nextDocid = listAccountsOptions.nextDocid;
3942
this.parent = listAccountsOptions.parent;
4043
this.limit = listAccountsOptions.limit;
4144
}
@@ -77,6 +80,17 @@ public Builder accountGroupId(String accountGroupId) {
7780
return this;
7881
}
7982

83+
/**
84+
* Set the nextDocid.
85+
*
86+
* @param nextDocid the nextDocid
87+
* @return the ListAccountsOptions builder
88+
*/
89+
public Builder nextDocid(String nextDocid) {
90+
this.nextDocid = nextDocid;
91+
return this;
92+
}
93+
8094
/**
8195
* Set the parent.
8296
*
@@ -103,6 +117,7 @@ public Builder limit(long limit) {
103117
protected ListAccountsOptions(Builder builder) {
104118
enterpriseId = builder.enterpriseId;
105119
accountGroupId = builder.accountGroupId;
120+
nextDocid = builder.nextDocid;
106121
parent = builder.parent;
107122
limit = builder.limit;
108123
}
@@ -138,6 +153,18 @@ public String accountGroupId() {
138153
return accountGroupId;
139154
}
140155

156+
/**
157+
* Gets the nextDocid.
158+
*
159+
* The first item to be returned in the page of results. This value can be obtained from the next_url property from
160+
* the previous call of the operation. If not specified, then the first page of results is returned.
161+
*
162+
* @return the nextDocid
163+
*/
164+
public String nextDocid() {
165+
return nextDocid;
166+
}
167+
141168
/**
142169
* Gets the parent.
143170
*

‎modules/enterprise-management/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListEnterprisesOptions.java

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -22,6 +22,7 @@ public class ListEnterprisesOptions extends GenericModel {
2222
protected String enterpriseAccountId;
2323
protected String accountGroupId;
2424
protected String accountId;
25+
protected String nextDocid;
2526
protected Long limit;
2627

2728
/**
@@ -31,12 +32,14 @@ public static class Builder {
3132
private String enterpriseAccountId;
3233
private String accountGroupId;
3334
private String accountId;
35+
private String nextDocid;
3436
private Long limit;
3537

3638
private Builder(ListEnterprisesOptions listEnterprisesOptions) {
3739
this.enterpriseAccountId = listEnterprisesOptions.enterpriseAccountId;
3840
this.accountGroupId = listEnterprisesOptions.accountGroupId;
3941
this.accountId = listEnterprisesOptions.accountId;
42+
this.nextDocid = listEnterprisesOptions.nextDocid;
4043
this.limit = listEnterprisesOptions.limit;
4144
}
4245

@@ -88,6 +91,17 @@ public Builder accountId(String accountId) {
8891
return this;
8992
}
9093

94+
/**
95+
* Set the nextDocid.
96+
*
97+
* @param nextDocid the nextDocid
98+
* @return the ListEnterprisesOptions builder
99+
*/
100+
public Builder nextDocid(String nextDocid) {
101+
this.nextDocid = nextDocid;
102+
return this;
103+
}
104+
91105
/**
92106
* Set the limit.
93107
*
@@ -104,6 +118,7 @@ protected ListEnterprisesOptions(Builder builder) {
104118
enterpriseAccountId = builder.enterpriseAccountId;
105119
accountGroupId = builder.accountGroupId;
106120
accountId = builder.accountId;
121+
nextDocid = builder.nextDocid;
107122
limit = builder.limit;
108123
}
109124

@@ -149,6 +164,18 @@ public String accountId() {
149164
return accountId;
150165
}
151166

167+
/**
168+
* Gets the nextDocid.
169+
*
170+
* The first item to be returned in the page of results. This value can be obtained from the next_url property from
171+
* the previous call of the operation. If not specified, then the first page of results is returned.
172+
*
173+
* @return the nextDocid
174+
*/
175+
public String nextDocid() {
176+
return nextDocid;
177+
}
178+
152179
/**
153180
* Gets the limit.
154181
*

‎modules/enterprise-management/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/AccountManagementHelper.java

-221
This file was deleted.

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/EnterpriseManagementIT.java

+426-389
Large diffs are not rendered by default.

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/EnterpriseManagementTest.java

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -40,6 +40,7 @@
4040
import com.ibm.cloud.sdk.core.security.Authenticator;
4141
import com.ibm.cloud.sdk.core.security.NoAuthAuthenticator;
4242
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
43+
import com.ibm.cloud.sdk.core.util.DateUtils;
4344
import com.ibm.cloud.sdk.core.util.EnvironmentUtils;
4445
import java.io.IOException;
4546
import java.io.InputStream;
@@ -153,7 +154,7 @@ public void testCreateAccountGroupNoOptions() throws Throwable {
153154
@Test
154155
public void testListAccountGroupsWOptions() throws Throwable {
155156
// Schedule some responses.
156-
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}]}";
157+
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}]}";
157158
String listAccountGroupsPath = "/account-groups";
158159

159160
server.enqueue(new MockResponse()
@@ -167,6 +168,7 @@ public void testListAccountGroupsWOptions() throws Throwable {
167168
ListAccountGroupsOptions listAccountGroupsOptionsModel = new ListAccountGroupsOptions.Builder()
168169
.enterpriseId("testString")
169170
.parentAccountGroupId("testString")
171+
.nextDocid("testString")
170172
.parent("testString")
171173
.limit(Long.valueOf("26"))
172174
.build();
@@ -188,6 +190,7 @@ public void testListAccountGroupsWOptions() throws Throwable {
188190
// Get query params
189191
assertEquals(query.get("enterprise_id"), "testString");
190192
assertEquals(query.get("parent_account_group_id"), "testString");
193+
assertEquals(query.get("next_docid"), "testString");
191194
assertEquals(query.get("parent"), "testString");
192195
assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("26"));
193196
// Check request path
@@ -198,7 +201,7 @@ public void testListAccountGroupsWOptions() throws Throwable {
198201
@Test
199202
public void testGetAccountGroupWOptions() throws Throwable {
200203
// Schedule some responses.
201-
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}";
204+
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}";
202205
String getAccountGroupPath = "/account-groups/testString";
203206

204207
server.enqueue(new MockResponse()
@@ -405,7 +408,7 @@ public void testCreateAccountNoOptions() throws Throwable {
405408
@Test
406409
public void testListAccountsWOptions() throws Throwable {
407410
// Schedule some responses.
408-
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"owner_iam_id\": \"ownerIamId\", \"paid\": true, \"owner_email\": \"ownerEmail\", \"is_enterprise_account\": false, \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}]}";
411+
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"owner_iam_id\": \"ownerIamId\", \"paid\": true, \"owner_email\": \"ownerEmail\", \"is_enterprise_account\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}]}";
409412
String listAccountsPath = "/accounts";
410413

411414
server.enqueue(new MockResponse()
@@ -419,6 +422,7 @@ public void testListAccountsWOptions() throws Throwable {
419422
ListAccountsOptions listAccountsOptionsModel = new ListAccountsOptions.Builder()
420423
.enterpriseId("testString")
421424
.accountGroupId("testString")
425+
.nextDocid("testString")
422426
.parent("testString")
423427
.limit(Long.valueOf("26"))
424428
.build();
@@ -440,6 +444,7 @@ public void testListAccountsWOptions() throws Throwable {
440444
// Get query params
441445
assertEquals(query.get("enterprise_id"), "testString");
442446
assertEquals(query.get("account_group_id"), "testString");
447+
assertEquals(query.get("next_docid"), "testString");
443448
assertEquals(query.get("parent"), "testString");
444449
assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("26"));
445450
// Check request path
@@ -450,7 +455,7 @@ public void testListAccountsWOptions() throws Throwable {
450455
@Test
451456
public void testGetAccountWOptions() throws Throwable {
452457
// Schedule some responses.
453-
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"owner_iam_id\": \"ownerIamId\", \"paid\": true, \"owner_email\": \"ownerEmail\", \"is_enterprise_account\": false, \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}";
458+
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"crn\": \"crn\", \"parent\": \"parent\", \"enterprise_account_id\": \"enterpriseAccountId\", \"enterprise_id\": \"enterpriseId\", \"enterprise_path\": \"enterprisePath\", \"name\": \"name\", \"state\": \"state\", \"owner_iam_id\": \"ownerIamId\", \"paid\": true, \"owner_email\": \"ownerEmail\", \"is_enterprise_account\": false, \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}";
454459
String getAccountPath = "/accounts/testString";
455460

456461
server.enqueue(new MockResponse()
@@ -604,7 +609,7 @@ public void testCreateEnterpriseNoOptions() throws Throwable {
604609
@Test
605610
public void testListEnterprisesWOptions() throws Throwable {
606611
// Schedule some responses.
607-
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"enterprise_account_id\": \"enterpriseAccountId\", \"crn\": \"crn\", \"name\": \"name\", \"domain\": \"domain\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}]}";
612+
String mockResponseBody = "{\"rows_count\": 9, \"next_url\": \"nextUrl\", \"resources\": [{\"url\": \"url\", \"id\": \"id\", \"enterprise_account_id\": \"enterpriseAccountId\", \"crn\": \"crn\", \"name\": \"name\", \"domain\": \"domain\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}]}";
608613
String listEnterprisesPath = "/enterprises";
609614

610615
server.enqueue(new MockResponse()
@@ -619,6 +624,7 @@ public void testListEnterprisesWOptions() throws Throwable {
619624
.enterpriseAccountId("testString")
620625
.accountGroupId("testString")
621626
.accountId("testString")
627+
.nextDocid("testString")
622628
.limit(Long.valueOf("26"))
623629
.build();
624630

@@ -640,6 +646,7 @@ public void testListEnterprisesWOptions() throws Throwable {
640646
assertEquals(query.get("enterprise_account_id"), "testString");
641647
assertEquals(query.get("account_group_id"), "testString");
642648
assertEquals(query.get("account_id"), "testString");
649+
assertEquals(query.get("next_docid"), "testString");
643650
assertEquals(Long.valueOf(query.get("limit")), Long.valueOf("26"));
644651
// Check request path
645652
String parsedPath = TestUtilities.parseReqPath(request);
@@ -649,7 +656,7 @@ public void testListEnterprisesWOptions() throws Throwable {
649656
@Test
650657
public void testGetEnterpriseWOptions() throws Throwable {
651658
// Schedule some responses.
652-
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"enterprise_account_id\": \"enterpriseAccountId\", \"crn\": \"crn\", \"name\": \"name\", \"domain\": \"domain\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00\", \"updated_by\": \"updatedBy\"}";
659+
String mockResponseBody = "{\"url\": \"url\", \"id\": \"id\", \"enterprise_account_id\": \"enterpriseAccountId\", \"crn\": \"crn\", \"name\": \"name\", \"domain\": \"domain\", \"state\": \"state\", \"primary_contact_iam_id\": \"primaryContactIamId\", \"primary_contact_email\": \"primaryContactEmail\", \"created_at\": \"2019-01-01T12:00:00.000Z\", \"created_by\": \"createdBy\", \"updated_at\": \"2019-01-01T12:00:00.000Z\", \"updated_by\": \"updatedBy\"}";
653660
String getEnterprisePath = "/enterprises/testString";
654661

655662
server.enqueue(new MockResponse()

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountGroupsOptionsTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -34,11 +34,13 @@ public void testListAccountGroupsOptions() throws Throwable {
3434
ListAccountGroupsOptions listAccountGroupsOptionsModel = new ListAccountGroupsOptions.Builder()
3535
.enterpriseId("testString")
3636
.parentAccountGroupId("testString")
37+
.nextDocid("testString")
3738
.parent("testString")
3839
.limit(Long.valueOf("26"))
3940
.build();
4041
assertEquals(listAccountGroupsOptionsModel.enterpriseId(), "testString");
4142
assertEquals(listAccountGroupsOptionsModel.parentAccountGroupId(), "testString");
43+
assertEquals(listAccountGroupsOptionsModel.nextDocid(), "testString");
4244
assertEquals(listAccountGroupsOptionsModel.parent(), "testString");
4345
assertEquals(listAccountGroupsOptionsModel.limit(), Long.valueOf("26"));
4446
}

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountGroupsResponseTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -17,6 +17,7 @@
1717
import com.ibm.cloud.platform_services.enterprise_management.v1.model.ListAccountGroupsResponse;
1818
import com.ibm.cloud.platform_services.enterprise_management.v1.utils.TestUtilities;
1919
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
20+
import com.ibm.cloud.sdk.core.util.DateUtils;
2021
import java.io.InputStream;
2122
import java.util.HashMap;
2223
import java.util.List;

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountsOptionsTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -34,11 +34,13 @@ public void testListAccountsOptions() throws Throwable {
3434
ListAccountsOptions listAccountsOptionsModel = new ListAccountsOptions.Builder()
3535
.enterpriseId("testString")
3636
.accountGroupId("testString")
37+
.nextDocid("testString")
3738
.parent("testString")
3839
.limit(Long.valueOf("26"))
3940
.build();
4041
assertEquals(listAccountsOptionsModel.enterpriseId(), "testString");
4142
assertEquals(listAccountsOptionsModel.accountGroupId(), "testString");
43+
assertEquals(listAccountsOptionsModel.nextDocid(), "testString");
4244
assertEquals(listAccountsOptionsModel.parent(), "testString");
4345
assertEquals(listAccountsOptionsModel.limit(), Long.valueOf("26"));
4446
}

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListAccountsResponseTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -17,6 +17,7 @@
1717
import com.ibm.cloud.platform_services.enterprise_management.v1.model.ListAccountsResponse;
1818
import com.ibm.cloud.platform_services.enterprise_management.v1.utils.TestUtilities;
1919
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
20+
import com.ibm.cloud.sdk.core.util.DateUtils;
2021
import java.io.InputStream;
2122
import java.util.HashMap;
2223
import java.util.List;

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListEnterprisesOptionsTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -35,11 +35,13 @@ public void testListEnterprisesOptions() throws Throwable {
3535
.enterpriseAccountId("testString")
3636
.accountGroupId("testString")
3737
.accountId("testString")
38+
.nextDocid("testString")
3839
.limit(Long.valueOf("26"))
3940
.build();
4041
assertEquals(listEnterprisesOptionsModel.enterpriseAccountId(), "testString");
4142
assertEquals(listEnterprisesOptionsModel.accountGroupId(), "testString");
4243
assertEquals(listEnterprisesOptionsModel.accountId(), "testString");
44+
assertEquals(listEnterprisesOptionsModel.nextDocid(), "testString");
4345
assertEquals(listEnterprisesOptionsModel.limit(), Long.valueOf("26"));
4446
}
4547
}

‎modules/enterprise-management/src/test/java/com/ibm/cloud/platform_services/enterprise_management/v1/model/ListEnterprisesResponseTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -17,6 +17,7 @@
1717
import com.ibm.cloud.platform_services.enterprise_management.v1.model.ListEnterprisesResponse;
1818
import com.ibm.cloud.platform_services.enterprise_management.v1.utils.TestUtilities;
1919
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
20+
import com.ibm.cloud.sdk.core.util.DateUtils;
2021
import java.io.InputStream;
2122
import java.util.HashMap;
2223
import java.util.List;

‎modules/examples/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
<artifactId>enterprise-billing-units</artifactId>
3333
<version>${project.version}</version>
3434
</dependency>
35+
<dependency>
36+
<groupId>${project.groupId}</groupId>
37+
<artifactId>enterprise-management</artifactId>
38+
<version>${project.version}</version>
39+
</dependency>
3540
<dependency>
3641
<groupId>${project.groupId}</groupId>
3742
<artifactId>enterprise-usage-reports</artifactId>

‎modules/examples/src/main/java/com/ibm/cloud/platform_services/enterprise_management/v1/EnterpriseManagementExamples.java

+399
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.