Asterisk - The Open Source Telephony Project  18.5.0
Public Member Functions | Data Fields | Static Public Attributes
Property Class Reference
Inheritance diagram for Property:
Inheritance graph
[legend]
Collaboration diagram for Property:
Collaboration graph
[legend]

Public Member Functions

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

Data Fields

 description
 
 name
 
 required
 
 type
 

Static Public Attributes

list required_fields = ['type']
 

Detailed Description

Model of a Swagger property.

See https://github.com/wordnik/swagger-core/wiki/datatypes

Definition at line 463 of file swagger_model.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name 
)

Definition at line 471 of file swagger_model.py.

471  def __init__(self, name):
472  self.name = name
473  self.type = None
474  self.description = None
475  self.required = None
476 

Member Function Documentation

◆ load()

def load (   self,
  property_json,
  processor,
  context 
)

Definition at line 477 of file swagger_model.py.

References ast_codec.description, media_variant.description, ast_app.description, ast_xml_doc_item.description, ast_calendar_tech.description, ast_tone_zone.description, ast_xmpp_resource.description, ast_calendar_event.description, ast_http_uri.description, manager_action.description, ast_switch.description, ast_fax_tech.description, ast_test_info.description, Parameter.description, ast_module_info.description, Api.description, dahdi_pvt.description, Property.description, iax2_peer.description, ast_channel_tech.description, stasis_subscription_change.description, ast_value_translation.description, sip_peer.description, ast_imager.name, category_t.name, ast_var_t.name, ast_sip_api_tech.name, ast_dns_resolver.name, contact.name, ast_tone_zone_sound.name, ast_include.name, ast_sw.name, stasis_message_type.name, stasis_app_stored_recording.name, ast_format_def.name, ast_format.name, ast_codec.name, ast_bucket_metadata.name, confbridge_state.name, header.name, ast_smdi_mwi_message.name, ast_netsock.name, callerid_state.name, iax_template.name, ast_sip_cli_formatter_entry.name, bridge_metric_defs.name, ast_ari_bridges_create_args.name, odbc_cache_columns.name, video_codec_desc.name, ast_msg_tech.name, aco_option.name, ast_bridge_technology.name, ast_smdi_md_message.name, odbc_class.name, ast_sip_sched_task.name, ast_timing_interface.name, ast_acl.name, endpoint_metric_defs.name, stasis_app.name, ast_xml_doc_item.name, ast_speech_engine.name, ast_key.name, channel_metric_defs.name, iax_flag.name, PathSegment.name, group_entry.name, grab_desc.name, adsi_event.name, group.name, ast_variable.name, category_and_metric.name, ast_channel_snapshot_caller.name, parking_lot_cfg.name, ast_ari_bridges_create_with_id_args.name, misdn_cfg_spec.name, realtime_sqlite3_db.name, ast_taskprocessor.name, ast_channel_snapshot_connected.name, ast_unreal_pvt.name, column.name, parking_lot.name, prometheus_metrics_provider.name, columns.name, media_info.name, ast_bucket_scheme.name, ast_msg_handler.name, ael_extension.name, progalias.name, direntry.name, named_acl.name, exten_state_publisher.name, ast_channel_snapshot_base.name, ast_channel.name, tables.name, ast_websocket_protocol.name, ast_custom_function.name, logformatter.name, ast_stream.name, ast_jb_impl.name, ast_xmpp_client.name, wait_bridge_wrapper.name, aco_type.name, notify_option_item.name, ast_calendar.name, odbc_txn_frame.name, sorcery_memory_cache.name, ie_map.name, ast_config_engine.name, lock_frame.name, causes_map.name, pickup_by_name_args.name, notify_option.name, cops_cmts.name, wait_type.name, sip_options_endpoint_aor_status.name, ast_translator.name, moh_files_state.name, ast_tcptls_session_args.name, console_pvt.name, conf_menu.name, ast_sorcery_object_type.name, user_profile.name, ast_dns_query.name, dsn.name, sip_options_endpoint_state_compositor.name, prometheus_label.name, state.name, ast_switch.name, call_followme.name, mohclass.name, ast_smdi_interface.name, directory_item.name, ast_dns_query_recurring.name, skel_level.name, stasis_app_recording_options.name, Vardesc.name, Namelist.name, ast_config_map.name, ast_sorcery_object_field.name, permission.name, prometheus_metric.name, ast_category_template_instance.name, ast_test_info.name, msg_data.name, bridge_profile.name, ast_category.name, ast_exten.name, confbridge_conference.name, locale_entry.name, ast_applicationmap_item.name, aoc_ie_currency.name, chan_oss_pvt.name, ooh323_user.name, ast_bridge_methods.name, iax2_ie.name, Parameter.name, ast_sorcery_wizard.name, jingle_endpoint.name, ooh323_peer.name, register_message.name, extension.name, misdn_party_id.name, ast_context.name, phone_profile.name, cdr_beitem.name, cel_backend.name, ast_party_id.name, SwaggerType.name, mgcp_endpoint.name, ast_bridge_snapshot.name, load_results_map.name, dundi_ie.name, ast_module_info.name, ast_sip_contact_status.name, ast_ari_bridges_record_args.name, ast_set_party_id.name, mixmonitor.name, unistim_line.name, topic_proxy.name, mgcp_gateway.name, unistim_device.name, ast_bridge.name, prometheus_callback.name, cdr_object_fn_table.name, ast_xmpp_client_config.name, Property.name, featuregroup.name, sqlite_cache_columns.name, sqlite_cache_tables.name, iax2_user.name, osp_provider.name, iax2_peer.name, ast_rtp_engine.name, ast_ari_channels_record_args.name, minivm_template.name, minivm_zone.name, chanvar.name, sip_proxy.name, cdr_object.name, profile_entry.name, vm_zone.name, adsi_key_cmd.name, dscp_codepoint.name, sla_trunk.name, sip_msg_hdr.name, event_state_compositor.name, ast_value_translation.name, sip_peer.name, thr_arg.name, strategy.name, autopause.name, skinny_subline.name, pbx_builtin.name, epa_static_data.name, call_queue.name, topic_pool_entry.name, rule_list.name, allowed_bearers.name, fake_context.name, stream_parameters.name, endpoint_identifier_list.name, cfg_hook.name, name, namedgroup_member.name, manager_channel_variable.name, ast_party_id_ies.name, Parameter.required, ast_module.required, Property.required, load_order_entry.required, Parameter.required_fields, ErrorResponse.required_fields, Operation.required_fields, Api.required_fields, Property.required_fields, ast_datastore_info.type, categories_level_t.type, ast_stream.type, ast_codec.type, pval.type, callerid_state.type, ast_ari_bridges_create_args.type, odbc_cache_columns.type, pcap_ethernet_header.type, ast_event.type, aco_option.type, ast_calendar_tech.type, ast_smdi_md_message.type, ast_xml_doc_item.type, multicast_rtp.type, ast_ari_bridges_create_with_id_args.type, ael_priority.type, misdn_cfg_spec.type, ast_sip_transport_state.type, jb_frame.type, columns.type, column.type, ast_sip_session_media.type, ast_audiohook.type, ast_channel_snapshot_base.type, sip_route.type, mbl_pvt.type, ast_jb_impl.type, stasis_message.type, ast_msg_data_attribute.type, ast_multicast_rtp_options.type, ast_sorcery_object.type, logchannel.type, logmsg.type, prometheus_metric.type, cache_entry_key.type, ast_sorcery_object_type.type, ast_aoc_unit_entry.type, Vardesc.type, ast_sip_transport.type, ast_bridge_hook.type, local_pvt.type, ast_iax2_full_hdr.type, ast_fax_tech.type, sorcery_load_details.type, ast_rtp_mime_type.type, aoc_ie_unit.type, type, register_message.type, ast_party_subaddress.type, expr_node.type, ast_rtp_rtcp_report.type, sig_ss7_linkset.type, mgcp_endpoint.type, cc_callback_helper.type, ast_sip_auth.type, Property.type, ast_rtp_engine_ice_candidate.type, sqlite_cache_columns.type, xmpp_pak_handler.type, call_info_message.type, request_transport_details.type, ast_rtcp.type, ast_cc_monitor_callbacks.type, ast_sip_pubsub_body_generator.type, ast_channel_tech.type, ast_sip_pubsub_body_supplement.type, aco_type.type, cache_dump_data.type, cfsubscription_types.type, ast_rtp_glue.type, sip_socket.type, thr_lock_info.type, pjsip_func_args.type, stale_cache_update_task_data.type, ast_cc_agent_callbacks.type, stasis_cache_update.type, offered_media.type, sla_event.type, iax2_thread.type, parse_uri_args.type, strsyntaxtype.type, sip_peer.type, sip_threadinfo.type, skinny_container.type, skinny_addon.type, ast_sip_body.type, stream_parameters.type, val.type, ast_party_subaddress_ies.type, and swagger_model.validate_required_fields().

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

477  def load(self, property_json, processor, context):
478  validate_required_fields(property_json, self.required_fields, context)
479  # Bit of a hack, but properties do not self-identify
480  context = context.next_stack({'name': self.name}, 'name')
481  self.description = property_json.get('description') or ''
482  self.required = property_json.get('required') or False
483 
484  type = property_json.get('type')
485  self.type = type and SwaggerType().load(type, processor, context)
486 
487  processor.process_property(self, context)
488  return self
489 
490 
def validate_required_fields(json, required_fields, context)

Field Documentation

◆ description

description

Definition at line 474 of file swagger_model.py.

Referenced by Property.load(), Model.load(), and ResourceApi.load().

◆ name

name

Definition at line 472 of file swagger_model.py.

Referenced by Property.load().

◆ required

required

Definition at line 475 of file swagger_model.py.

Referenced by Property.load().

◆ required_fields

list required_fields = ['type']
static

◆ type

type

Definition at line 473 of file swagger_model.py.

Referenced by Property.load().


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