All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyuncs.ims.transform.v20190815.ListVirtualMFADevicesResponseUnmarshaller 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.ims.transform.v20190815;

import java.util.ArrayList;
import java.util.List;

import com.aliyuncs.ims.model.v20190815.ListVirtualMFADevicesResponse;
import com.aliyuncs.ims.model.v20190815.ListVirtualMFADevicesResponse.VirtualMFADevice;
import com.aliyuncs.ims.model.v20190815.ListVirtualMFADevicesResponse.VirtualMFADevice.User;
import com.aliyuncs.transform.UnmarshallerContext;


public class ListVirtualMFADevicesResponseUnmarshaller {

	public static ListVirtualMFADevicesResponse unmarshall(ListVirtualMFADevicesResponse listVirtualMFADevicesResponse, UnmarshallerContext _ctx) {
		
		listVirtualMFADevicesResponse.setRequestId(_ctx.stringValue("ListVirtualMFADevicesResponse.RequestId"));
		listVirtualMFADevicesResponse.setIsTruncated(_ctx.booleanValue("ListVirtualMFADevicesResponse.IsTruncated"));
		listVirtualMFADevicesResponse.setMarker(_ctx.stringValue("ListVirtualMFADevicesResponse.Marker"));

		List virtualMFADevices = new ArrayList();
		for (int i = 0; i < _ctx.lengthValue("ListVirtualMFADevicesResponse.VirtualMFADevices.Length"); i++) {
			VirtualMFADevice virtualMFADevice = new VirtualMFADevice();
			virtualMFADevice.setSerialNumber(_ctx.stringValue("ListVirtualMFADevicesResponse.VirtualMFADevices["+ i +"].SerialNumber"));
			virtualMFADevice.setActivateDate(_ctx.stringValue("ListVirtualMFADevicesResponse.VirtualMFADevices["+ i +"].ActivateDate"));

			User user = new User();
			user.setUserPrincipalName(_ctx.stringValue("ListVirtualMFADevicesResponse.VirtualMFADevices["+ i +"].User.UserPrincipalName"));
			user.setDisplayName(_ctx.stringValue("ListVirtualMFADevicesResponse.VirtualMFADevices["+ i +"].User.DisplayName"));
			user.setUserId(_ctx.stringValue("ListVirtualMFADevicesResponse.VirtualMFADevices["+ i +"].User.UserId"));
			virtualMFADevice.setUser(user);

			virtualMFADevices.add(virtualMFADevice);
		}
		listVirtualMFADevicesResponse.setVirtualMFADevices(virtualMFADevices);
	 
	 	return listVirtualMFADevicesResponse;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy