|
| 1 | +/* |
| 2 | + * (C) Copyright IBM Corp. 2021. |
| 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.cloud.is.vpc.v1.model; |
| 14 | + |
| 15 | +import com.ibm.cloud.sdk.core.service.model.GenericModel; |
| 16 | + |
| 17 | +/** |
| 18 | + * The createInstanceGroupManagerAction options. |
| 19 | + */ |
| 20 | +public class CreateInstanceGroupManagerActionOptions extends GenericModel { |
| 21 | + |
| 22 | + protected String instanceGroupId; |
| 23 | + protected String instanceGroupManagerId; |
| 24 | + protected InstanceGroupManagerActionPrototype instanceGroupManagerActionPrototype; |
| 25 | + |
| 26 | + /** |
| 27 | + * Builder. |
| 28 | + */ |
| 29 | + public static class Builder { |
| 30 | + private String instanceGroupId; |
| 31 | + private String instanceGroupManagerId; |
| 32 | + private InstanceGroupManagerActionPrototype instanceGroupManagerActionPrototype; |
| 33 | + |
| 34 | + private Builder(CreateInstanceGroupManagerActionOptions createInstanceGroupManagerActionOptions) { |
| 35 | + this.instanceGroupId = createInstanceGroupManagerActionOptions.instanceGroupId; |
| 36 | + this.instanceGroupManagerId = createInstanceGroupManagerActionOptions.instanceGroupManagerId; |
| 37 | + this.instanceGroupManagerActionPrototype = createInstanceGroupManagerActionOptions.instanceGroupManagerActionPrototype; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * Instantiates a new builder. |
| 42 | + */ |
| 43 | + public Builder() { |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * Instantiates a new builder with required properties. |
| 48 | + * |
| 49 | + * @param instanceGroupId the instanceGroupId |
| 50 | + * @param instanceGroupManagerId the instanceGroupManagerId |
| 51 | + * @param instanceGroupManagerActionPrototype the instanceGroupManagerActionPrototype |
| 52 | + */ |
| 53 | + public Builder(String instanceGroupId, String instanceGroupManagerId, InstanceGroupManagerActionPrototype instanceGroupManagerActionPrototype) { |
| 54 | + this.instanceGroupId = instanceGroupId; |
| 55 | + this.instanceGroupManagerId = instanceGroupManagerId; |
| 56 | + this.instanceGroupManagerActionPrototype = instanceGroupManagerActionPrototype; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * Builds a CreateInstanceGroupManagerActionOptions. |
| 61 | + * |
| 62 | + * @return the new CreateInstanceGroupManagerActionOptions instance |
| 63 | + */ |
| 64 | + public CreateInstanceGroupManagerActionOptions build() { |
| 65 | + return new CreateInstanceGroupManagerActionOptions(this); |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Set the instanceGroupId. |
| 70 | + * |
| 71 | + * @param instanceGroupId the instanceGroupId |
| 72 | + * @return the CreateInstanceGroupManagerActionOptions builder |
| 73 | + */ |
| 74 | + public Builder instanceGroupId(String instanceGroupId) { |
| 75 | + this.instanceGroupId = instanceGroupId; |
| 76 | + return this; |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * Set the instanceGroupManagerId. |
| 81 | + * |
| 82 | + * @param instanceGroupManagerId the instanceGroupManagerId |
| 83 | + * @return the CreateInstanceGroupManagerActionOptions builder |
| 84 | + */ |
| 85 | + public Builder instanceGroupManagerId(String instanceGroupManagerId) { |
| 86 | + this.instanceGroupManagerId = instanceGroupManagerId; |
| 87 | + return this; |
| 88 | + } |
| 89 | + |
| 90 | + /** |
| 91 | + * Set the instanceGroupManagerActionPrototype. |
| 92 | + * |
| 93 | + * @param instanceGroupManagerActionPrototype the instanceGroupManagerActionPrototype |
| 94 | + * @return the CreateInstanceGroupManagerActionOptions builder |
| 95 | + */ |
| 96 | + public Builder instanceGroupManagerActionPrototype(InstanceGroupManagerActionPrototype instanceGroupManagerActionPrototype) { |
| 97 | + this.instanceGroupManagerActionPrototype = instanceGroupManagerActionPrototype; |
| 98 | + return this; |
| 99 | + } |
| 100 | + } |
| 101 | + |
| 102 | + protected CreateInstanceGroupManagerActionOptions(Builder builder) { |
| 103 | + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.instanceGroupId, |
| 104 | + "instanceGroupId cannot be empty"); |
| 105 | + com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.instanceGroupManagerId, |
| 106 | + "instanceGroupManagerId cannot be empty"); |
| 107 | + com.ibm.cloud.sdk.core.util.Validator.notNull(builder.instanceGroupManagerActionPrototype, |
| 108 | + "instanceGroupManagerActionPrototype cannot be null"); |
| 109 | + instanceGroupId = builder.instanceGroupId; |
| 110 | + instanceGroupManagerId = builder.instanceGroupManagerId; |
| 111 | + instanceGroupManagerActionPrototype = builder.instanceGroupManagerActionPrototype; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * New builder. |
| 116 | + * |
| 117 | + * @return a CreateInstanceGroupManagerActionOptions builder |
| 118 | + */ |
| 119 | + public Builder newBuilder() { |
| 120 | + return new Builder(this); |
| 121 | + } |
| 122 | + |
| 123 | + /** |
| 124 | + * Gets the instanceGroupId. |
| 125 | + * |
| 126 | + * The instance group identifier. |
| 127 | + * |
| 128 | + * @return the instanceGroupId |
| 129 | + */ |
| 130 | + public String instanceGroupId() { |
| 131 | + return instanceGroupId; |
| 132 | + } |
| 133 | + |
| 134 | + /** |
| 135 | + * Gets the instanceGroupManagerId. |
| 136 | + * |
| 137 | + * The instance group manager identifier. |
| 138 | + * |
| 139 | + * @return the instanceGroupManagerId |
| 140 | + */ |
| 141 | + public String instanceGroupManagerId() { |
| 142 | + return instanceGroupManagerId; |
| 143 | + } |
| 144 | + |
| 145 | + /** |
| 146 | + * Gets the instanceGroupManagerActionPrototype. |
| 147 | + * |
| 148 | + * The instance group manager action prototype object. |
| 149 | + * |
| 150 | + * @return the instanceGroupManagerActionPrototype |
| 151 | + */ |
| 152 | + public InstanceGroupManagerActionPrototype instanceGroupManagerActionPrototype() { |
| 153 | + return instanceGroupManagerActionPrototype; |
| 154 | + } |
| 155 | +} |
| 156 | + |
0 commit comments