com.aliyuncs.sae.transform.v20190506.UpdateWebApplicationTrafficConfigResponseUnmarshaller Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sae.transform.v20190506;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sae.model.v20190506.UpdateWebApplicationTrafficConfigResponse;
import com.aliyuncs.sae.model.v20190506.UpdateWebApplicationTrafficConfigResponse.Data;
import com.aliyuncs.sae.model.v20190506.UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig;
import com.aliyuncs.sae.model.v20190506.UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig.WebAclEntriesItem;
import java.util.Map;
import com.aliyuncs.transform.UnmarshallerContext;
public class UpdateWebApplicationTrafficConfigResponseUnmarshaller {
public static UpdateWebApplicationTrafficConfigResponse unmarshall(UpdateWebApplicationTrafficConfigResponse updateWebApplicationTrafficConfigResponse, UnmarshallerContext _ctx) {
updateWebApplicationTrafficConfigResponse.setRequestId(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.RequestId"));
updateWebApplicationTrafficConfigResponse.setCode(_ctx.integerValue("UpdateWebApplicationTrafficConfigResponse.Code"));
updateWebApplicationTrafficConfigResponse.setMessage(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.Message"));
updateWebApplicationTrafficConfigResponse.setSuccess(_ctx.booleanValue("UpdateWebApplicationTrafficConfigResponse.Success"));
Data data = new Data();
data.setAuthType(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.Data.AuthType"));
data.setDisableInternetURL(_ctx.booleanValue("UpdateWebApplicationTrafficConfigResponse.Data.DisableInternetURL"));
data.setRevisionsTrafficWeight(_ctx.mapValue("UpdateWebApplicationTrafficConfigResponse.Data.RevisionsTrafficWeight"));
WebAclConfig webAclConfig = new WebAclConfig();
webAclConfig.setAclDescription(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig.AclDescription"));
List webAclEntries = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig.WebAclEntries.Length"); i++) {
WebAclEntriesItem webAclEntriesItem = new WebAclEntriesItem();
webAclEntriesItem.setEntry(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig.WebAclEntries["+ i +"].Entry"));
webAclEntriesItem.setDescription(_ctx.stringValue("UpdateWebApplicationTrafficConfigResponse.Data.WebAclConfig.WebAclEntries["+ i +"].Description"));
webAclEntries.add(webAclEntriesItem);
}
webAclConfig.setWebAclEntries(webAclEntries);
data.setWebAclConfig(webAclConfig);
updateWebApplicationTrafficConfigResponse.setData(data);
return updateWebApplicationTrafficConfigResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy