-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_types.go
146 lines (116 loc) · 5.05 KB
/
api_types.go
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sso
import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
)
var _ aws.Config
var _ = awsutil.Prettify
// Provides information about your AWS account.
type AccountInfo struct {
_ struct{} `type:"structure"`
// The identifier of the AWS account that is assigned to the user.
AccountId *string `locationName:"accountId" type:"string"`
// The display name of the AWS account that is assigned to the user.
AccountName *string `locationName:"accountName" type:"string"`
// The email address of the AWS account that is assigned to the user.
EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
}
// String returns the string representation
func (s AccountInfo) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s AccountInfo) MarshalFields(e protocol.FieldEncoder) error {
if s.AccountId != nil {
v := *s.AccountId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "accountId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.AccountName != nil {
v := *s.AccountName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "accountName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.EmailAddress != nil {
v := *s.EmailAddress
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "emailAddress", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}
// Provides information about the role credentials that are assigned to the
// user.
type RoleCredentials struct {
_ struct{} `type:"structure"`
// The identifier used for the temporary security credentials. For more information,
// see Using Temporary Security Credentials to Request Access to AWS Resources
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
AccessKeyId *string `locationName:"accessKeyId" type:"string"`
// The date on which temporary security credentials expire.
Expiration *int64 `locationName:"expiration" type:"long"`
// The key that is used to sign the request. For more information, see Using
// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`
// The token used for temporary credentials. For more information, see Using
// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
// in the AWS IAM User Guide.
SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"`
}
// String returns the string representation
func (s RoleCredentials) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s RoleCredentials) MarshalFields(e protocol.FieldEncoder) error {
if s.AccessKeyId != nil {
v := *s.AccessKeyId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "accessKeyId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.Expiration != nil {
v := *s.Expiration
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "expiration", protocol.Int64Value(v), metadata)
}
if s.SecretAccessKey != nil {
v := *s.SecretAccessKey
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "secretAccessKey", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.SessionToken != nil {
v := *s.SessionToken
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "sessionToken", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}
// Provides information about the role that is assigned to the user.
type RoleInfo struct {
_ struct{} `type:"structure"`
// The identifier of the AWS account assigned to the user.
AccountId *string `locationName:"accountId" type:"string"`
// The friendly name of the role that is assigned to the user.
RoleName *string `locationName:"roleName" type:"string"`
}
// String returns the string representation
func (s RoleInfo) String() string {
return awsutil.Prettify(s)
}
// MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (s RoleInfo) MarshalFields(e protocol.FieldEncoder) error {
if s.AccountId != nil {
v := *s.AccountId
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "accountId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
if s.RoleName != nil {
v := *s.RoleName
metadata := protocol.Metadata{}
e.SetValue(protocol.BodyTarget, "roleName", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata)
}
return nil
}