|
| 1 | +/* |
| 2 | + * (C) Copyright IBM Corp. 2022. |
| 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.v1.model; |
| 14 | + |
| 15 | +import com.ibm.cloud.sdk.core.service.model.GenericModel; |
| 16 | + |
| 17 | +/** The exportWorkspaceAsync options. */ |
| 18 | +public class ExportWorkspaceAsyncOptions extends GenericModel { |
| 19 | + |
| 20 | + /** |
| 21 | + * Indicates how the returned workspace data will be sorted. Specify `sort=stable` to sort all |
| 22 | + * workspace objects by unique identifier, in ascending alphabetical order. |
| 23 | + */ |
| 24 | + public interface Sort { |
| 25 | + /** stable. */ |
| 26 | + String STABLE = "stable"; |
| 27 | + } |
| 28 | + |
| 29 | + protected String workspaceId; |
| 30 | + protected Boolean includeAudit; |
| 31 | + protected String sort; |
| 32 | + protected Boolean verbose; |
| 33 | + |
| 34 | + /** Builder. */ |
| 35 | + public static class Builder { |
| 36 | + private String workspaceId; |
| 37 | + private Boolean includeAudit; |
| 38 | + private String sort; |
| 39 | + private Boolean verbose; |
| 40 | + |
| 41 | + private Builder(ExportWorkspaceAsyncOptions exportWorkspaceAsyncOptions) { |
| 42 | + this.workspaceId = exportWorkspaceAsyncOptions.workspaceId; |
| 43 | + this.includeAudit = exportWorkspaceAsyncOptions.includeAudit; |
| 44 | + this.sort = exportWorkspaceAsyncOptions.sort; |
| 45 | + this.verbose = exportWorkspaceAsyncOptions.verbose; |
| 46 | + } |
| 47 | + |
| 48 | + /** Instantiates a new builder. */ |
| 49 | + public Builder() {} |
| 50 | + |
| 51 | + /** |
| 52 | + * Instantiates a new builder with required properties. |
| 53 | + * |
| 54 | + * @param workspaceId the workspaceId |
| 55 | + */ |
| 56 | + public Builder(String workspaceId) { |
| 57 | + this.workspaceId = workspaceId; |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * Builds a ExportWorkspaceAsyncOptions. |
| 62 | + * |
| 63 | + * @return the new ExportWorkspaceAsyncOptions instance |
| 64 | + */ |
| 65 | + public ExportWorkspaceAsyncOptions build() { |
| 66 | + return new ExportWorkspaceAsyncOptions(this); |
| 67 | + } |
| 68 | + |
| 69 | + /** |
| 70 | + * Set the workspaceId. |
| 71 | + * |
| 72 | + * @param workspaceId the workspaceId |
| 73 | + * @return the ExportWorkspaceAsyncOptions builder |
| 74 | + */ |
| 75 | + public Builder workspaceId(String workspaceId) { |
| 76 | + this.workspaceId = workspaceId; |
| 77 | + return this; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * Set the includeAudit. |
| 82 | + * |
| 83 | + * @param includeAudit the includeAudit |
| 84 | + * @return the ExportWorkspaceAsyncOptions builder |
| 85 | + */ |
| 86 | + public Builder includeAudit(Boolean includeAudit) { |
| 87 | + this.includeAudit = includeAudit; |
| 88 | + return this; |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * Set the sort. |
| 93 | + * |
| 94 | + * @param sort the sort |
| 95 | + * @return the ExportWorkspaceAsyncOptions builder |
| 96 | + */ |
| 97 | + public Builder sort(String sort) { |
| 98 | + this.sort = sort; |
| 99 | + return this; |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Set the verbose. |
| 104 | + * |
| 105 | + * @param verbose the verbose |
| 106 | + * @return the ExportWorkspaceAsyncOptions builder |
| 107 | + */ |
| 108 | + public Builder verbose(Boolean verbose) { |
| 109 | + this.verbose = verbose; |
| 110 | + return this; |
| 111 | + } |
| 112 | + } |
| 113 | + |
| 114 | + protected ExportWorkspaceAsyncOptions() {} |
| 115 | + |
| 116 | + protected ExportWorkspaceAsyncOptions(Builder builder) { |
| 117 | + com.ibm.cloud.sdk.core.util.Validator.notEmpty( |
| 118 | + builder.workspaceId, "workspaceId cannot be empty"); |
| 119 | + workspaceId = builder.workspaceId; |
| 120 | + includeAudit = builder.includeAudit; |
| 121 | + sort = builder.sort; |
| 122 | + verbose = builder.verbose; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * New builder. |
| 127 | + * |
| 128 | + * @return a ExportWorkspaceAsyncOptions builder |
| 129 | + */ |
| 130 | + public Builder newBuilder() { |
| 131 | + return new Builder(this); |
| 132 | + } |
| 133 | + |
| 134 | + /** |
| 135 | + * Gets the workspaceId. |
| 136 | + * |
| 137 | + * <p>Unique identifier of the workspace. |
| 138 | + * |
| 139 | + * @return the workspaceId |
| 140 | + */ |
| 141 | + public String workspaceId() { |
| 142 | + return workspaceId; |
| 143 | + } |
| 144 | + |
| 145 | + /** |
| 146 | + * Gets the includeAudit. |
| 147 | + * |
| 148 | + * <p>Whether to include the audit properties (`created` and `updated` timestamps) in the |
| 149 | + * response. |
| 150 | + * |
| 151 | + * @return the includeAudit |
| 152 | + */ |
| 153 | + public Boolean includeAudit() { |
| 154 | + return includeAudit; |
| 155 | + } |
| 156 | + |
| 157 | + /** |
| 158 | + * Gets the sort. |
| 159 | + * |
| 160 | + * <p>Indicates how the returned workspace data will be sorted. Specify `sort=stable` to sort all |
| 161 | + * workspace objects by unique identifier, in ascending alphabetical order. |
| 162 | + * |
| 163 | + * @return the sort |
| 164 | + */ |
| 165 | + public String sort() { |
| 166 | + return sort; |
| 167 | + } |
| 168 | + |
| 169 | + /** |
| 170 | + * Gets the verbose. |
| 171 | + * |
| 172 | + * <p>Whether the response should include the `counts` property, which indicates how many of each |
| 173 | + * component (such as intents and entities) the workspace contains. |
| 174 | + * |
| 175 | + * @return the verbose |
| 176 | + */ |
| 177 | + public Boolean verbose() { |
| 178 | + return verbose; |
| 179 | + } |
| 180 | +} |
0 commit comments