com.aliyuncs.vcs.transform.v20200515.GetBodyOptionsResponseUnmarshaller 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.vcs.transform.v20200515;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.vcs.model.v20200515.GetBodyOptionsResponse;
import com.aliyuncs.vcs.model.v20200515.GetBodyOptionsResponse.DataItem;
import com.aliyuncs.vcs.model.v20200515.GetBodyOptionsResponse.DataItem.OptionListItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class GetBodyOptionsResponseUnmarshaller {
public static GetBodyOptionsResponse unmarshall(GetBodyOptionsResponse getBodyOptionsResponse, UnmarshallerContext _ctx) {
getBodyOptionsResponse.setRequestId(_ctx.stringValue("GetBodyOptionsResponse.RequestId"));
getBodyOptionsResponse.setCode(_ctx.stringValue("GetBodyOptionsResponse.Code"));
getBodyOptionsResponse.setMessage(_ctx.stringValue("GetBodyOptionsResponse.Message"));
List data = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("GetBodyOptionsResponse.Data.Length"); i++) {
DataItem dataItem = new DataItem();
dataItem.setKey(_ctx.stringValue("GetBodyOptionsResponse.Data["+ i +"].Key"));
dataItem.setName(_ctx.stringValue("GetBodyOptionsResponse.Data["+ i +"].Name"));
List optionList = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("GetBodyOptionsResponse.Data["+ i +"].OptionList.Length"); j++) {
OptionListItem optionListItem = new OptionListItem();
optionListItem.setKey(_ctx.stringValue("GetBodyOptionsResponse.Data["+ i +"].OptionList["+ j +"].Key"));
optionListItem.setName(_ctx.stringValue("GetBodyOptionsResponse.Data["+ i +"].OptionList["+ j +"].Name"));
optionList.add(optionListItem);
}
dataItem.setOptionList(optionList);
data.add(dataItem);
}
getBodyOptionsResponse.setData(data);
return getBodyOptionsResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy