| 1 |
package ram |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
type ProfileRequest struct { |
| 11 |
UserName string |
| 12 |
Password string |
| 13 |
PasswordResetRequired bool |
| 14 |
MFABindRequired bool |
| 15 |
} |
| 16 |
|
| 17 |
type ProfileResponse struct { |
| 18 |
RamCommonResponse |
| 19 |
LoginProfile LoginProfile |
| 20 |
} |
| 21 |
|
| 22 |
func (client *RamClient) CreateLoginProfile(req ProfileRequest) (ProfileResponse, error) { |
| 23 |
var resp ProfileResponse |
| 24 |
err := client.Invoke("CreateLoginProfile", req, &resp) |
| 25 |
if err != nil { |
| 26 |
return ProfileResponse{}, err |
| 27 |
} |
| 28 |
return resp, nil |
| 29 |
} |
| 30 |
|
| 31 |
func (client *RamClient) GetLoginProfile(req UserQueryRequest) (ProfileResponse, error) { |
| 32 |
var resp ProfileResponse |
| 33 |
err := client.Invoke("GetLoginProfile", req, &resp) |
| 34 |
if err != nil { |
| 35 |
return ProfileResponse{}, err |
| 36 |
} |
| 37 |
return resp, nil |
| 38 |
} |
| 39 |
|
| 40 |
func (client *RamClient) DeleteLoginProfile(req UserQueryRequest) (RamCommonResponse, error) { |
| 41 |
var resp RamCommonResponse |
| 42 |
err := client.Invoke("DeleteLoginProfile", req, &resp) |
| 43 |
if err != nil { |
| 44 |
return RamCommonResponse{}, err |
| 45 |
} |
| 46 |
return resp, nil |
| 47 |
} |
| 48 |
|
| 49 |
func (client *RamClient) UpdateLoginProfile(req ProfileRequest) (ProfileResponse, error) { |
| 50 |
var resp ProfileResponse |
| 51 |
err := client.Invoke("UpdateLoginProfile", req, &resp) |
| 52 |
if err != nil { |
| 53 |
return ProfileResponse{}, err |
| 54 |
} |
| 55 |
return resp, nil |
| 56 |
} |