...
1 package customsearch
2
3
4
5
6
7
8
9
10 type ErrorCode string
11
12 const (
13
14 InsufficientAuthorization ErrorCode = "InsufficientAuthorization"
15
16 InvalidAuthorization ErrorCode = "InvalidAuthorization"
17
18 InvalidRequest ErrorCode = "InvalidRequest"
19
20 None ErrorCode = "None"
21
22 RateLimitExceeded ErrorCode = "RateLimitExceeded"
23
24 ServerError ErrorCode = "ServerError"
25 )
26
27
28 func PossibleErrorCodeValues() []ErrorCode {
29 return []ErrorCode{InsufficientAuthorization, InvalidAuthorization, InvalidRequest, None, RateLimitExceeded, ServerError}
30 }
31
32
33 type ErrorSubCode string
34
35 const (
36
37 AuthorizationDisabled ErrorSubCode = "AuthorizationDisabled"
38
39 AuthorizationExpired ErrorSubCode = "AuthorizationExpired"
40
41 AuthorizationMissing ErrorSubCode = "AuthorizationMissing"
42
43 AuthorizationRedundancy ErrorSubCode = "AuthorizationRedundancy"
44
45 Blocked ErrorSubCode = "Blocked"
46
47 HTTPNotAllowed ErrorSubCode = "HttpNotAllowed"
48
49 NotImplemented ErrorSubCode = "NotImplemented"
50
51 ParameterInvalidValue ErrorSubCode = "ParameterInvalidValue"
52
53 ParameterMissing ErrorSubCode = "ParameterMissing"
54
55 ResourceError ErrorSubCode = "ResourceError"
56
57 UnexpectedError ErrorSubCode = "UnexpectedError"
58 )
59
60
61 func PossibleErrorSubCodeValues() []ErrorSubCode {
62 return []ErrorSubCode{AuthorizationDisabled, AuthorizationExpired, AuthorizationMissing, AuthorizationRedundancy, Blocked, HTTPNotAllowed, NotImplemented, ParameterInvalidValue, ParameterMissing, ResourceError, UnexpectedError}
63 }
64
65
66 type SafeSearch string
67
68 const (
69
70 Moderate SafeSearch = "Moderate"
71
72 Off SafeSearch = "Off"
73
74 Strict SafeSearch = "Strict"
75 )
76
77
78 func PossibleSafeSearchValues() []SafeSearch {
79 return []SafeSearch{Moderate, Off, Strict}
80 }
81
82
83 type TextFormat string
84
85 const (
86
87 HTML TextFormat = "Html"
88
89 Raw TextFormat = "Raw"
90 )
91
92
93 func PossibleTextFormatValues() []TextFormat {
94 return []TextFormat{HTML, Raw}
95 }
96
97
98 type Type string
99
100 const (
101
102 TypeAnswer Type = "Answer"
103
104 TypeCreativeWork Type = "CreativeWork"
105
106 TypeErrorResponse Type = "ErrorResponse"
107
108 TypeIdentifiable Type = "Identifiable"
109
110 TypeResponse Type = "Response"
111
112 TypeResponseBase Type = "ResponseBase"
113
114 TypeSearchResponse Type = "SearchResponse"
115
116 TypeSearchResultsAnswer Type = "SearchResultsAnswer"
117
118 TypeThing Type = "Thing"
119
120 TypeWebPage Type = "WebPage"
121
122 TypeWebWebAnswer Type = "Web/WebAnswer"
123 )
124
125
126 func PossibleTypeValues() []Type {
127 return []Type{TypeAnswer, TypeCreativeWork, TypeErrorResponse, TypeIdentifiable, TypeResponse, TypeResponseBase, TypeSearchResponse, TypeSearchResultsAnswer, TypeThing, TypeWebPage, TypeWebWebAnswer}
128 }
129
View as plain text