com.aliyuncs.vcs.transform.v20200515.ListPersonsResponseUnmarshaller 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.ListPersonsResponse;
import com.aliyuncs.vcs.model.v20200515.ListPersonsResponse.Data;
import com.aliyuncs.vcs.model.v20200515.ListPersonsResponse.Data.RecordsItem;
import com.aliyuncs.vcs.model.v20200515.ListPersonsResponse.Data.RecordsItem.TagListItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class ListPersonsResponseUnmarshaller {
public static ListPersonsResponse unmarshall(ListPersonsResponse listPersonsResponse, UnmarshallerContext _ctx) {
listPersonsResponse.setRequestId(_ctx.stringValue("ListPersonsResponse.RequestId"));
listPersonsResponse.setCode(_ctx.stringValue("ListPersonsResponse.Code"));
listPersonsResponse.setMessage(_ctx.stringValue("ListPersonsResponse.Message"));
Data data = new Data();
data.setPageNo(_ctx.stringValue("ListPersonsResponse.Data.PageNo"));
data.setPageSize(_ctx.stringValue("ListPersonsResponse.Data.PageSize"));
data.setTotalCount(_ctx.stringValue("ListPersonsResponse.Data.TotalCount"));
data.setTotalPage(_ctx.stringValue("ListPersonsResponse.Data.TotalPage"));
List records = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("ListPersonsResponse.Data.Records.Length"); i++) {
RecordsItem recordsItem = new RecordsItem();
recordsItem.setFirstAppearTime(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].FirstAppearTime"));
recordsItem.setPersonId(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].PersonId"));
recordsItem.setPicUrl(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].PicUrl"));
List tagList = new ArrayList();
for (int j = 0; j < _ctx.lengthValue("ListPersonsResponse.Data.Records["+ i +"].TagList.Length"); j++) {
TagListItem tagListItem = new TagListItem();
tagListItem.setTagCode(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].TagList["+ j +"].TagCode"));
tagListItem.setTagName(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].TagList["+ j +"].TagName"));
tagListItem.setTagValue(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].TagList["+ j +"].TagValue"));
tagListItem.setTagValueId(_ctx.stringValue("ListPersonsResponse.Data.Records["+ i +"].TagList["+ j +"].TagValueId"));
tagList.add(tagListItem);
}
recordsItem.setTagList(tagList);
records.add(recordsItem);
}
data.setRecords(records);
listPersonsResponse.setData(data);
return listPersonsResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy