package com.cxyxiaomo.epp.TencentCloud;

import com.tencent.cloud.Response;
import lombok.Data;

@Data
public class TmpCredential {
    String tmpSecretId;
    String tmpSecretKey;
    String sessionToken;
    String objectKey;
    Long startTimestamp;
    Long expiredTimestamp;
    String bucket;
    String region;

    public TmpCredential(Response response, String objectKey, Long startTimestamp, Long expiredTimestamp, String bucket, String region) {
        this.tmpSecretId = response.credentials.tmpSecretId;
        this.tmpSecretKey = response.credentials.tmpSecretKey;
        this.sessionToken = response.credentials.sessionToken;
        this.objectKey = objectKey;
        this.startTimestamp = startTimestamp;
        this.expiredTimestamp = expiredTimestamp;
        this.bucket = bucket;
        this.region = region;
    }
}
