PLSUploaderResponseInfo.h
2.63 KB
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
//
// PLSUploaderResponInfo.h
// PLShortVideoKit
//
// Created by 何昊宇 on 2017/6/8.
// Copyright © 2017年 Pili Engineering, Qiniu Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface PLSUploaderResponseInfo : NSObject
/**
* 状态码
*/
@property (readonly) int statusCode;
/**
* 七牛服务器生成的请求ID,用来跟踪请求信息,如果使用过程中出现问题,请反馈此ID
*/
@property (nonatomic, copy, readonly) NSString * _Nullable reqId;
/**
* 七牛服务器内部跟踪记录
*/
@property (nonatomic, copy, readonly) NSString * _Nullable xlog;
/**
* cdn服务器内部跟踪记录
*/
@property (nonatomic, copy, readonly) NSString * _Nullable xvia;
/**
* 错误信息,出错时请反馈此记录
*/
@property (nonatomic, copy, readonly) NSError * _Nullable error;
/**
* 服务器域名
*/
@property (nonatomic, copy, readonly) NSString * _Nullable host;
/**
* 请求消耗的时间,单位 秒
*/
@property (nonatomic, readonly) double duration;
/**
* 服务器IP
*/
@property (nonatomic, readonly) NSString * _Nullable serverIp;
/**
* 客户端id
*/
@property (nonatomic, readonly) NSString * _Nullable id;
/**
* 时间戳
*/
@property (readonly) UInt64 timeStamp;
/**
* 是否取消
*/
@property (nonatomic, readonly, getter=isCancelled) BOOL canceled;
/**
* 成功的请求
*/
@property (nonatomic, readonly, getter=isOK) BOOL ok;
/**
* 是否网络错误
*/
@property (nonatomic, readonly, getter=isConnectionBroken) BOOL broken;
/**
* 是否为 七牛响应
*/
@property (nonatomic, readonly, getter=isNotQiniu) BOOL notQiniu;
/**
@abstract PLSUploaderResponInfo 初始化方法
@since v1.0.4
*/
- (instancetype _Nullable)initWithStatusCode:(int)statusCode
reqId:(NSString *_Nullable)reqId
xlog:(NSString *_Nullable)xlog
xvia:(NSString *_Nullable)xvia
error:(NSError *_Nullable)error
host:(NSString *_Nullable)host
duration:(double)duration
serverIp:(NSString *_Nullable)serverIp
id:(NSString *_Nullable)id
timeStamp:(UInt64)timeStamp
canceled:(BOOL)canceled
ok:(BOOL)ok
broken:(BOOL)broken
notQiniu:(BOOL)notQiniu;
@end