|
| 1 | +// This file is auto-generated, don't edit it. Thanks. |
| 2 | +package com.aliyun.sdk.service.aliding20230426.models; |
| 3 | + |
| 4 | +import com.aliyun.sdk.gateway.pop.*; |
| 5 | +import darabonba.core.*; |
| 6 | +import darabonba.core.async.*; |
| 7 | +import darabonba.core.sync.*; |
| 8 | +import darabonba.core.client.*; |
| 9 | +import darabonba.core.RequestModel; |
| 10 | +import darabonba.core.TeaModel; |
| 11 | +import com.aliyun.sdk.gateway.pop.models.*; |
| 12 | + |
| 13 | +/** |
| 14 | + * |
| 15 | + * {@link SwitchMainOrgRequest} extends {@link RequestModel} |
| 16 | + * |
| 17 | + * <p>SwitchMainOrgRequest</p> |
| 18 | + */ |
| 19 | +public class SwitchMainOrgRequest extends Request { |
| 20 | + @com.aliyun.core.annotation.Header |
| 21 | + @com.aliyun.core.annotation.NameInMap("AccountContext") |
| 22 | + private AccountContext accountContext; |
| 23 | + |
| 24 | + @com.aliyun.core.annotation.Body |
| 25 | + @com.aliyun.core.annotation.NameInMap("TargetOrgId") |
| 26 | + private Long targetOrgId; |
| 27 | + |
| 28 | + @com.aliyun.core.annotation.Body |
| 29 | + @com.aliyun.core.annotation.NameInMap("TenantContext") |
| 30 | + private TenantContext tenantContext; |
| 31 | + |
| 32 | + private SwitchMainOrgRequest(Builder builder) { |
| 33 | + super(builder); |
| 34 | + this.accountContext = builder.accountContext; |
| 35 | + this.targetOrgId = builder.targetOrgId; |
| 36 | + this.tenantContext = builder.tenantContext; |
| 37 | + } |
| 38 | + |
| 39 | + public static Builder builder() { |
| 40 | + return new Builder(); |
| 41 | + } |
| 42 | + |
| 43 | + public static SwitchMainOrgRequest create() { |
| 44 | + return builder().build(); |
| 45 | + } |
| 46 | + |
| 47 | +@Override |
| 48 | + public Builder toBuilder() { |
| 49 | + return new Builder(this); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * @return accountContext |
| 54 | + */ |
| 55 | + public AccountContext getAccountContext() { |
| 56 | + return this.accountContext; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * @return targetOrgId |
| 61 | + */ |
| 62 | + public Long getTargetOrgId() { |
| 63 | + return this.targetOrgId; |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * @return tenantContext |
| 68 | + */ |
| 69 | + public TenantContext getTenantContext() { |
| 70 | + return this.tenantContext; |
| 71 | + } |
| 72 | + |
| 73 | + public static final class Builder extends Request.Builder<SwitchMainOrgRequest, Builder> { |
| 74 | + private AccountContext accountContext; |
| 75 | + private Long targetOrgId; |
| 76 | + private TenantContext tenantContext; |
| 77 | + |
| 78 | + private Builder() { |
| 79 | + super(); |
| 80 | + } |
| 81 | + |
| 82 | + private Builder(SwitchMainOrgRequest request) { |
| 83 | + super(request); |
| 84 | + this.accountContext = request.accountContext; |
| 85 | + this.targetOrgId = request.targetOrgId; |
| 86 | + this.tenantContext = request.tenantContext; |
| 87 | + } |
| 88 | + |
| 89 | + /** |
| 90 | + * AccountContext. |
| 91 | + */ |
| 92 | + public Builder accountContext(AccountContext accountContext) { |
| 93 | + String accountContextShrink = shrink(accountContext, "AccountContext", "json"); |
| 94 | + this.putHeaderParameter("AccountContext", accountContextShrink); |
| 95 | + this.accountContext = accountContext; |
| 96 | + return this; |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * TargetOrgId. |
| 101 | + */ |
| 102 | + public Builder targetOrgId(Long targetOrgId) { |
| 103 | + this.putBodyParameter("TargetOrgId", targetOrgId); |
| 104 | + this.targetOrgId = targetOrgId; |
| 105 | + return this; |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * TenantContext. |
| 110 | + */ |
| 111 | + public Builder tenantContext(TenantContext tenantContext) { |
| 112 | + String tenantContextShrink = shrink(tenantContext, "TenantContext", "json"); |
| 113 | + this.putBodyParameter("TenantContext", tenantContextShrink); |
| 114 | + this.tenantContext = tenantContext; |
| 115 | + return this; |
| 116 | + } |
| 117 | + |
| 118 | + @Override |
| 119 | + public SwitchMainOrgRequest build() { |
| 120 | + return new SwitchMainOrgRequest(this); |
| 121 | + } |
| 122 | + |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * |
| 127 | + * {@link SwitchMainOrgRequest} extends {@link TeaModel} |
| 128 | + * |
| 129 | + * <p>SwitchMainOrgRequest</p> |
| 130 | + */ |
| 131 | + public static class AccountContext extends TeaModel { |
| 132 | + @com.aliyun.core.annotation.NameInMap("accountId") |
| 133 | + @com.aliyun.core.annotation.Validation(required = true) |
| 134 | + private String accountId; |
| 135 | + |
| 136 | + private AccountContext(Builder builder) { |
| 137 | + this.accountId = builder.accountId; |
| 138 | + } |
| 139 | + |
| 140 | + public static Builder builder() { |
| 141 | + return new Builder(); |
| 142 | + } |
| 143 | + |
| 144 | + public static AccountContext create() { |
| 145 | + return builder().build(); |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * @return accountId |
| 150 | + */ |
| 151 | + public String getAccountId() { |
| 152 | + return this.accountId; |
| 153 | + } |
| 154 | + |
| 155 | + public static final class Builder { |
| 156 | + private String accountId; |
| 157 | + |
| 158 | + private Builder() { |
| 159 | + } |
| 160 | + |
| 161 | + private Builder(AccountContext model) { |
| 162 | + this.accountId = model.accountId; |
| 163 | + } |
| 164 | + |
| 165 | + /** |
| 166 | + * <p>This parameter is required.</p> |
| 167 | + * |
| 168 | + * <strong>example:</strong> |
| 169 | + * <p>012345</p> |
| 170 | + */ |
| 171 | + public Builder accountId(String accountId) { |
| 172 | + this.accountId = accountId; |
| 173 | + return this; |
| 174 | + } |
| 175 | + |
| 176 | + public AccountContext build() { |
| 177 | + return new AccountContext(this); |
| 178 | + } |
| 179 | + |
| 180 | + } |
| 181 | + |
| 182 | + } |
| 183 | + /** |
| 184 | + * |
| 185 | + * {@link SwitchMainOrgRequest} extends {@link TeaModel} |
| 186 | + * |
| 187 | + * <p>SwitchMainOrgRequest</p> |
| 188 | + */ |
| 189 | + public static class TenantContext extends TeaModel { |
| 190 | + @com.aliyun.core.annotation.NameInMap("tenantId") |
| 191 | + private String tenantId; |
| 192 | + |
| 193 | + private TenantContext(Builder builder) { |
| 194 | + this.tenantId = builder.tenantId; |
| 195 | + } |
| 196 | + |
| 197 | + public static Builder builder() { |
| 198 | + return new Builder(); |
| 199 | + } |
| 200 | + |
| 201 | + public static TenantContext create() { |
| 202 | + return builder().build(); |
| 203 | + } |
| 204 | + |
| 205 | + /** |
| 206 | + * @return tenantId |
| 207 | + */ |
| 208 | + public String getTenantId() { |
| 209 | + return this.tenantId; |
| 210 | + } |
| 211 | + |
| 212 | + public static final class Builder { |
| 213 | + private String tenantId; |
| 214 | + |
| 215 | + private Builder() { |
| 216 | + } |
| 217 | + |
| 218 | + private Builder(TenantContext model) { |
| 219 | + this.tenantId = model.tenantId; |
| 220 | + } |
| 221 | + |
| 222 | + /** |
| 223 | + * tenantId. |
| 224 | + */ |
| 225 | + public Builder tenantId(String tenantId) { |
| 226 | + this.tenantId = tenantId; |
| 227 | + return this; |
| 228 | + } |
| 229 | + |
| 230 | + public TenantContext build() { |
| 231 | + return new TenantContext(this); |
| 232 | + } |
| 233 | + |
| 234 | + } |
| 235 | + |
| 236 | + } |
| 237 | +} |
0 commit comments