google_cloud_language_v2/model/
debug.rs1#[allow(unused_imports)]
18use super::*;
19
20impl std::fmt::Debug for super::Document {
21 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22 let mut debug_struct = f.debug_struct("Document");
23 debug_struct.field("r#type", &self.r#type);
24 debug_struct.field("language_code", &self.language_code);
25 debug_struct.field("source", &self.source);
26 if !self._unknown_fields.is_empty() {
27 debug_struct.field("_unknown_fields", &self._unknown_fields);
28 }
29 debug_struct.finish()
30 }
31}
32
33impl std::fmt::Debug for super::Sentence {
34 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
35 let mut debug_struct = f.debug_struct("Sentence");
36 debug_struct.field("text", &self.text);
37 debug_struct.field("sentiment", &self.sentiment);
38 if !self._unknown_fields.is_empty() {
39 debug_struct.field("_unknown_fields", &self._unknown_fields);
40 }
41 debug_struct.finish()
42 }
43}
44
45impl std::fmt::Debug for super::Entity {
46 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
47 let mut debug_struct = f.debug_struct("Entity");
48 debug_struct.field("name", &self.name);
49 debug_struct.field("r#type", &self.r#type);
50 debug_struct.field("metadata", &self.metadata);
51 debug_struct.field("mentions", &self.mentions);
52 debug_struct.field("sentiment", &self.sentiment);
53 if !self._unknown_fields.is_empty() {
54 debug_struct.field("_unknown_fields", &self._unknown_fields);
55 }
56 debug_struct.finish()
57 }
58}
59
60impl std::fmt::Debug for super::Sentiment {
61 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
62 let mut debug_struct = f.debug_struct("Sentiment");
63 debug_struct.field("magnitude", &self.magnitude);
64 debug_struct.field("score", &self.score);
65 if !self._unknown_fields.is_empty() {
66 debug_struct.field("_unknown_fields", &self._unknown_fields);
67 }
68 debug_struct.finish()
69 }
70}
71
72impl std::fmt::Debug for super::EntityMention {
73 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
74 let mut debug_struct = f.debug_struct("EntityMention");
75 debug_struct.field("text", &self.text);
76 debug_struct.field("r#type", &self.r#type);
77 debug_struct.field("sentiment", &self.sentiment);
78 debug_struct.field("probability", &self.probability);
79 if !self._unknown_fields.is_empty() {
80 debug_struct.field("_unknown_fields", &self._unknown_fields);
81 }
82 debug_struct.finish()
83 }
84}
85
86impl std::fmt::Debug for super::TextSpan {
87 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
88 let mut debug_struct = f.debug_struct("TextSpan");
89 debug_struct.field("content", &self.content);
90 debug_struct.field("begin_offset", &self.begin_offset);
91 if !self._unknown_fields.is_empty() {
92 debug_struct.field("_unknown_fields", &self._unknown_fields);
93 }
94 debug_struct.finish()
95 }
96}
97
98impl std::fmt::Debug for super::ClassificationCategory {
99 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
100 let mut debug_struct = f.debug_struct("ClassificationCategory");
101 debug_struct.field("name", &self.name);
102 debug_struct.field("confidence", &self.confidence);
103 debug_struct.field("severity", &self.severity);
104 if !self._unknown_fields.is_empty() {
105 debug_struct.field("_unknown_fields", &self._unknown_fields);
106 }
107 debug_struct.finish()
108 }
109}
110
111impl std::fmt::Debug for super::AnalyzeSentimentRequest {
112 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
113 let mut debug_struct = f.debug_struct("AnalyzeSentimentRequest");
114 debug_struct.field("document", &self.document);
115 debug_struct.field("encoding_type", &self.encoding_type);
116 if !self._unknown_fields.is_empty() {
117 debug_struct.field("_unknown_fields", &self._unknown_fields);
118 }
119 debug_struct.finish()
120 }
121}
122
123impl std::fmt::Debug for super::AnalyzeSentimentResponse {
124 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
125 let mut debug_struct = f.debug_struct("AnalyzeSentimentResponse");
126 debug_struct.field("document_sentiment", &self.document_sentiment);
127 debug_struct.field("language_code", &self.language_code);
128 debug_struct.field("sentences", &self.sentences);
129 debug_struct.field("language_supported", &self.language_supported);
130 if !self._unknown_fields.is_empty() {
131 debug_struct.field("_unknown_fields", &self._unknown_fields);
132 }
133 debug_struct.finish()
134 }
135}
136
137impl std::fmt::Debug for super::AnalyzeEntitiesRequest {
138 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
139 let mut debug_struct = f.debug_struct("AnalyzeEntitiesRequest");
140 debug_struct.field("document", &self.document);
141 debug_struct.field("encoding_type", &self.encoding_type);
142 if !self._unknown_fields.is_empty() {
143 debug_struct.field("_unknown_fields", &self._unknown_fields);
144 }
145 debug_struct.finish()
146 }
147}
148
149impl std::fmt::Debug for super::AnalyzeEntitiesResponse {
150 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
151 let mut debug_struct = f.debug_struct("AnalyzeEntitiesResponse");
152 debug_struct.field("entities", &self.entities);
153 debug_struct.field("language_code", &self.language_code);
154 debug_struct.field("language_supported", &self.language_supported);
155 if !self._unknown_fields.is_empty() {
156 debug_struct.field("_unknown_fields", &self._unknown_fields);
157 }
158 debug_struct.finish()
159 }
160}
161
162impl std::fmt::Debug for super::ClassifyTextRequest {
163 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
164 let mut debug_struct = f.debug_struct("ClassifyTextRequest");
165 debug_struct.field("document", &self.document);
166 if !self._unknown_fields.is_empty() {
167 debug_struct.field("_unknown_fields", &self._unknown_fields);
168 }
169 debug_struct.finish()
170 }
171}
172
173impl std::fmt::Debug for super::ClassifyTextResponse {
174 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
175 let mut debug_struct = f.debug_struct("ClassifyTextResponse");
176 debug_struct.field("categories", &self.categories);
177 debug_struct.field("language_code", &self.language_code);
178 debug_struct.field("language_supported", &self.language_supported);
179 if !self._unknown_fields.is_empty() {
180 debug_struct.field("_unknown_fields", &self._unknown_fields);
181 }
182 debug_struct.finish()
183 }
184}
185
186impl std::fmt::Debug for super::ModerateTextRequest {
187 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
188 let mut debug_struct = f.debug_struct("ModerateTextRequest");
189 debug_struct.field("document", &self.document);
190 debug_struct.field("model_version", &self.model_version);
191 if !self._unknown_fields.is_empty() {
192 debug_struct.field("_unknown_fields", &self._unknown_fields);
193 }
194 debug_struct.finish()
195 }
196}
197
198impl std::fmt::Debug for super::ModerateTextResponse {
199 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
200 let mut debug_struct = f.debug_struct("ModerateTextResponse");
201 debug_struct.field("moderation_categories", &self.moderation_categories);
202 debug_struct.field("language_code", &self.language_code);
203 debug_struct.field("language_supported", &self.language_supported);
204 if !self._unknown_fields.is_empty() {
205 debug_struct.field("_unknown_fields", &self._unknown_fields);
206 }
207 debug_struct.finish()
208 }
209}
210
211impl std::fmt::Debug for super::AnnotateTextRequest {
212 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
213 let mut debug_struct = f.debug_struct("AnnotateTextRequest");
214 debug_struct.field("document", &self.document);
215 debug_struct.field("features", &self.features);
216 debug_struct.field("encoding_type", &self.encoding_type);
217 if !self._unknown_fields.is_empty() {
218 debug_struct.field("_unknown_fields", &self._unknown_fields);
219 }
220 debug_struct.finish()
221 }
222}
223
224impl std::fmt::Debug for super::annotate_text_request::Features {
225 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
226 let mut debug_struct = f.debug_struct("Features");
227 debug_struct.field("extract_entities", &self.extract_entities);
228 debug_struct.field(
229 "extract_document_sentiment",
230 &self.extract_document_sentiment,
231 );
232 debug_struct.field("classify_text", &self.classify_text);
233 debug_struct.field("moderate_text", &self.moderate_text);
234 if !self._unknown_fields.is_empty() {
235 debug_struct.field("_unknown_fields", &self._unknown_fields);
236 }
237 debug_struct.finish()
238 }
239}
240
241impl std::fmt::Debug for super::AnnotateTextResponse {
242 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
243 let mut debug_struct = f.debug_struct("AnnotateTextResponse");
244 debug_struct.field("sentences", &self.sentences);
245 debug_struct.field("entities", &self.entities);
246 debug_struct.field("document_sentiment", &self.document_sentiment);
247 debug_struct.field("language_code", &self.language_code);
248 debug_struct.field("categories", &self.categories);
249 debug_struct.field("moderation_categories", &self.moderation_categories);
250 debug_struct.field("language_supported", &self.language_supported);
251 if !self._unknown_fields.is_empty() {
252 debug_struct.field("_unknown_fields", &self._unknown_fields);
253 }
254 debug_struct.finish()
255 }
256}