Skip to content

Commit 1274e5b

Browse files
committed
feat(Discovery): Add response models for delete methods
Reponse models were added for: - deleteCollection - deleteConfiguration - deleteCredentials - deleteDocument - deleteEnvironment - deleteGateway Constructor was also added to handle all auth formats
1 parent f200d11 commit 1274e5b

7 files changed

Lines changed: 1312 additions & 773 deletions

File tree

‎discovery/src/main/java/com/ibm/watson/discovery/v1/Discovery.java‎

Lines changed: 970 additions & 773 deletions
Large diffs are not rendered by default.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* DeleteCollectionResponse.
20+
*/
21+
public class DeleteCollectionResponse extends GenericModel {
22+
23+
/**
24+
* The status of the collection. The status of a successful deletion operation is `deleted`.
25+
*/
26+
public interface Status {
27+
/** deleted. */
28+
String DELETED = "deleted";
29+
}
30+
31+
@SerializedName("collection_id")
32+
private String collectionId;
33+
private String status;
34+
35+
/**
36+
* Gets the collectionId.
37+
*
38+
* The unique identifier of the collection that is being deleted.
39+
*
40+
* @return the collectionId
41+
*/
42+
public String getCollectionId() {
43+
return collectionId;
44+
}
45+
46+
/**
47+
* Gets the status.
48+
*
49+
* The status of the collection. The status of a successful deletion operation is `deleted`.
50+
*
51+
* @return the status
52+
*/
53+
public String getStatus() {
54+
return status;
55+
}
56+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import java.util.List;
16+
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
19+
20+
/**
21+
* DeleteConfigurationResponse.
22+
*/
23+
public class DeleteConfigurationResponse extends GenericModel {
24+
25+
/**
26+
* Status of the configuration. A deleted configuration has the status deleted.
27+
*/
28+
public interface Status {
29+
/** deleted. */
30+
String DELETED = "deleted";
31+
}
32+
33+
@SerializedName("configuration_id")
34+
private String configurationId;
35+
private String status;
36+
private List<Notice> notices;
37+
38+
/**
39+
* Gets the configurationId.
40+
*
41+
* The unique identifier for the configuration.
42+
*
43+
* @return the configurationId
44+
*/
45+
public String getConfigurationId() {
46+
return configurationId;
47+
}
48+
49+
/**
50+
* Gets the status.
51+
*
52+
* Status of the configuration. A deleted configuration has the status deleted.
53+
*
54+
* @return the status
55+
*/
56+
public String getStatus() {
57+
return status;
58+
}
59+
60+
/**
61+
* Gets the notices.
62+
*
63+
* An array of notice messages, if any.
64+
*
65+
* @return the notices
66+
*/
67+
public List<Notice> getNotices() {
68+
return notices;
69+
}
70+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* Object returned after credentials are deleted.
20+
*/
21+
public class DeleteCredentials extends GenericModel {
22+
23+
/**
24+
* The status of the deletion request.
25+
*/
26+
public interface Status {
27+
/** deleted. */
28+
String DELETED = "deleted";
29+
}
30+
31+
@SerializedName("credential_id")
32+
private String credentialId;
33+
private String status;
34+
35+
/**
36+
* Gets the credentialId.
37+
*
38+
* The unique identifier of the credentials that have been deleted.
39+
*
40+
* @return the credentialId
41+
*/
42+
public String getCredentialId() {
43+
return credentialId;
44+
}
45+
46+
/**
47+
* Gets the status.
48+
*
49+
* The status of the deletion request.
50+
*
51+
* @return the status
52+
*/
53+
public String getStatus() {
54+
return status;
55+
}
56+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* DeleteDocumentResponse.
20+
*/
21+
public class DeleteDocumentResponse extends GenericModel {
22+
23+
/**
24+
* Status of the document. A deleted document has the status deleted.
25+
*/
26+
public interface Status {
27+
/** deleted. */
28+
String DELETED = "deleted";
29+
}
30+
31+
@SerializedName("document_id")
32+
private String documentId;
33+
private String status;
34+
35+
/**
36+
* Gets the documentId.
37+
*
38+
* The unique identifier of the document.
39+
*
40+
* @return the documentId
41+
*/
42+
public String getDocumentId() {
43+
return documentId;
44+
}
45+
46+
/**
47+
* Gets the status.
48+
*
49+
* Status of the document. A deleted document has the status deleted.
50+
*
51+
* @return the status
52+
*/
53+
public String getStatus() {
54+
return status;
55+
}
56+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* DeleteEnvironmentResponse.
20+
*/
21+
public class DeleteEnvironmentResponse extends GenericModel {
22+
23+
/**
24+
* Status of the environment.
25+
*/
26+
public interface Status {
27+
/** deleted. */
28+
String DELETED = "deleted";
29+
}
30+
31+
@SerializedName("environment_id")
32+
private String environmentId;
33+
private String status;
34+
35+
/**
36+
* Gets the environmentId.
37+
*
38+
* The unique identifier for the environment.
39+
*
40+
* @return the environmentId
41+
*/
42+
public String getEnvironmentId() {
43+
return environmentId;
44+
}
45+
46+
/**
47+
* Gets the status.
48+
*
49+
* Status of the environment.
50+
*
51+
* @return the status
52+
*/
53+
public String getStatus() {
54+
return status;
55+
}
56+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright 2018 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.discovery.v1.model;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
17+
18+
/**
19+
* Gatway deletion confirmation.
20+
*/
21+
public class GatewayDelete extends GenericModel {
22+
23+
@SerializedName("gateway_id")
24+
private String gatewayId;
25+
private String status;
26+
27+
/**
28+
* Gets the gatewayId.
29+
*
30+
* The gateway ID of the deleted gateway.
31+
*
32+
* @return the gatewayId
33+
*/
34+
public String getGatewayId() {
35+
return gatewayId;
36+
}
37+
38+
/**
39+
* Gets the status.
40+
*
41+
* The status of the request.
42+
*
43+
* @return the status
44+
*/
45+
public String getStatus() {
46+
return status;
47+
}
48+
}

0 commit comments

Comments
 (0)