@@ -15,73 +15,73 @@ import struct Foundation.TimeInterval
15
15
extension Context {
16
16
17
17
public var httpResponse : HTTPResponse ? {
18
- get { attributes . get ( key: httpResponseKey) }
19
- set { attributes . set ( key: httpResponseKey, value: newValue) }
18
+ get { get ( key: httpResponseKey) }
19
+ set { set ( key: httpResponseKey, value: newValue) }
20
20
}
21
21
22
22
public var expiration : TimeInterval {
23
- get { attributes . get ( key: expirationKey) ?? 0 }
24
- set { attributes . set ( key: expirationKey, value: newValue) }
23
+ get { get ( key: expirationKey) ?? 0 }
24
+ set { set ( key: expirationKey, value: newValue) }
25
25
}
26
26
27
27
public var host : String ? {
28
- get { attributes . get ( key: hostKey) }
29
- set { attributes . set ( key: hostKey, value: newValue) }
28
+ get { get ( key: hostKey) }
29
+ set { set ( key: hostKey, value: newValue) }
30
30
}
31
31
32
32
public var hostPrefix : String ? {
33
- get { attributes . get ( key: hostPrefixKey) }
34
- set { attributes . set ( key: hostPrefixKey, value: newValue) }
33
+ get { get ( key: hostPrefixKey) }
34
+ set { set ( key: hostPrefixKey, value: newValue) }
35
35
}
36
36
37
37
public var method : HTTPMethodType {
38
- get { attributes . get ( key: methodKey) ?? . get }
39
- set { attributes . set ( key: methodKey, value: newValue) }
38
+ get { get ( key: methodKey) ?? . get }
39
+ set { set ( key: methodKey, value: newValue) }
40
40
}
41
41
42
42
public func getOperation( ) -> String ? {
43
- return attributes . get ( key: SmithyHTTPAPIKeys . operation)
43
+ get ( key: SmithyHTTPAPIKeys . operation)
44
44
}
45
45
46
46
/// The partition ID to be used for this context.
47
47
///
48
48
/// Requests made with the same partition ID will be grouped together for retry throttling purposes.
49
49
/// If no partition ID is provided, requests will be partitioned based on the hostname.
50
50
public var partitionID : String ? {
51
- get { attributes . get ( key: partitionIDKey) }
52
- set { attributes . set ( key: partitionIDKey, value: newValue) }
51
+ get { get ( key: partitionIDKey) }
52
+ set { set ( key: partitionIDKey, value: newValue) }
53
53
}
54
54
55
55
public var path : String {
56
- get { attributes . get ( key: pathKey) ! }
57
- set { attributes . set ( key: pathKey, value: newValue) }
56
+ get { get ( key: pathKey) ! }
57
+ set { set ( key: pathKey, value: newValue) }
58
58
}
59
59
60
60
public func getRegion( ) -> String ? {
61
- return attributes . get ( key: SmithyHTTPAPIKeys . region)
61
+ return get ( key: SmithyHTTPAPIKeys . region)
62
62
}
63
63
64
64
public func getServiceName( ) -> String {
65
- return attributes . get ( key: SmithyHTTPAPIKeys . serviceName) !
65
+ return get ( key: SmithyHTTPAPIKeys . serviceName) !
66
66
}
67
67
68
68
public var signingName : String ? {
69
- get { attributes . get ( key: signingNameKey) }
70
- set { attributes . set ( key: signingNameKey, value: newValue) }
69
+ get { get ( key: signingNameKey) }
70
+ set { set ( key: signingNameKey, value: newValue) }
71
71
}
72
72
73
73
public var signingRegion : String ? {
74
- get { attributes . get ( key: signingRegionKey) }
75
- set { attributes . set ( key: signingRegionKey, value: newValue) }
74
+ get { get ( key: signingRegionKey) }
75
+ set { set ( key: signingRegionKey, value: newValue) }
76
76
}
77
77
78
78
public func hasUnsignedPayloadTrait( ) -> Bool {
79
- return attributes . get ( key: SmithyHTTPAPIKeys . hasUnsignedPayloadTrait) ?? false
79
+ return get ( key: SmithyHTTPAPIKeys . hasUnsignedPayloadTrait) ?? false
80
80
}
81
81
82
82
public var isBidirectionalStreamingEnabled : Bool {
83
- get { attributes . get ( key: isBidirectionalStreamingEnabledKey) ?? false }
84
- set { attributes . set ( key: isBidirectionalStreamingEnabledKey, value: newValue) }
83
+ get { get ( key: isBidirectionalStreamingEnabledKey) ?? false }
84
+ set { set ( key: isBidirectionalStreamingEnabledKey, value: newValue) }
85
85
}
86
86
87
87
/// Returns `true` if the request should use `http2` and only `http2` without falling back to `http1`
0 commit comments