|
| 1 | +/* |
| 2 | + * Prompt Registry API |
| 3 | + * Prompt Storage service for Design time & Runtime prompt templates. |
| 4 | + * |
| 5 | + * |
| 6 | + * |
| 7 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | + * https://openapi-generator.tech |
| 9 | + * Do not edit the class manually. |
| 10 | + */ |
| 11 | + |
| 12 | +package com.sap.ai.sdk.prompt.registry.model; |
| 13 | + |
| 14 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; |
| 15 | +import com.fasterxml.jackson.annotation.JsonAnySetter; |
| 16 | +import com.fasterxml.jackson.annotation.JsonIgnore; |
| 17 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 18 | +import java.util.LinkedHashMap; |
| 19 | +import java.util.Map; |
| 20 | +import java.util.NoSuchElementException; |
| 21 | +import java.util.Objects; |
| 22 | +import java.util.Set; |
| 23 | +import javax.annotation.Nonnull; |
| 24 | +import javax.annotation.Nullable; |
| 25 | + |
| 26 | +/** OrchestrationConfigDeleteResponse */ |
| 27 | +// CHECKSTYLE:OFF |
| 28 | +public class OrchestrationConfigDeleteResponse |
| 29 | +// CHECKSTYLE:ON |
| 30 | +{ |
| 31 | + @JsonProperty("message") |
| 32 | + private String message; |
| 33 | + |
| 34 | + @JsonAnySetter @JsonAnyGetter |
| 35 | + private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>(); |
| 36 | + |
| 37 | + /** Default constructor for OrchestrationConfigDeleteResponse. */ |
| 38 | + protected OrchestrationConfigDeleteResponse() {} |
| 39 | + |
| 40 | + /** |
| 41 | + * Set the message of this {@link OrchestrationConfigDeleteResponse} instance and return the same |
| 42 | + * instance. |
| 43 | + * |
| 44 | + * @param message The message of this {@link OrchestrationConfigDeleteResponse} |
| 45 | + * @return The same instance of this {@link OrchestrationConfigDeleteResponse} class |
| 46 | + */ |
| 47 | + @Nonnull |
| 48 | + public OrchestrationConfigDeleteResponse message(@Nonnull final String message) { |
| 49 | + this.message = message; |
| 50 | + return this; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * Get message |
| 55 | + * |
| 56 | + * @return message The message of this {@link OrchestrationConfigDeleteResponse} instance. |
| 57 | + */ |
| 58 | + @Nonnull |
| 59 | + public String getMessage() { |
| 60 | + return message; |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Set the message of this {@link OrchestrationConfigDeleteResponse} instance. |
| 65 | + * |
| 66 | + * @param message The message of this {@link OrchestrationConfigDeleteResponse} |
| 67 | + */ |
| 68 | + public void setMessage(@Nonnull final String message) { |
| 69 | + this.message = message; |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * Get the names of the unrecognizable properties of the {@link |
| 74 | + * OrchestrationConfigDeleteResponse}. |
| 75 | + * |
| 76 | + * @return The set of properties names |
| 77 | + */ |
| 78 | + @JsonIgnore |
| 79 | + @Nonnull |
| 80 | + public Set<String> getCustomFieldNames() { |
| 81 | + return cloudSdkCustomFields.keySet(); |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Get the value of an unrecognizable property of this {@link OrchestrationConfigDeleteResponse} |
| 86 | + * instance. |
| 87 | + * |
| 88 | + * @deprecated Use {@link #toMap()} instead. |
| 89 | + * @param name The name of the property |
| 90 | + * @return The value of the property |
| 91 | + * @throws NoSuchElementException If no property with the given name could be found. |
| 92 | + */ |
| 93 | + @Nullable |
| 94 | + @Deprecated |
| 95 | + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { |
| 96 | + if (!cloudSdkCustomFields.containsKey(name)) { |
| 97 | + throw new NoSuchElementException( |
| 98 | + "OrchestrationConfigDeleteResponse has no field with name '" + name + "'."); |
| 99 | + } |
| 100 | + return cloudSdkCustomFields.get(name); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Get the value of all properties of this {@link OrchestrationConfigDeleteResponse} instance |
| 105 | + * including unrecognized properties. |
| 106 | + * |
| 107 | + * @return The map of all properties |
| 108 | + */ |
| 109 | + @JsonIgnore |
| 110 | + @Nonnull |
| 111 | + public Map<String, Object> toMap() { |
| 112 | + final Map<String, Object> declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); |
| 113 | + if (message != null) declaredFields.put("message", message); |
| 114 | + return declaredFields; |
| 115 | + } |
| 116 | + |
| 117 | + /** |
| 118 | + * Set an unrecognizable property of this {@link OrchestrationConfigDeleteResponse} instance. If |
| 119 | + * the map previously contained a mapping for the key, the old value is replaced by the specified |
| 120 | + * value. |
| 121 | + * |
| 122 | + * @param customFieldName The name of the property |
| 123 | + * @param customFieldValue The value of the property |
| 124 | + */ |
| 125 | + @JsonIgnore |
| 126 | + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { |
| 127 | + cloudSdkCustomFields.put(customFieldName, customFieldValue); |
| 128 | + } |
| 129 | + |
| 130 | + @Override |
| 131 | + public boolean equals(@Nullable final java.lang.Object o) { |
| 132 | + if (this == o) { |
| 133 | + return true; |
| 134 | + } |
| 135 | + if (o == null || getClass() != o.getClass()) { |
| 136 | + return false; |
| 137 | + } |
| 138 | + final OrchestrationConfigDeleteResponse orchestrationConfigDeleteResponse = |
| 139 | + (OrchestrationConfigDeleteResponse) o; |
| 140 | + return Objects.equals( |
| 141 | + this.cloudSdkCustomFields, orchestrationConfigDeleteResponse.cloudSdkCustomFields) |
| 142 | + && Objects.equals(this.message, orchestrationConfigDeleteResponse.message); |
| 143 | + } |
| 144 | + |
| 145 | + @Override |
| 146 | + public int hashCode() { |
| 147 | + return Objects.hash(message, cloudSdkCustomFields); |
| 148 | + } |
| 149 | + |
| 150 | + @Override |
| 151 | + @Nonnull |
| 152 | + public String toString() { |
| 153 | + final StringBuilder sb = new StringBuilder(); |
| 154 | + sb.append("class OrchestrationConfigDeleteResponse {\n"); |
| 155 | + sb.append(" message: ").append(toIndentedString(message)).append("\n"); |
| 156 | + cloudSdkCustomFields.forEach( |
| 157 | + (k, v) -> |
| 158 | + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); |
| 159 | + sb.append("}"); |
| 160 | + return sb.toString(); |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * Convert the given object to string with each line indented by 4 spaces (except the first line). |
| 165 | + */ |
| 166 | + private String toIndentedString(final java.lang.Object o) { |
| 167 | + if (o == null) { |
| 168 | + return "null"; |
| 169 | + } |
| 170 | + return o.toString().replace("\n", "\n "); |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * Create a type-safe, fluent-api builder object to construct a new {@link |
| 175 | + * OrchestrationConfigDeleteResponse} instance with all required arguments. |
| 176 | + */ |
| 177 | + public static Builder create() { |
| 178 | + return (message) -> new OrchestrationConfigDeleteResponse().message(message); |
| 179 | + } |
| 180 | + |
| 181 | + /** Builder helper class. */ |
| 182 | + public interface Builder { |
| 183 | + /** |
| 184 | + * Set the message of this {@link OrchestrationConfigDeleteResponse} instance. |
| 185 | + * |
| 186 | + * @param message The message of this {@link OrchestrationConfigDeleteResponse} |
| 187 | + * @return The OrchestrationConfigDeleteResponse instance. |
| 188 | + */ |
| 189 | + OrchestrationConfigDeleteResponse message(@Nonnull final String message); |
| 190 | + } |
| 191 | +} |
0 commit comments