123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- //
- // Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- //
- // Licensed under the Apache License, Version 2.0 (the "License").
- // You may not use this file except in compliance with the License.
- // A copy of the License is located at
- //
- // http://aws.amazon.com/apache2.0
- //
- // or in the "license" file accompanying this file. This file is distributed
- // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- // express or implied. See the License for the specific language governing
- // permissions and limitations under the License.
- //
-
- #import "AWSSTSModel.h"
- #import "AWSCategory.h"
-
- NSString *const AWSSTSErrorDomain = @"com.amazonaws.AWSSTSErrorDomain";
-
- @implementation AWSSTSAssumeRoleRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"durationSeconds" : @"DurationSeconds",
- @"externalId" : @"ExternalId",
- @"policy" : @"Policy",
- @"roleArn" : @"RoleArn",
- @"roleSessionName" : @"RoleSessionName",
- @"serialNumber" : @"SerialNumber",
- @"tokenCode" : @"TokenCode",
- };
- }
-
- @end
-
- @implementation AWSSTSAssumeRoleResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"assumedRoleUser" : @"AssumedRoleUser",
- @"credentials" : @"Credentials",
- @"packedPolicySize" : @"PackedPolicySize",
- };
- }
-
- + (NSValueTransformer *)assumedRoleUserJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSAssumedRoleUser class]];
- }
-
- + (NSValueTransformer *)credentialsJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSCredentials class]];
- }
-
- @end
-
- @implementation AWSSTSAssumeRoleWithSAMLRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"durationSeconds" : @"DurationSeconds",
- @"policy" : @"Policy",
- @"principalArn" : @"PrincipalArn",
- @"roleArn" : @"RoleArn",
- @"SAMLAssertion" : @"SAMLAssertion",
- };
- }
-
- @end
-
- @implementation AWSSTSAssumeRoleWithSAMLResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"assumedRoleUser" : @"AssumedRoleUser",
- @"audience" : @"Audience",
- @"credentials" : @"Credentials",
- @"issuer" : @"Issuer",
- @"nameQualifier" : @"NameQualifier",
- @"packedPolicySize" : @"PackedPolicySize",
- @"subject" : @"Subject",
- @"subjectType" : @"SubjectType",
- };
- }
-
- + (NSValueTransformer *)assumedRoleUserJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSAssumedRoleUser class]];
- }
-
- + (NSValueTransformer *)credentialsJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSCredentials class]];
- }
-
- @end
-
- @implementation AWSSTSAssumeRoleWithWebIdentityRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"durationSeconds" : @"DurationSeconds",
- @"policy" : @"Policy",
- @"providerId" : @"ProviderId",
- @"roleArn" : @"RoleArn",
- @"roleSessionName" : @"RoleSessionName",
- @"webIdentityToken" : @"WebIdentityToken",
- };
- }
-
- @end
-
- @implementation AWSSTSAssumeRoleWithWebIdentityResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"assumedRoleUser" : @"AssumedRoleUser",
- @"audience" : @"Audience",
- @"credentials" : @"Credentials",
- @"packedPolicySize" : @"PackedPolicySize",
- @"provider" : @"Provider",
- @"subjectFromWebIdentityToken" : @"SubjectFromWebIdentityToken",
- };
- }
-
- + (NSValueTransformer *)assumedRoleUserJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSAssumedRoleUser class]];
- }
-
- + (NSValueTransformer *)credentialsJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSCredentials class]];
- }
-
- @end
-
- @implementation AWSSTSAssumedRoleUser
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"arn" : @"Arn",
- @"assumedRoleId" : @"AssumedRoleId",
- };
- }
-
- @end
-
- @implementation AWSSTSCredentials
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"accessKeyId" : @"AccessKeyId",
- @"expiration" : @"Expiration",
- @"secretAccessKey" : @"SecretAccessKey",
- @"sessionToken" : @"SessionToken",
- };
- }
-
- + (NSValueTransformer *)expirationJSONTransformer {
- return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSString *str) {
- return [NSDate aws_dateFromString:str];
- } reverseBlock:^id(NSDate *date) {
- return [date aws_stringValue:AWSDateISO8601DateFormat1];
- }];
- }
-
- @end
-
- @implementation AWSSTSDecodeAuthorizationMessageRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"encodedMessage" : @"EncodedMessage",
- };
- }
-
- @end
-
- @implementation AWSSTSDecodeAuthorizationMessageResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"decodedMessage" : @"DecodedMessage",
- };
- }
-
- @end
-
- @implementation AWSSTSFederatedUser
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"arn" : @"Arn",
- @"federatedUserId" : @"FederatedUserId",
- };
- }
-
- @end
-
- @implementation AWSSTSGetCallerIdentityRequest
-
- @end
-
- @implementation AWSSTSGetCallerIdentityResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"account" : @"Account",
- @"arn" : @"Arn",
- @"userId" : @"UserId",
- };
- }
-
- @end
-
- @implementation AWSSTSGetFederationTokenRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"durationSeconds" : @"DurationSeconds",
- @"name" : @"Name",
- @"policy" : @"Policy",
- };
- }
-
- @end
-
- @implementation AWSSTSGetFederationTokenResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"credentials" : @"Credentials",
- @"federatedUser" : @"FederatedUser",
- @"packedPolicySize" : @"PackedPolicySize",
- };
- }
-
- + (NSValueTransformer *)credentialsJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSCredentials class]];
- }
-
- + (NSValueTransformer *)federatedUserJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSFederatedUser class]];
- }
-
- @end
-
- @implementation AWSSTSGetSessionTokenRequest
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"durationSeconds" : @"DurationSeconds",
- @"serialNumber" : @"SerialNumber",
- @"tokenCode" : @"TokenCode",
- };
- }
-
- @end
-
- @implementation AWSSTSGetSessionTokenResponse
-
- + (NSDictionary *)JSONKeyPathsByPropertyKey {
- return @{
- @"credentials" : @"Credentials",
- };
- }
-
- + (NSValueTransformer *)credentialsJSONTransformer {
- return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSSTSCredentials class]];
- }
-
- @end
|