|
| 1 | +/* |
| 2 | + * (C) Copyright IBM Corp. 2023. |
| 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.assistant.v2.model; |
| 14 | + |
| 15 | +import com.google.gson.annotations.SerializedName; |
| 16 | +import com.ibm.cloud.sdk.core.service.model.GenericModel; |
| 17 | +import java.util.List; |
| 18 | + |
| 19 | +/** Assistant. */ |
| 20 | +public class Assistant extends GenericModel { |
| 21 | + |
| 22 | + @SerializedName("assistant_id") |
| 23 | + protected String assistantId; |
| 24 | + |
| 25 | + protected String name; |
| 26 | + protected String description; |
| 27 | + protected String language; |
| 28 | + |
| 29 | + @SerializedName("assistant_skills") |
| 30 | + protected List<AssistantSkill> assistantSkills; |
| 31 | + |
| 32 | + @SerializedName("assistant_environments") |
| 33 | + protected List<EnvironmentReference> assistantEnvironments; |
| 34 | + |
| 35 | + /** Builder. */ |
| 36 | + public static class Builder { |
| 37 | + private String name; |
| 38 | + private String description; |
| 39 | + private String language; |
| 40 | + |
| 41 | + /** |
| 42 | + * Instantiates a new Builder from an existing Assistant instance. |
| 43 | + * |
| 44 | + * @param assistant the instance to initialize the Builder with |
| 45 | + */ |
| 46 | + private Builder(Assistant assistant) { |
| 47 | + this.name = assistant.name; |
| 48 | + this.description = assistant.description; |
| 49 | + this.language = assistant.language; |
| 50 | + } |
| 51 | + |
| 52 | + /** Instantiates a new builder. */ |
| 53 | + public Builder() {} |
| 54 | + |
| 55 | + /** |
| 56 | + * Instantiates a new builder with required properties. |
| 57 | + * |
| 58 | + * @param language the language |
| 59 | + */ |
| 60 | + public Builder(String language) { |
| 61 | + this.language = language; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Builds a Assistant. |
| 66 | + * |
| 67 | + * @return the new Assistant instance |
| 68 | + */ |
| 69 | + public Assistant build() { |
| 70 | + return new Assistant(this); |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * Set the name. |
| 75 | + * |
| 76 | + * @param name the name |
| 77 | + * @return the Assistant builder |
| 78 | + */ |
| 79 | + public Builder name(String name) { |
| 80 | + this.name = name; |
| 81 | + return this; |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Set the description. |
| 86 | + * |
| 87 | + * @param description the description |
| 88 | + * @return the Assistant builder |
| 89 | + */ |
| 90 | + public Builder description(String description) { |
| 91 | + this.description = description; |
| 92 | + return this; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Set the language. |
| 97 | + * |
| 98 | + * @param language the language |
| 99 | + * @return the Assistant builder |
| 100 | + */ |
| 101 | + public Builder language(String language) { |
| 102 | + this.language = language; |
| 103 | + return this; |
| 104 | + } |
| 105 | + } |
| 106 | + |
| 107 | + protected Assistant() {} |
| 108 | + |
| 109 | + protected Assistant(Builder builder) { |
| 110 | + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.language, "language cannot be null"); |
| 111 | + name = builder.name; |
| 112 | + description = builder.description; |
| 113 | + language = builder.language; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * New builder. |
| 118 | + * |
| 119 | + * @return a Assistant builder |
| 120 | + */ |
| 121 | + public Builder newBuilder() { |
| 122 | + return new Builder(this); |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * Gets the assistantId. |
| 127 | + * |
| 128 | + * <p>The unique identifier of the assistant. |
| 129 | + * |
| 130 | + * @return the assistantId |
| 131 | + */ |
| 132 | + public String assistantId() { |
| 133 | + return assistantId; |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * Gets the name. |
| 138 | + * |
| 139 | + * <p>The name of the assistant. This string cannot contain carriage return, newline, or tab |
| 140 | + * characters. |
| 141 | + * |
| 142 | + * @return the name |
| 143 | + */ |
| 144 | + public String name() { |
| 145 | + return name; |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Gets the description. |
| 150 | + * |
| 151 | + * <p>The description of the assistant. This string cannot contain carriage return, newline, or |
| 152 | + * tab characters. |
| 153 | + * |
| 154 | + * @return the description |
| 155 | + */ |
| 156 | + public String description() { |
| 157 | + return description; |
| 158 | + } |
| 159 | + |
| 160 | + /** |
| 161 | + * Gets the language. |
| 162 | + * |
| 163 | + * <p>The language of the assistant. |
| 164 | + * |
| 165 | + * @return the language |
| 166 | + */ |
| 167 | + public String language() { |
| 168 | + return language; |
| 169 | + } |
| 170 | + |
| 171 | + /** |
| 172 | + * Gets the assistantSkills. |
| 173 | + * |
| 174 | + * <p>An array of skill references identifying the skills associated with the assistant. |
| 175 | + * |
| 176 | + * @return the assistantSkills |
| 177 | + */ |
| 178 | + public List<AssistantSkill> assistantSkills() { |
| 179 | + return assistantSkills; |
| 180 | + } |
| 181 | + |
| 182 | + /** |
| 183 | + * Gets the assistantEnvironments. |
| 184 | + * |
| 185 | + * <p>An array of objects describing the environments defined for the assistant. |
| 186 | + * |
| 187 | + * @return the assistantEnvironments |
| 188 | + */ |
| 189 | + public List<EnvironmentReference> assistantEnvironments() { |
| 190 | + return assistantEnvironments; |
| 191 | + } |
| 192 | +} |
0 commit comments