Asterisk - The Open Source Telephony Project GIT-master-f36a736
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 468 of file swagger_model.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name 
)

Definition at line 476 of file swagger_model.py.

476 def __init__(self, name):
477 self.name = name
478 self.type = None
479 self.description = None
480 self.required = None
481

Member Function Documentation

◆ load()

def load (   self,
  property_json,
  processor,
  context 
)

Definition at line 482 of file swagger_model.py.

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

References stasis_subscription_change.description, dahdi_pvt.description, iax2_peer.description, ast_calendar_tech.description, ast_calendar_event.description, ast_channel_tech.description, ast_codec.description, ast_http_uri.description, ast_tone_zone.description, manager_action.description, ast_module_info.description, ast_switch.description, ast_fax_tech.description, ast_test_info.description, ast_xml_doc_item.description, ast_xmpp_resource.description, ast_value_translation.description, media_variant.description, ast_app.description, Parameter.description, Api.description, Property.description, Model.description, ResourceApi.description, Property.load(), columns.name, tables.name, adsi_event.name, adsi_key_cmd.name, wait_bridge_wrapper.name, ooh323_user.name, ooh323_peer.name, multi_autochan.name, pickup_by_name_args.name, minivm_template.name, minivm_zone.name, call_queue.name, rule_list.name, signalitem.name, directory_item.name, call_followme.name, mixmonitor.name, strategy.name, autopause.name, skel_level.name, sla_trunk.name, vm_zone.name, wait_type.name, confbridge_state.name, console_pvt.name, name, iax2_user.name, iax2_peer.name, jingle_endpoint.name, grab_desc.name, lock_frame.name, dsn.name, ast_var_t.name, unistim_line.name, ast_netsock.name, iax_template.name, unistim_device.name, confbridge_conference.name, conf_menu.name, user_profile.name, bridge_profile.name, iax2_ie.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_codec.name, ast_variable.name, ast_config_engine.name, aco_type.name, ast_aeap_message_type.name, ast_dns_query.name, ast_dns_query_recurring.name, ast_unreal_pvt.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_custom_function.name, ast_switch.name, ast_refer_tech.name, odbc_cache_columns.name, ast_sip_contact_status.name, ast_format_def.name, ast_module_info.name, ast_aeap_message_handler.name, ast_sip_cli_formatter_entry.name, prometheus_metrics_provider.name, prometheus_label.name, prometheus_metric.name, prometheus_callback.name, ast_rtp_engine.name, ast_sip_api_tech.name, ast_channel_snapshot_connected.name, ast_smdi_mwi_message.name, ast_smdi_md_message.name, ast_sorcery_wizard.name, ast_speech_engine.name, stasis_app_recording_options.name, ast_channel_snapshot_caller.name, ast_channel_snapshot_base.name, ast_tcptls_session_args.name, ast_test_info.name, ast_timing_interface.name, ast_translator.name, ast_xml_doc_item.name, ast_xmpp_client.name, dscp_codepoint.name, ast_bucket_scheme.name, callerid_state.name, aoc_ie_currency.name, profile_entry.name, ast_value_translation.name, cdr_object_fn_table.name, cdr_object.name, cel_backend.name, causes_map.name, namedgroup_member.name, cdr_beitem.name, ast_party_id_ies.name, ast_category_template_instance.name, manager_channel_variable.name, ast_channel.name, ast_config_map.name, ast_category.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, named_acl.name, pbx_builtin.name, ast_sorcery_object_field.name, ast_sorcery_object_type.name, state.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, ast_key.name, geoloc_gml_attr_def.name, odbc_txn_frame.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, odbc_class.name, ast_chan.name, method_logging_info.name, stasis_app.name, moh_files_state.name, mohclass.name, extension.name, phone_profile.name, endpoint_identifier_list.name, header.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, ast_module.required, load_order_entry.required, Parameter.required, Property.required, Parameter.required_fields, ErrorResponse.required_fields, Operation.required_fields, Api.required_fields, Property.required_fields, Model.required_fields, ApiDeclaration.required_fields, ResourceApi.required_fields, ResourceListing.required_fields, mbl_pvt.type, columns.type, sla_event.type, iax2_thread.type, ast_iax2_full_hdr.type, pjsip_func_args.type, parse_uri_args.type, sig_ss7_linkset.type, Vardesc.type, type, ast_jb_impl.type, ael_priority.type, ast_aoc_unit_entry.type, ast_audiohook.type, ast_bridge_hook.type, ast_calendar_tech.type, ast_cc_monitor_callbacks.type, ast_cc_agent_callbacks.type, ast_party_subaddress.type, ast_channel_tech.type, ast_codec.type, aco_type.type, ast_datastore_info.type, ast_msg_data_attribute.type, pval.type, ast_aeap_message.type, ast_fax_tech.type, odbc_cache_columns.type, ast_sip_transport_state.type, ast_sip_transport.type, ast_sip_request_transport_details.type, ast_sip_security_mechanism.type, ast_sip_auth.type, ast_sip_body.type, ast_sip_pubsub_body_generator.type, ast_sip_pubsub_body_supplement.type, ast_sip_session_media.type, prometheus_metric.type, ast_rtp_rtcp_report.type, ast_rtp_engine_ice_candidate.type, ast_rtp_glue.type, ast_smdi_md_message.type, stasis_cache_update.type, ast_channel_snapshot_base.type, ast_xml_doc_item.type, jb_frame.type, aoc_ie_unit.type, val.type, expr_node.type, callerid_state.type, cc_callback_helper.type, ast_party_subaddress_ies.type, aco_option.type, local_pvt.type, ast_event.type, logchannel.type, logmsg.type, categories_level_t.type, ast_rtp_mime_type.type, ast_sorcery_object.type, ast_sorcery_object_type.type, sorcery_load_details.type, cache_entry_key.type, cache_dump_data.type, stasis_message.type, ast_stream.type, strsyntaxtype.type, ast_ari_bridges_create_args.type, ast_ari_bridges_create_with_id_args.type, pcap_ethernet_header.type, ast_rtcp.type, multicast_rtp.type, ast_multicast_rtp_options.type, stale_cache_update_task_data.type, xmpp_pak_handler.type, Property.type, __db.type, and swagger_model.validate_required_fields().

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

Field Documentation

◆ description

description

◆ name

name

◆ required

required

Definition at line 480 of file swagger_model.py.

Referenced by Parameter.load(), and Property.load().

◆ required_fields

list required_fields = ['type']
static

◆ type

type

Definition at line 478 of file swagger_model.py.

Referenced by Property.load().


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