wangmengmeng
2024-12-24 24432a361d5c6bd6f3d8c008693e9f1155d62517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package com.dji.sdk.cloudapi.storage;
 
import com.dji.sdk.common.BaseModel;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
 
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
 
/**
 * @author sean
 * @version 0.2
 * @date 2021/12/7
 */
@Schema(description = "Temporary credential data")
public class StsCredentialsResponse extends BaseModel {
 
    @Schema(description = "bucket name", example = "bucket-api")
    @NotNull
    private String bucket;
 
    @NotNull
    @Valid
    @Schema(description = "The token data of the temporary credential")
    private CredentialsToken credentials;
 
    @NotNull
    @Schema(description = "access domain name for external services", example = "https://oss-cn-hangzhou.aliyuncs.com")
    @Pattern(regexp = "^http[s]?://.*$")
    private String endpoint;
 
    @NotNull
    @JsonProperty("object_key_prefix")
    @Schema(description = "The folder path where the object needs to be stored.", example = "files/wayline")
    private String objectKeyPrefix;
 
    @NotNull
    private OssTypeEnum provider;
 
    @NotNull
    @Schema(description = "The region where the bucket is located.", example = "us-east-1")
    private String region;
 
    public StsCredentialsResponse() {
    }
 
    @Override
    public String toString() {
        return "StsCredentialsResponse{" +
                "bucket='" + bucket + '\'' +
                ", credentials=" + credentials +
                ", endpoint='" + endpoint + '\'' +
                ", objectKeyPrefix='" + objectKeyPrefix + '\'' +
                ", provider='" + provider + '\'' +
                ", region='" + region + '\'' +
                '}';
    }
 
    public String getBucket() {
        return bucket;
    }
 
    public StsCredentialsResponse setBucket(String bucket) {
        this.bucket = bucket;
        return this;
    }
 
    public CredentialsToken getCredentials() {
        return credentials;
    }
 
    public StsCredentialsResponse setCredentials(CredentialsToken credentials) {
        this.credentials = credentials;
        return this;
    }
 
    public String getEndpoint() {
        return endpoint;
    }
 
    public StsCredentialsResponse setEndpoint(String endpoint) {
        this.endpoint = endpoint;
        return this;
    }
 
    public String getObjectKeyPrefix() {
        return objectKeyPrefix;
    }
 
    public StsCredentialsResponse setObjectKeyPrefix(String objectKeyPrefix) {
        this.objectKeyPrefix = objectKeyPrefix;
        return this;
    }
 
    public OssTypeEnum getProvider() {
        return provider;
    }
 
    public StsCredentialsResponse setProvider(OssTypeEnum provider) {
        this.provider = provider;
        return this;
    }
 
    public String getRegion() {
        return region;
    }
 
    public StsCredentialsResponse setRegion(String region) {
        this.region = region;
        return this;
    }
}