|
| 1 | +/* |
| 2 | + * Copyright 2018 IBM Corp. All Rights Reserved. |
| 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.developer_cloud.visual_recognition.v3.model; |
| 14 | + |
| 15 | +import com.ibm.watson.developer_cloud.service.model.GenericModel; |
| 16 | +import com.ibm.watson.developer_cloud.util.Validator; |
| 17 | + |
| 18 | +/** |
| 19 | + * The getCoreMlModel options. |
| 20 | + */ |
| 21 | +public class GetCoreMlModelOptions extends GenericModel { |
| 22 | + |
| 23 | + private String classifierId; |
| 24 | + |
| 25 | + /** |
| 26 | + * Builder. |
| 27 | + */ |
| 28 | + public static class Builder { |
| 29 | + private String classifierId; |
| 30 | + |
| 31 | + private Builder(GetCoreMlModelOptions getCoreMlModelOptions) { |
| 32 | + classifierId = getCoreMlModelOptions.classifierId; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * Instantiates a new builder. |
| 37 | + */ |
| 38 | + public Builder() { |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * Instantiates a new builder with required properties. |
| 43 | + * |
| 44 | + * @param classifierId the classifierId |
| 45 | + */ |
| 46 | + public Builder(String classifierId) { |
| 47 | + this.classifierId = classifierId; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Builds a GetCoreMlModelOptions. |
| 52 | + * |
| 53 | + * @return the getCoreMlModelOptions |
| 54 | + */ |
| 55 | + public GetCoreMlModelOptions build() { |
| 56 | + return new GetCoreMlModelOptions(this); |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * Set the classifierId. |
| 61 | + * |
| 62 | + * @param classifierId the classifierId |
| 63 | + * @return the GetCoreMlModelOptions builder |
| 64 | + */ |
| 65 | + public Builder classifierId(String classifierId) { |
| 66 | + this.classifierId = classifierId; |
| 67 | + return this; |
| 68 | + } |
| 69 | + } |
| 70 | + |
| 71 | + private GetCoreMlModelOptions(Builder builder) { |
| 72 | + Validator.notEmpty(builder.classifierId, "classifierId cannot be empty"); |
| 73 | + classifierId = builder.classifierId; |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * New builder. |
| 78 | + * |
| 79 | + * @return a GetCoreMlModelOptions builder |
| 80 | + */ |
| 81 | + public Builder newBuilder() { |
| 82 | + return new Builder(this); |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Gets the classifierId. |
| 87 | + * |
| 88 | + * The ID of the classifier. |
| 89 | + * |
| 90 | + * @return the classifierId |
| 91 | + */ |
| 92 | + public String classifierId() { |
| 93 | + return classifierId; |
| 94 | + } |
| 95 | +} |
0 commit comments