Ei kuvausta

AWSURLResponseSerialization.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License").
  5. // You may not use this file except in compliance with the License.
  6. // A copy of the License is located at
  7. //
  8. // http://aws.amazon.com/apache2.0
  9. //
  10. // or in the "license" file accompanying this file. This file is distributed
  11. // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. // express or implied. See the License for the specific language governing
  13. // permissions and limitations under the License.
  14. //
  15. #import <Foundation/Foundation.h>
  16. #import "AWSNetworking.h"
  17. #import "AWSSerialization.h"
  18. @interface AWSJSONResponseSerializer : NSObject <AWSHTTPURLResponseSerializer>
  19. @property (nonatomic, strong, readonly) NSDictionary *serviceDefinitionJSON;
  20. @property (nonatomic, strong, readonly) NSString *actionName;
  21. @property (nonatomic, assign, readonly) Class outputClass;
  22. - (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
  23. actionName:(NSString *)actionName
  24. outputClass:(Class)outputClass;
  25. @end
  26. @interface AWSXMLResponseSerializer : NSObject <AWSHTTPURLResponseSerializer>
  27. @property (nonatomic, assign) Class outputClass;
  28. - (instancetype)initWithJSONDefinition:(NSDictionary *)JSONDefinition
  29. actionName:(NSString *)actionName
  30. outputClass:(Class)outputClass;
  31. + (NSMutableDictionary *)parseResponse:(NSHTTPURLResponse *)response
  32. rules:(AWSJSONDictionary *)rules
  33. bodyDictionary:(NSMutableDictionary *)bodyDictionary
  34. error:(NSError *__autoreleasing *)error;
  35. @end