(section, event_name, **kwargs)
| 1144 | |
| 1145 | |
| 1146 | def document_expires_shape(section, event_name, **kwargs): |
| 1147 | # Updates the documentation for S3 operations that include the 'Expires' member |
| 1148 | # in their response structure. Documents a synthetic member 'ExpiresString' and |
| 1149 | # includes a deprecation notice for 'Expires'. |
| 1150 | if 'response-example' in event_name: |
| 1151 | if not section.has_section('structure-value'): |
| 1152 | return |
| 1153 | parent = section.get_section('structure-value') |
| 1154 | if not parent.has_section('Expires'): |
| 1155 | return |
| 1156 | param_line = parent.get_section('Expires') |
| 1157 | param_line.add_new_section('ExpiresString') |
| 1158 | new_param_line = param_line.get_section('ExpiresString') |
| 1159 | new_param_line.write("'ExpiresString': 'string',") |
| 1160 | new_param_line.style.new_line() |
| 1161 | elif 'response-params' in event_name: |
| 1162 | if not section.has_section('Expires'): |
| 1163 | return |
| 1164 | param_section = section.get_section('Expires') |
| 1165 | # Add a deprecation notice for the "Expires" param |
| 1166 | doc_section = param_section.get_section('param-documentation') |
| 1167 | doc_section.style.start_note() |
| 1168 | doc_section.write( |
| 1169 | 'This member has been deprecated. Please use ``ExpiresString`` instead.' |
| 1170 | ) |
| 1171 | doc_section.style.end_note() |
| 1172 | # Document the "ExpiresString" param |
| 1173 | new_param_section = param_section.add_new_section('ExpiresString') |
| 1174 | new_param_section.style.new_paragraph() |
| 1175 | new_param_section.write('- **ExpiresString** *(string) --*') |
| 1176 | new_param_section.style.indent() |
| 1177 | new_param_section.style.new_paragraph() |
| 1178 | new_param_section.write( |
| 1179 | 'The raw, unparsed value of the ``Expires`` field.' |
| 1180 | ) |
| 1181 | |
| 1182 | |
| 1183 | def _handle_200_error(operation_model, response_dict, **kwargs): |
nothing calls this directly
no test coverage detected