File tree Expand file tree Collapse file tree 2 files changed +60
-2
lines changed
src/main/java/org/typesense Expand file tree Collapse file tree 2 files changed +60
-2
lines changed Original file line number Diff line number Diff line change 11package org .typesense .api ;
22
3+ import org .typesense .interfaces .ApiKeyDeleteResponse ;
34import org .typesense .model .ApiKey ;
45
56public class Key {
@@ -16,8 +17,8 @@ public ApiKey retrieve() throws Exception {
1617 return this .apiCall .get (this .getEndpoint (), null , ApiKey .class );
1718 }
1819
19- public ApiKey delete () throws Exception {
20- return this .apiCall .delete (this .getEndpoint (), null , ApiKey .class );
20+ public ApiKeyDeleteResponse delete () throws Exception {
21+ return this .apiCall .delete (this .getEndpoint (), null , ApiKeyDeleteResponse .class );
2122 }
2223
2324 private String getEndpoint (){
Original file line number Diff line number Diff line change 1+ package org .typesense .interfaces ;
2+
3+ import java .util .Objects ;
4+
5+ import com .fasterxml .jackson .annotation .JsonProperty ;
6+
7+ import io .swagger .v3 .oas .annotations .media .Schema ;
8+
9+ public class ApiKeyDeleteResponse {
10+ @ JsonProperty ("id" )
11+ private Long id = null ;
12+
13+ public ApiKeyDeleteResponse id (Long id ) {
14+ this .id = id ;
15+ return this ;
16+ }
17+
18+ /**
19+ * The unique identifier of the deleted key
20+ * @return id
21+ **/
22+ @ Schema (required = true , description = "The unique identifier of the deleted key" )
23+ public Long getId () {
24+ return id ;
25+ }
26+
27+ public void setId (Long id ) {
28+ this .id = id ;
29+ }
30+
31+ @ Override
32+ public boolean equals (Object o ) {
33+ if (this == o ) return true ;
34+ if (o == null || getClass () != o .getClass ()) return false ;
35+ ApiKeyDeleteResponse that = (ApiKeyDeleteResponse ) o ;
36+ return Objects .equals (this .id , that .id );
37+ }
38+
39+ @ Override
40+ public int hashCode () {
41+ return Objects .hash (id );
42+ }
43+
44+ @ Override
45+ public String toString () {
46+ StringBuilder sb = new StringBuilder ();
47+ sb .append ("class ApiKeyDeleteResponse {\n " );
48+ sb .append (" id: " ).append (toIndentedString (id )).append ("\n " );
49+ sb .append ("}" );
50+ return sb .toString ();
51+ }
52+
53+ private String toIndentedString (Object o ) {
54+ if (o == null ) return "null" ;
55+ return o .toString ().replace ("\n " , "\n " );
56+ }
57+ }
You can’t perform that action at this time.
0 commit comments