com.aliyuncs.vcs.transform.v20200515.SearchBodyResponseUnmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-vcs Show documentation
Show all versions of aliyun-java-sdk-vcs Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
/*
* 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.SearchBodyResponse;
import com.aliyuncs.vcs.model.v20200515.SearchBodyResponse.Data;
import com.aliyuncs.vcs.model.v20200515.SearchBodyResponse.Data.Record;
import com.aliyuncs.transform.UnmarshallerContext;
public class SearchBodyResponseUnmarshaller {
public static SearchBodyResponse unmarshall(SearchBodyResponse searchBodyResponse, UnmarshallerContext _ctx) {
searchBodyResponse.setRequestId(_ctx.stringValue("SearchBodyResponse.RequestId"));
searchBodyResponse.setMessage(_ctx.stringValue("SearchBodyResponse.Message"));
searchBodyResponse.setCode(_ctx.stringValue("SearchBodyResponse.Code"));
Data data = new Data();
data.setPageNo(_ctx.integerValue("SearchBodyResponse.Data.PageNo"));
data.setTotalPage(_ctx.integerValue("SearchBodyResponse.Data.TotalPage"));
data.setPageSize(_ctx.integerValue("SearchBodyResponse.Data.PageSize"));
data.setTotalCount(_ctx.integerValue("SearchBodyResponse.Data.TotalCount"));
List records = new ArrayList();
for (int i = 0; i < _ctx.lengthValue("SearchBodyResponse.Data.Records.Length"); i++) {
Record record = new Record();
record.setGbId(_ctx.stringValue("SearchBodyResponse.Data.Records["+ i +"].GbId"));
record.setTargetImageUrl(_ctx.stringValue("SearchBodyResponse.Data.Records["+ i +"].TargetImageUrl"));
record.setRightBottomY(_ctx.floatValue("SearchBodyResponse.Data.Records["+ i +"].RightBottomY"));
record.setImageUrl(_ctx.stringValue("SearchBodyResponse.Data.Records["+ i +"].ImageUrl"));
record.setLeftTopY(_ctx.floatValue("SearchBodyResponse.Data.Records["+ i +"].LeftTopY"));
record.setScore(_ctx.floatValue("SearchBodyResponse.Data.Records["+ i +"].Score"));
record.setLeftTopX(_ctx.floatValue("SearchBodyResponse.Data.Records["+ i +"].LeftTopX"));
record.setRightBottomX(_ctx.floatValue("SearchBodyResponse.Data.Records["+ i +"].RightBottomX"));
records.add(record);
}
data.setRecords(records);
searchBodyResponse.setData(data);
return searchBodyResponse;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy