generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update Orchestration Spec (#38)
* Update Orchestration Spec * Formatting * Update docs * Update unit test
- Loading branch information
Showing
25 changed files
with
1,497 additions
and
1,353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
264 changes: 264 additions & 0 deletions
264
...c/main/java/com/sap/ai/sdk/orchestration/client/model/AzureContentSafetyFilterConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
/* | ||
* Internal Orchestration Service API | ||
* SAP AI Core - Orchestration Service API | ||
* | ||
* The version of the OpenAPI document: 0.0.1 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
package com.sap.ai.sdk.orchestration.client.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import java.util.LinkedHashMap; | ||
import java.util.Map; | ||
import java.util.NoSuchElementException; | ||
import java.util.Objects; | ||
import java.util.Set; | ||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
/** AzureContentSafetyFilterConfig */ | ||
// CHECKSTYLE:OFF | ||
public class AzureContentSafetyFilterConfig | ||
// CHECKSTYLE:ON | ||
{ | ||
/** String represents name of the filter provider */ | ||
public enum TypeEnum { | ||
/** The AZURE_CONTENT_SAFETY option of this AzureContentSafetyFilterConfig */ | ||
AZURE_CONTENT_SAFETY("azure_content_safety"); | ||
|
||
private String value; | ||
|
||
TypeEnum(String value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Get the value of the enum | ||
* | ||
* @return The enum value | ||
*/ | ||
@JsonValue | ||
@Nonnull | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
/** | ||
* Get the String value of the enum value. | ||
* | ||
* @return The enum value as String | ||
*/ | ||
@Override | ||
@Nonnull | ||
public String toString() { | ||
return String.valueOf(value); | ||
} | ||
|
||
/** | ||
* Get the enum value from a String value | ||
* | ||
* @param value The String value | ||
* @return The enum value of type AzureContentSafetyFilterConfig | ||
*/ | ||
@JsonCreator | ||
@Nonnull | ||
public static TypeEnum fromValue(@Nonnull final String value) { | ||
for (TypeEnum b : TypeEnum.values()) { | ||
if (b.value.equals(value)) { | ||
return b; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unexpected value '" + value + "'"); | ||
} | ||
} | ||
|
||
@JsonProperty("type") | ||
private TypeEnum type; | ||
|
||
@JsonProperty("config") | ||
private AzureContentSafety config; | ||
|
||
@JsonAnySetter @JsonAnyGetter | ||
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>(); | ||
|
||
protected AzureContentSafetyFilterConfig() {} | ||
|
||
/** | ||
* Set the type of this {@link AzureContentSafetyFilterConfig} instance and return the same | ||
* instance. | ||
* | ||
* @param type String represents name of the filter provider | ||
* @return The same instance of this {@link AzureContentSafetyFilterConfig} class | ||
*/ | ||
@Nonnull | ||
public AzureContentSafetyFilterConfig type(@Nonnull final TypeEnum type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
/** | ||
* String represents name of the filter provider | ||
* | ||
* @return type The type of this {@link AzureContentSafetyFilterConfig} instance. | ||
*/ | ||
@Nonnull | ||
public TypeEnum getType() { | ||
return type; | ||
} | ||
|
||
/** | ||
* Set the type of this {@link AzureContentSafetyFilterConfig} instance. | ||
* | ||
* @param type String represents name of the filter provider | ||
*/ | ||
public void setType(@Nonnull final TypeEnum type) { | ||
this.type = type; | ||
} | ||
|
||
/** | ||
* Set the config of this {@link AzureContentSafetyFilterConfig} instance and return the same | ||
* instance. | ||
* | ||
* @param config The config of this {@link AzureContentSafetyFilterConfig} | ||
* @return The same instance of this {@link AzureContentSafetyFilterConfig} class | ||
*/ | ||
@Nonnull | ||
public AzureContentSafetyFilterConfig config(@Nonnull final AzureContentSafety config) { | ||
this.config = config; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get config | ||
* | ||
* @return config The config of this {@link AzureContentSafetyFilterConfig} instance. | ||
*/ | ||
@Nonnull | ||
public AzureContentSafety getConfig() { | ||
return config; | ||
} | ||
|
||
/** | ||
* Set the config of this {@link AzureContentSafetyFilterConfig} instance. | ||
* | ||
* @param config The config of this {@link AzureContentSafetyFilterConfig} | ||
*/ | ||
public void setConfig(@Nonnull final AzureContentSafety config) { | ||
this.config = config; | ||
} | ||
|
||
/** | ||
* Get the names of the unrecognizable properties of the {@link AzureContentSafetyFilterConfig}. | ||
* | ||
* @return The set of properties names | ||
*/ | ||
@JsonIgnore | ||
@Nonnull | ||
public Set<String> getCustomFieldNames() { | ||
return cloudSdkCustomFields.keySet(); | ||
} | ||
|
||
/** | ||
* Get the value of an unrecognizable property of this {@link AzureContentSafetyFilterConfig} | ||
* instance. | ||
* | ||
* @param name The name of the property | ||
* @return The value of the property | ||
* @throws NoSuchElementException If no property with the given name could be found. | ||
*/ | ||
@Nullable | ||
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { | ||
if (!cloudSdkCustomFields.containsKey(name)) { | ||
throw new NoSuchElementException( | ||
"AzureContentSafetyFilterConfig has no field with name '" + name + "'."); | ||
} | ||
return cloudSdkCustomFields.get(name); | ||
} | ||
|
||
/** | ||
* Set an unrecognizable property of this {@link AzureContentSafetyFilterConfig} instance. If the | ||
* map previously contained a mapping for the key, the old value is replaced by the specified | ||
* value. | ||
* | ||
* @param customFieldName The name of the property | ||
* @param customFieldValue The value of the property | ||
*/ | ||
@JsonIgnore | ||
public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { | ||
cloudSdkCustomFields.put(customFieldName, customFieldValue); | ||
} | ||
|
||
@Override | ||
public boolean equals(@Nullable final java.lang.Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final AzureContentSafetyFilterConfig azureContentSafetyFilterConfig = | ||
(AzureContentSafetyFilterConfig) o; | ||
return Objects.equals( | ||
this.cloudSdkCustomFields, azureContentSafetyFilterConfig.cloudSdkCustomFields) | ||
&& Objects.equals(this.type, azureContentSafetyFilterConfig.type) | ||
&& Objects.equals(this.config, azureContentSafetyFilterConfig.config); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(type, config, cloudSdkCustomFields); | ||
} | ||
|
||
@Override | ||
@Nonnull | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder(); | ||
sb.append("class AzureContentSafetyFilterConfig {\n"); | ||
sb.append(" type: ").append(toIndentedString(type)).append("\n"); | ||
sb.append(" config: ").append(toIndentedString(config)).append("\n"); | ||
cloudSdkCustomFields.forEach( | ||
(k, v) -> | ||
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces (except the first line). | ||
*/ | ||
private String toIndentedString(final java.lang.Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
|
||
/** | ||
* Create a type-safe, fluent-api builder object to construct a new {@link | ||
* AzureContentSafetyFilterConfig} instance with all required arguments. | ||
*/ | ||
public static Builder create() { | ||
return (type) -> new AzureContentSafetyFilterConfig().type(type); | ||
} | ||
|
||
/** Builder helper class. */ | ||
public interface Builder { | ||
/** | ||
* Set the type of this {@link AzureContentSafetyFilterConfig} instance. | ||
* | ||
* @param type String represents name of the filter provider | ||
* @return The AzureContentSafetyFilterConfig instance. | ||
*/ | ||
AzureContentSafetyFilterConfig type(@Nonnull final TypeEnum type); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.