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

com.aliyuncs.v5.auth.sts.AssumeRoleResponseUnmarshaller Maven / Gradle / Ivy

Go to download

Aliyun Open API SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

The newest version!
package com.aliyuncs.v5.auth.sts;

import com.aliyuncs.v5.auth.sts.AssumeRoleResponse.AssumedRoleUser;
import com.aliyuncs.v5.auth.sts.AssumeRoleResponse.Credentials;
import com.aliyuncs.v5.transform.UnmarshallerContext;


public class AssumeRoleResponseUnmarshaller {

    public static AssumeRoleResponse unmarshall(AssumeRoleResponse assumeRoleResponse, UnmarshallerContext context) {

        assumeRoleResponse.setRequestId(context.stringValue("AssumeRoleResponse.RequestId"));

        Credentials credentials = new Credentials();
        credentials.setSecurityToken(context.stringValue("AssumeRoleResponse.Credentials.SecurityToken"));
        credentials.setAccessKeySecret(context.stringValue("AssumeRoleResponse.Credentials.AccessKeySecret"));
        credentials.setAccessKeyId(context.stringValue("AssumeRoleResponse.Credentials.AccessKeyId"));
        credentials.setExpiration(context.stringValue("AssumeRoleResponse.Credentials.Expiration"));
        assumeRoleResponse.setCredentials(credentials);

        AssumedRoleUser assumedRoleUser = new AssumedRoleUser();
        assumedRoleUser.setArn(context.stringValue("AssumeRoleResponse.AssumedRoleUser.Arn"));
        assumedRoleUser.setAssumedRoleId(context.stringValue("AssumeRoleResponse.AssumedRoleUser.AssumedRoleId"));
        assumeRoleResponse.setAssumedRoleUser(assumedRoleUser);

        return assumeRoleResponse;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy