PageRenderTime 58ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/java8/src/main/java/com/sphereon/sdk/pdf/model/Lifecycle.java

https://gitlab.com/sphereon-sdk/pdf-sdk
Java | 188 lines | 108 code | 32 blank | 48 comment | 8 complexity | b90439dbc2905e82f0dd51fac83337b5 MD5 | raw file
  1. /**
  2. * PDF
  3. * <b>The PDF conversion API 'conversion2pdf' converts image, office and PDF files to (searcheable) PDF files.</b> The flow is generally as follows: 1. First upload an image/file using the /conversion2pdf POST endpoint. You will get back a job response that contains a job with its associated settings. 2. Upload any additional images/files using the /conversion2pdf/{jobId} POST endpoint when you want to merge additional image, office or PDF files. You will get back the update job response that contains a job with its associated settings. Currently you can only merge spreadsheets with spreadsheet, documents with documents and images/pdfs with images/pdfs 3. Start the job from a PUT request to the /conversion2pdf/{jobid} endpoint, with the Job and Settings JSON as request body. The conversion to PDF will now start. The OCR setting is only applicable to images, since other files will always be searchable. 4. Check the job status from the /conversion2pdf/{jobid} GET endpoint until the status has changed to DONE or ERROR. Messaging using a websocket will be available as an alternative in a future version 5. Retrieve the PDF file using the /conversion2pdf/{jobid}/stream GET endpoint. This will return the PDF file only when the status is DONE. In other cases it will return the Job Response JSON (with http code 202 instead of 200) <b>Interactive testing: </b>A web based test console is available in the <a href=\"https://store.sphereon.com\">Sphereon API Store</a>
  4. *
  5. * OpenAPI spec version: 1.0.0
  6. * Contact: dev@sphereon.com
  7. *
  8. * NOTE: This class is auto generated by the swagger code generator program.
  9. * https://github.com/swagger-api/swagger-codegen.git
  10. * Do not edit the class manually.
  11. *
  12. * Licensed under the Apache License, Version 2.0 (the "License");
  13. * you may not use this file except in compliance with the License.
  14. * You may obtain a copy of the License at
  15. *
  16. * http://www.apache.org/licenses/LICENSE-2.0
  17. *
  18. * Unless required by applicable law or agreed to in writing, software
  19. * distributed under the License is distributed on an "AS IS" BASIS,
  20. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21. * See the License for the specific language governing permissions and
  22. * limitations under the License.
  23. */
  24. package com.sphereon.sdk.pdf.model;
  25. import java.util.Objects;
  26. import com.google.gson.annotations.SerializedName;
  27. import io.swagger.annotations.ApiModel;
  28. import io.swagger.annotations.ApiModelProperty;
  29. import java.time.OffsetDateTime;
  30. /**
  31. * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file
  32. */
  33. @ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file")
  34. @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-01-24T13:42:36.462+01:00")
  35. public class Lifecycle {
  36. @SerializedName("actionTime")
  37. private OffsetDateTime actionTime = null;
  38. /**
  39. * Gets or Sets action
  40. */
  41. public enum ActionEnum {
  42. @SerializedName("DELETE")
  43. DELETE("DELETE");
  44. private String value;
  45. ActionEnum(String value) {
  46. this.value = value;
  47. }
  48. @Override
  49. public String toString() {
  50. return String.valueOf(value);
  51. }
  52. }
  53. @SerializedName("action")
  54. private ActionEnum action = null;
  55. /**
  56. * Gets or Sets type
  57. */
  58. public enum TypeEnum {
  59. @SerializedName("RETRIEVAL")
  60. RETRIEVAL("RETRIEVAL"),
  61. @SerializedName("TIME")
  62. TIME("TIME");
  63. private String value;
  64. TypeEnum(String value) {
  65. this.value = value;
  66. }
  67. @Override
  68. public String toString() {
  69. return String.valueOf(value);
  70. }
  71. }
  72. @SerializedName("type")
  73. private TypeEnum type = null;
  74. public Lifecycle actionTime(OffsetDateTime actionTime) {
  75. this.actionTime = actionTime;
  76. return this;
  77. }
  78. /**
  79. * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation
  80. * @return actionTime
  81. **/
  82. @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation")
  83. public OffsetDateTime getActionTime() {
  84. return actionTime;
  85. }
  86. public void setActionTime(OffsetDateTime actionTime) {
  87. this.actionTime = actionTime;
  88. }
  89. public Lifecycle action(ActionEnum action) {
  90. this.action = action;
  91. return this;
  92. }
  93. /**
  94. * Get action
  95. * @return action
  96. **/
  97. @ApiModelProperty(example = "null", value = "")
  98. public ActionEnum getAction() {
  99. return action;
  100. }
  101. public void setAction(ActionEnum action) {
  102. this.action = action;
  103. }
  104. public Lifecycle type(TypeEnum type) {
  105. this.type = type;
  106. return this;
  107. }
  108. /**
  109. * Get type
  110. * @return type
  111. **/
  112. @ApiModelProperty(example = "null", value = "")
  113. public TypeEnum getType() {
  114. return type;
  115. }
  116. public void setType(TypeEnum type) {
  117. this.type = type;
  118. }
  119. @Override
  120. public boolean equals(java.lang.Object o) {
  121. if (this == o) {
  122. return true;
  123. }
  124. if (o == null || getClass() != o.getClass()) {
  125. return false;
  126. }
  127. Lifecycle lifecycle = (Lifecycle) o;
  128. return Objects.equals(this.actionTime, lifecycle.actionTime) &&
  129. Objects.equals(this.action, lifecycle.action) &&
  130. Objects.equals(this.type, lifecycle.type);
  131. }
  132. @Override
  133. public int hashCode() {
  134. return Objects.hash(actionTime, action, type);
  135. }
  136. @Override
  137. public String toString() {
  138. StringBuilder sb = new StringBuilder();
  139. sb.append("class Lifecycle {\n");
  140. sb.append(" actionTime: ").append(toIndentedString(actionTime)).append("\n");
  141. sb.append(" action: ").append(toIndentedString(action)).append("\n");
  142. sb.append(" type: ").append(toIndentedString(type)).append("\n");
  143. sb.append("}");
  144. return sb.toString();
  145. }
  146. /**
  147. * Convert the given object to string with each line indented by 4 spaces
  148. * (except the first line).
  149. */
  150. private String toIndentedString(java.lang.Object o) {
  151. if (o == null) {
  152. return "null";
  153. }
  154. return o.toString().replace("\n", "\n ");
  155. }
  156. }