Asterisk - The Open Source Telephony Project GIT-master-0bf3178
Public Member Functions | Data Fields
SwaggerType Class Reference
Inheritance diagram for SwaggerType:
Inheritance graph
[legend]
Collaboration diagram for SwaggerType:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self)
 
def load (self, type_name, processor, context)
 
- Public Member Functions inherited from Stringify
def __repr__ (self)
 

Data Fields

 is_binary
 
 is_discriminator
 
 is_list
 
 is_primitive
 
 lc_singular_name
 
 name
 
 singular_name
 

Detailed Description

Model of a data type.

Definition at line 326 of file swagger_model.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Definition at line 330 of file swagger_model.py.

330 def __init__(self):
331 self.name = None
332 self.is_discriminator = None
333 self.is_list = None
334 self.singular_name = None
335 self.lc_singular_name = None
336 self.is_primitive = None
337 self.is_binary = None
338

Member Function Documentation

◆ load()

def load (   self,
  type_name,
  processor,
  context 
)

Definition at line 339 of file swagger_model.py.

339 def load(self, type_name, processor, context):
340 # Some common errors
341 if type_name == 'integer':
342 raise SwaggerError("The type for integer should be 'int'", context)
343
344 self.name = type_name
345 type_param = get_list_parameter_type(self.name)
346 self.is_list = type_param is not None
347 if self.is_list:
348 self.singular_name = type_param
349 self.lc_singular_name = type_param.lower()
350 else:
351 self.singular_name = self.name
352 self.lc_singular_name = self.name.lower()
353 self.is_primitive = self.singular_name in SWAGGER_PRIMITIVES
354 self.is_binary = (self.singular_name == 'binary')
355 processor.process_type(self, context)
356 return self
357
358
def get_list_parameter_type(type_string)

References swagger_model.get_list_parameter_type(), SwaggerType.is_binary, sip_subscription_tree.is_list, SwaggerType.is_list, SwaggerType.is_primitive, SwaggerType.lc_singular_name, tables.name, ooh323_user.name, ooh323_peer.name, columns.name, adsi_event.name, adsi_key_cmd.name, wait_bridge_wrapper.name, multi_autochan.name, pickup_by_name_args.name, minivm_template.name, minivm_zone.name, directory_item.name, call_followme.name, mixmonitor.name, strategy.name, autopause.name, call_queue.name, rule_list.name, signalitem.name, skel_level.name, sla_trunk.name, vm_zone.name, wait_type.name, confbridge_state.name, unistim_line.name, ast_netsock.name, unistim_device.name, confbridge_conference.name, conf_menu.name, user_profile.name, bridge_profile.name, console_pvt.name, name, iax2_user.name, iax2_peer.name, jingle_endpoint.name, grab_desc.name, iax2_ie.name, lock_frame.name, dsn.name, iax_template.name, iax_flag.name, video_codec_desc.name, Vardesc.name, Namelist.name, ast_acl.name, group_entry.name, ast_jb_impl.name, group.name, ael_extension.name, ast_bridge_methods.name, ast_bridge_snapshot.name, ast_bridge.name, ast_bridge_technology.name, ast_bucket_metadata.name, ast_calendar.name, ast_party_id.name, ast_set_party_id.name, ast_var_t.name, ast_codec.name, ast_variable.name, ast_config_engine.name, aco_type.name, ast_dns_query.name, ast_dns_query_recurring.name, ast_dns_resolver.name, ast_applicationmap_item.name, ast_websocket_protocol.name, ast_imager.name, ast_tone_zone_sound.name, ast_msg_tech.name, ast_msg_handler.name, ast_module_info.name, ast_custom_function.name, ast_switch.name, ast_refer_tech.name, ast_aeap_message_handler.name, ast_aeap_message_type.name, odbc_cache_columns.name, ast_sip_contact_status.name, ast_sip_cli_formatter_entry.name, prometheus_metrics_provider.name, prometheus_callback.name, ast_rtp_engine.name, ast_sip_api_tech.name, ast_sorcery_wizard.name, ast_speech_engine.name, stasis_app_recording_options.name, ast_channel_snapshot_caller.name, ast_channel_snapshot_connected.name, ast_channel_snapshot_base.name, ast_tcptls_session_args.name, ast_test_info.name, ast_timing_interface.name, ast_xml_doc_item.name, ast_xmpp_client.name, dscp_codepoint.name, profile_entry.name, ast_bucket_scheme.name, ast_value_translation.name, cdr_object_fn_table.name, cdr_object.name, cel_backend.name, causes_map.name, ast_party_id_ies.name, ast_channel.name, ast_config_map.name, cfg_hook.name, aco_option.name, progalias.name, ie_map.name, featuregroup.name, ast_format.name, ast_http_server.name, load_results_map.name, logformatter.name, category_t.name, media_info.name, msg_data.name, ast_exten.name, ast_context.name, ast_include.name, ast_sw.name, refer_data.name, stasis_topic.name, topic_proxy.name, topic_pool_entry.name, stasis_message_type.name, locale_entry.name, ast_stream.name, ast_taskprocessor.name, thr_arg.name, dundi_ie.name, permission.name, direntry.name, ast_ari_bridges_create_args.name, ast_ari_bridges_create_with_id_args.name, ast_ari_bridges_record_args.name, ast_ari_channels_record_args.name, parking_lot_cfg.name, parking_lot.name, bridge_metric_defs.name, channel_metric_defs.name, endpoint_metric_defs.name, category_and_metric.name, realtime_sqlite3_db.name, geoloc_gml_attr_def.name, odbc_txn_frame.name, extension.name, phone_profile.name, endpoint_identifier_list.name, header.name, sip_options_endpoint_aor_status.name, sip_options_endpoint_state_compositor.name, sip_options_aor.name, ast_sip_sched_task.name, exten_state_publisher.name, notify_option.name, namelist.name, test1.name, namedgroup_member.name, cdr_beitem.name, callerid_state.name, ast_format_def.name, ast_translator.name, ast_category_template_instance.name, ast_category.name, ast_key.name, odbc_class.name, ast_chan.name, manager_channel_variable.name, method_logging_info.name, stasis_app.name, named_acl.name, aoc_ie_currency.name, pbx_builtin.name, ast_unreal_pvt.name, moh_files_state.name, mohclass.name, ast_sorcery_object_field.name, ast_sorcery_object_type.name, prometheus_label.name, prometheus_metric.name, ast_smdi_mwi_message.name, ast_smdi_md_message.name, state.name, notify_option_item.name, ast_smdi_interface.name, sorcery_memory_cache.name, speech_param.name, enum_name_xref_entry.name, ast_xmpp_client_config.name, chanvar.name, stasis_app_stored_recording.name, PathSegment.name, Parameter.name, SwaggerType.name, Property.name, cid_set.name, pair.name, test_item.name, test_val.name, test.name, and SwaggerType.singular_name.

Referenced by ApiDeclaration.load_file(), and ResourceListing.load_file().

Field Documentation

◆ is_binary

is_binary

Definition at line 337 of file swagger_model.py.

Referenced by SwaggerType.load().

◆ is_discriminator

is_discriminator

Definition at line 332 of file swagger_model.py.

◆ is_list

is_list

Definition at line 333 of file swagger_model.py.

Referenced by SwaggerType.load().

◆ is_primitive

is_primitive

Definition at line 336 of file swagger_model.py.

Referenced by SwaggerType.load().

◆ lc_singular_name

lc_singular_name

Definition at line 335 of file swagger_model.py.

Referenced by SwaggerType.load().

◆ name

name

◆ singular_name

singular_name

Definition at line 334 of file swagger_model.py.

Referenced by SwaggerType.load().


The documentation for this class was generated from the following file: