azure.communication.administration package¶
-
class
azure.communication.administration.
CommunicationIdentityClient
(endpoint: str, credential: str, **kwargs: Any)[source]¶ Azure Communication Services Identity client.
- Parameters
endpoint (str) – The endpoint url for Azure Communication Service resource.
credential – The credentials with which to authenticate. The value is an account shared access key
Example:
: utf-8 ------------------------------------------------------------------- ght (c) Microsoft Corporation. All rights reserved. ed under the MIT License. See License.txt in the project root for e information. -------------------------------------------------------------------- entity_sample.py ION: e samples demonstrate identity client samples. uthenticating a client via a connection string on identity_samples.py s mmunicationIdentityClientSamples(object): __init__(self): self.connection_string = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING') issue_token(self): from azure.communication.administration import CommunicationIdentityClient identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) user = identity_client.create_user() tokenresponse = identity_client.issue_token(user, scopes=["chat"]) print(tokenresponse) revoke_tokens(self): from azure.communication.administration import CommunicationIdentityClient identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) user = identity_client.create_user() tokenresponse = identity_client.issue_token(user, scopes=["chat"]) identity_client.revoke_tokens(user) print(tokenresponse) create_user(self): from azure.communication.administration import CommunicationIdentityClient identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) user = identity_client.create_user() print(user.identifier) delete_user(self): from azure.communication.administration import CommunicationIdentityClient identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) user = identity_client.create_user() identity_client.delete_user(user) e__ == '__main__': le = CommunicationIdentityClientSamples() le.create_user() le.delete_user() le.issue_token() le.revoke_tokens()
-
create_user
(**kwargs) → azure.communication.administration._shared.models.CommunicationUser[source]¶ create a single Communication user
return: CommunicationUser rtype: ~azure.communication.administration.CommunicationUser
-
delete_user
(communication_user: CommunicationUser, **kwargs: Any) → None[source]¶ Triggers revocation event for user and deletes all its data.
- Parameters
communication_user (CommunicationUser) – Azure Communication User to delete
- Returns
None
- Return type
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → CommunicationIdentityClient[source]¶ Create CommunicationIdentityClient from a Connection String.
- Parameters
conn_str (str) – A connection string to an Azure Communication Service resource.
- Returns
Instance of CommunicationIdentityClient.
- Return type
CommunicationIdentityClient
Example:
-
issue_token
(user: CommunicationUser, scopes: List[str], **kwargs: Any) → CommunicationIdentityToken[source]¶ Generates a new token for an identity.
- Parameters
user (CommunicationUser) – Azure Communication User
scopes (list[str]) – List of scopes to be added to the token.
- Returns
CommunicationIdentityToken
- Return type
-
revoke_tokens
(user: CommunicationUser, issued_before: Optional[datetime.datetime] = None, **kwargs: Any) → None[source]¶ Schedule revocation of all tokens of an identity.
- Parameters
user () – Azure Communication User.
issued_before () – All tokens that are issued prior to this time should get revoked.
- Returns
None
- Return type
-
class
azure.communication.administration.
PhoneNumberAdministrationClient
(endpoint: str, credential: str, **kwargs: Any)[source]¶ Azure Communication Services Phone Number Management client.
- Parameters
endpoint (str) – The endpoint url for Azure Communication Service resource.
credential – The credentials with which to authenticate. The value is an account shared access key
-
cancel_search
(search_id: str, **kwargs: Any) → None[source]¶ Cancels the search. This means existing numbers in the search will be made available.
-
configure_number
(pstn_configuration: PstnConfiguration, phone_number: str, **kwargs: Any) → None[source]¶ Endpoint for configuring a pstn number.
- Parameters
pstn_configuration (PstnConfiguration) – Definition for pstn number configuration.
phone_number (str) – The phone number to configure.
- Return type
-
create_search
(**kwargs: Any) → CreateSearchResponse[source]¶ Creates a phone number search.
- Keyword Arguments
body (azure.communication.administration.CreateSearchOptions) –
An optional parameter for defining the search options. The default is None. :rtype: ~azure.communication.administration.CreateSearchResponse
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → PhoneNumberAdministrationClient[source]¶ Create PhoneNumberAdministrationClient from a Connection String. :param str conn_str:
A connection string to an Azure Communication Service resource.
- Returns
Instance of PhoneNumberAdministrationClient.
- Return type
PhoneNumberAdministrationClient
-
get_all_area_codes
(location_type: str, country_code: str, phone_plan_id: str, **kwargs: Any) → AreaCodes[source]¶ Gets a list of the supported area codes.
- Parameters
- Keyword Arguments
location_options (List["LocationOptionsQuery"]) –
Represents the underlying list of countries. :rtype: ~azure.communication.administration.AreaCodes
-
get_capabilities_update
(capabilities_update_id: str, **kwargs: Any) → UpdatePhoneNumberCapabilitiesResponse[source]¶ Get capabilities by capabilities update id.
- Parameters
capabilities_update_id (str) –
- Return type
-
get_number_configuration
(phone_number: str, **kwargs: Any) → NumberConfigurationResponse[source]¶ Endpoint for getting number configurations.
- Parameters
phone_number (str) – The phone number in the E.164 format.
- Return type
-
get_phone_plan_location_options
(country_code: str, phone_plan_group_id: str, phone_plan_id: str, **kwargs: Any) → LocationOptionsResponse[source]¶ Gets a list of location options for a phone plan.
- Parameters
- Keyword Arguments
locale (str) – A language-locale pairing which will be used to localise the names of countries.
The default is “en-US”. :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.communication.administration.LocationOptionsResponse
-
get_release_by_id
(release_id: str, **kwargs: Any) → PhoneNumberRelease[source]¶ Gets a release by a release id.
- Parameters
release_id (str) – Represents the release id.
- Return type
-
get_search_by_id
(search_id: str, **kwargs: Any) → PhoneNumberSearch[source]¶ Get search by search id.
- Parameters
search_id (str) – The search id to be searched for.
- Return type
-
list_all_phone_numbers
(**kwargs: Any) → ItemPaged[AcquiredPhoneNumbers][source]¶ Gets the list of the acquired phone numbers.
- Keyword Arguments
locale (str) – A language-locale pairing which will be used to localise the names of countries.
The default is “en-US”. :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.AcquiredPhoneNumbers]
-
list_all_releases
(**kwargs: Any) → ItemPaged[PhoneNumberEntities][source]¶ Gets a list of all releases.
- Keyword Arguments
skip (int) – An optional parameter for how many entries to skip, for pagination purposes.
The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities]
-
list_all_searches
(**kwargs: Any) → ItemPaged[PhoneNumberEntities][source]¶ Gets a list of all searches.
- Keyword Arguments
skip (int) – An optional parameter for how many entries to skip, for pagination purposes.
The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberEntities]
-
list_all_supported_countries
(**kwargs: Any) → ItemPaged[PhoneNumberCountries][source]¶ Gets a list of supported countries.
- Keyword Arguments
locale (str) – A language-locale pairing which will be used to localise the names of countries.
The default is “en-US”. :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhoneNumberCountries]
-
list_phone_plan_groups
(country_code: str, **kwargs: Any) → ItemPaged[PhonePlanGroups][source]¶ Gets a list of phone plan groups for the given country.
- Parameters
country_code (str) – The ISO 3166-2 country code.
- Keyword Arguments
locale (str) – A language-locale pairing which will be used to localise the names of countries.
The default is “en-US”. :keyword include_rate_information bool: An optional boolean parameter for including rate information in result. The default is False”. :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlanGroups]
-
list_phone_plans
(country_code: str, phone_plan_group_id: str, **kwargs: Any) → ItemPaged[PhonePlansResponse][source]¶ Gets a list of phone plans for a phone plan group.
- Parameters
- Keyword Arguments
locale (str) – A language-locale pairing which will be used to localise the names of countries.
The default is “en-US”. :keyword int skip: An optional parameter for how many entries to skip, for pagination purposes. The default is 0. :keyword int take: An optional parameter for how many entries to return, for pagination purposes. The default is 100. :rtype: ~azure.core.paging.ItemPaged[~azure.communication.administration.PhonePlansResponse]
-
release_phone_numbers
(phone_numbers: List[str], **kwargs: Any) → ReleaseResponse[source]¶ Creates a release for the given phone numbers.
-
unconfigure_number
(phone_number: str, **kwargs: Any) → None[source]¶ Endpoint for unconfiguring a pstn number by removing the configuration.
-
update_capabilities
(phone_number_capabilities_update: Dict[str, NumberUpdateCapabilities], **kwargs: Any) → UpdateNumberCapabilitiesResponse[source]¶ Adds or removes phone number capabilities.
- Parameters
phone_number_capabilities_update (dict[str, NumberUpdateCapabilities]) – The map of phone numbers to the capabilities update applied to the phone number.
- Return type
-
class
azure.communication.administration.
CommunicationTokenRequest
(*, scopes: List[str], **kwargs)[source]¶ CommunicationTokenRequest.
All required parameters must be populated in order to send to Azure.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
-
class
azure.communication.administration.
CommunicationIdentityToken
(*, id: str, token: str, expires_on: datetime.datetime, **kwargs)[source]¶ CommunicationIdentityToken.
All required parameters must be populated in order to send to Azure.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
AcquiredPhoneNumber
(*, phone_number: str, acquired_capabilities: List[Union[str, Capability]], available_capabilities: List[Union[str, Capability]], assignment_status: Union[str, AssignmentStatus, None] = None, place_name: Optional[str] = None, activation_state: Union[str, ActivationState, None] = None, **kwargs)[source]¶ Represents an acquired phone number.
All required parameters must be populated in order to send to Azure.
- Parameters
phone_number (str) – Required. String of the E.164 format of the phone number.
acquired_capabilities (list[str or Capability]) – Required. The set of all acquired capabilities of the phone number.
available_capabilities (list[str or Capability]) – Required. The set of all available capabilities that can be acquired for this phone number.
assignment_status (str or AssignmentStatus) – The assignment status of the phone number. Conveys what type of entity the number is assigned to. Possible values include: “Unassigned”, “Unknown”, “UserAssigned”, “ConferenceAssigned”, “FirstPartyAppAssigned”, “ThirdPartyAppAssigned”.
place_name (str) – The name of the place of the phone number.
activation_state (str or ActivationState) – The activation state of the phone number. Can be “Activated”, “AssignmentPending”, “AssignmentFailed”, “UpdatePending”, “UpdateFailed”. Possible values include: “Activated”, “AssignmentPending”, “AssignmentFailed”, “UpdatePending”, “UpdateFailed”.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
AcquiredPhoneNumbers
(*, phone_numbers: Optional[List[AcquiredPhoneNumber]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ A wrapper of list of phone numbers.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
AreaCodes
(*, primary_area_codes: Optional[List[str]] = None, secondary_area_codes: Optional[List[str]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ Represents a list of area codes.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
CreateSearchResponse
(*, search_id: str, **kwargs)[source]¶ Represents a search creation response.
All required parameters must be populated in order to send to Azure.
- Parameters
search_id (str) – Required. The search id of the search that was created.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
LocationOptionsQuery
(*, label_id: Optional[str] = None, options_value: Optional[str] = None, **kwargs)[source]¶ Represents a location options parameter, used for fetching area codes.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
LocationOptionsResponse
(*, location_options: Optional[LocationOptions] = None, **kwargs)[source]¶ Represents a wrapper around a list of location options.
- Parameters
location_options (LocationOptions) – Represents a location options.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
NumberConfigurationResponse
(*, pstn_configuration: azure.communication.administration._phonenumber._generated.models._models_py3.PstnConfiguration, **kwargs)[source]¶ Definition for number configuration.
All required parameters must be populated in order to send to Azure.
- Parameters
pstn_configuration (PstnConfiguration) – Required. Definition for pstn number configuration.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
NumberUpdateCapabilities
(*, add: Optional[List[Union[str, Capability]]] = None, remove: Optional[List[Union[str, Capability]]] = None, **kwargs)[source]¶ Represents an individual number capabilities update request.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhoneNumberCountries
(*, countries: Optional[List[PhoneNumberCountry]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ Represents a wrapper around a list of countries.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhoneNumberEntities
(*, entities: Optional[List[PhoneNumberEntity]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ Represents a list of searches or releases, as part of the response when fetching all searches or releases.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhoneNumberRelease
(*, release_id: Optional[str] = None, created_at: Optional[datetime.datetime] = None, status: Union[str, ReleaseStatus, None] = None, error_message: Optional[str] = None, phone_number_release_status_details: Optional[Dict[str, PhoneNumberReleaseDetails]] = None, **kwargs)[source]¶ Represents a release.
- Parameters
release_id (str) – The id of the release.
created_at (datetime) – The creation time of the release.
status (str or ReleaseStatus) – The release status. Possible values include: “Pending”, “InProgress”, “Complete”, “Failed”, “Expired”.
error_message (str) – The underlying error message of a release.
phone_number_release_status_details (dict[str, PhoneNumberReleaseDetails]) – The list of phone numbers in the release, mapped to its individual statuses.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhoneNumberSearch
(*, search_id: Optional[str] = None, display_name: Optional[str] = None, created_at: Optional[datetime.datetime] = None, description: Optional[str] = None, phone_plan_ids: Optional[List[str]] = None, area_code: Optional[str] = None, quantity: Optional[int] = None, location_options: Optional[List[LocationOptionsDetails]] = None, status: Union[str, SearchStatus, None] = None, phone_numbers: Optional[List[str]] = None, reservation_expiry_date: Optional[datetime.datetime] = None, error_code: Optional[int] = None, **kwargs)[source]¶ Represents a phone number search.
- Parameters
search_id (str) – The id of the search.
display_name (str) – The name of the search.
created_at (datetime) – The creation time of the search.
description (str) – The description of the search.
phone_plan_ids (list[str]) – The phone plan ids of the search.
area_code (str) – The area code of the search.
quantity (int) – The quantity of phone numbers in the search.
location_options (list[LocationOptionsDetails]) – The location options of the search.
status (str or SearchStatus) – The status of the search. Possible values include: “Pending”, “InProgress”, “Reserved”, “Expired”, “Expiring”, “Completing”, “Refreshing”, “Success”, “Manual”, “Cancelled”, “Cancelling”, “Error”, “PurchasePending”.
phone_numbers (list[str]) – The list of phone numbers in the search, in the case the status is reserved or success.
reservation_expiry_date (datetime) – The date that search expires and the numbers become available.
error_code (int) – The error code of the search.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhonePlanGroups
(*, phone_plan_groups: Optional[List[PhonePlanGroup]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ Represents a wrapper of list of plan groups.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PhonePlansResponse
(*, phone_plans: Optional[List[PhonePlan]] = None, next_link: Optional[str] = None, **kwargs)[source]¶ Represents a wrapper around a list of countries.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
PstnConfiguration
(*, callback_url: str, application_id: Optional[str] = None, **kwargs)[source]¶ Definition for pstn number configuration.
All required parameters must be populated in order to send to Azure.
- Parameters
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
ReleaseResponse
(*, release_id: str, **kwargs)[source]¶ Represents a release response.
All required parameters must be populated in order to send to Azure.
- Parameters
release_id (str) – Required. The release id of a created release.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
UpdateNumberCapabilitiesResponse
(*, capabilities_update_id: str, **kwargs)[source]¶ Represents a number capability update response.
All required parameters must be populated in order to send to Azure.
- Parameters
capabilities_update_id (str) – Required. The capabilities id.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
UpdatePhoneNumberCapabilitiesResponse
(*, capabilities_update_id: Optional[str] = None, created_at: Optional[datetime.datetime] = None, capabilities_update_status: Union[str, CapabilitiesUpdateStatus, None] = None, phone_number_capabilities_updates: Optional[Dict[str, NumberUpdateCapabilities]] = None, **kwargs)[source]¶ Response for getting a phone number update capabilities.
- Parameters
capabilities_update_id (str) – The id of the phone number capabilities update.
created_at (datetime) – The time the capabilities update was created.
capabilities_update_status (str or CapabilitiesUpdateStatus) – Status of the capabilities update. Possible values include: “Pending”, “InProgress”, “Complete”, “Error”.
phone_number_capabilities_updates (dict[str, NumberUpdateCapabilities]) – The capabilities update for each of a set of phone numbers.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
CreateSearchOptions
(*, display_name: str, description: str, phone_plan_ids: List[str], area_code: str, quantity: Optional[int] = None, location_options: Optional[List[LocationOptionsDetails]] = None, **kwargs)[source]¶ Represents a search creation option.
All required parameters must be populated in order to send to Azure.
- Parameters
display_name (str) – Required. Display name of the search.
description (str) – Required. Description of the search.
phone_plan_ids (list[str]) – Required. The plan subtype ids from which to create the search.
area_code (str) – Required. The area code from which to create the search.
quantity (int) – The quantity of phone numbers to request.
location_options (list[LocationOptionsDetails]) – The location options of the search.
-
as_dict
(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)¶ Return a dict that can be JSONify using json.dump.
Advanced usage might optionaly use a callback as parameter:
Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.
The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.
See the three examples in this file:
attribute_transformer
full_restapi_key_transformer
last_restapi_key_transformer
If you want XML serialization, you can pass the kwargs is_xml=True.
- Parameters
key_transformer (function) – A key transformer function.
- Returns
A dict JSON compatible object
- Return type
-
classmethod
deserialize
(data, content_type=None)¶ Parse a str using the RestAPI syntax and return a model.
-
classmethod
enable_additional_properties_sending
()¶
-
classmethod
from_dict
(data, key_extractors=None, content_type=None)¶ Parse a dict using given key extractor return a model.
By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)
-
classmethod
is_xml_model
()¶
-
serialize
(keep_readonly=False, **kwargs)¶ Return the JSON that would be sent to azure from this model.
This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).
If you want XML serialization, you can pass the kwargs is_xml=True.
-
class
azure.communication.administration.
CommunicationUser
(identifier)[source]¶ Represents a user in Azure Communication Service. :ivar identifier: Communication user identifier. :vartype identifier: str :param identifier: Identifier to initialize CommunicationUser. :type identifier: str
-
class
azure.communication.administration.
PhoneNumber
(value)[source]¶ Represents a phone number. :ivar value: Value for a phone number. :vartype value: str :param value: Value to initialize PhoneNumber. :type value: str
-
class
azure.communication.administration.
UnknownIdentifier
(identifier)[source]¶ Represents an identifier of an unknown type. It will be encountered in communications with endpoints that are not identifiable by this version of the SDK. :ivar identifier: Unknown communication identifier. :vartype identifier: str :param identifier: Value to initialize UnknownIdentifier. :type identifier: str