|
8 | 8 | # --------------------------------------------------------------------------
|
9 | 9 |
|
10 | 10 | import datetime
|
11 |
| -from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union |
| 11 | +from typing import Any, List, Optional, TYPE_CHECKING, Union |
12 | 12 |
|
13 | 13 | from .. import _serialization
|
14 | 14 |
|
@@ -885,93 +885,6 @@ def __init__(
|
885 | 885 | self.consent_to_not_resell_numbers = consent_to_not_resell_numbers
|
886 | 886 |
|
887 | 887 |
|
888 |
| -class PhoneNumbersBrowseRequest(_serialization.Model): |
889 |
| - """PhoneNumbersBrowseRequest. |
890 |
| -
|
891 |
| - All required parameters must be populated in order to send to server. |
892 |
| -
|
893 |
| - :ivar phone_number_type: Represents the number type of the offering. Required. Known values |
894 |
| - are: "geographic" and "tollFree". |
895 |
| - :vartype phone_number_type: str or ~azure.communication.phonenumbers.models.PhoneNumberType |
896 |
| - :ivar capabilities: Capabilities of a phone number. |
897 |
| - :vartype capabilities: ~azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest |
898 |
| - :ivar assignment_type: Represents the assignment type of the offering. Also known as the use |
899 |
| - case. Known values are: "person" and "application". |
900 |
| - :vartype assignment_type: str or |
901 |
| - ~azure.communication.phonenumbers.models.PhoneNumberAssignmentType |
902 |
| - :ivar phone_number_prefixes: The phone number prefix to match. If specified, the search will be |
903 |
| - limited to phone numbers that start with the any of the given prefixes. |
904 |
| - :vartype phone_number_prefixes: list[str] |
905 |
| - """ |
906 |
| - |
907 |
| - _validation = { |
908 |
| - "phone_number_type": {"required": True}, |
909 |
| - } |
910 |
| - |
911 |
| - _attribute_map = { |
912 |
| - "phone_number_type": {"key": "phoneNumberType", "type": "str"}, |
913 |
| - "capabilities": {"key": "capabilities", "type": "PhoneNumberCapabilitiesRequest"}, |
914 |
| - "assignment_type": {"key": "assignmentType", "type": "str"}, |
915 |
| - "phone_number_prefixes": {"key": "phoneNumberPrefixes", "type": "[str]"}, |
916 |
| - } |
917 |
| - |
918 |
| - def __init__( |
919 |
| - self, |
920 |
| - *, |
921 |
| - phone_number_type: Union[str, "_models.PhoneNumberType"], |
922 |
| - capabilities: Optional["_models.PhoneNumberCapabilitiesRequest"] = None, |
923 |
| - assignment_type: Optional[Union[str, "_models.PhoneNumberAssignmentType"]] = None, |
924 |
| - phone_number_prefixes: Optional[List[str]] = None, |
925 |
| - **kwargs: Any |
926 |
| - ) -> None: |
927 |
| - """ |
928 |
| - :keyword phone_number_type: Represents the number type of the offering. Required. Known values |
929 |
| - are: "geographic" and "tollFree". |
930 |
| - :paramtype phone_number_type: str or ~azure.communication.phonenumbers.models.PhoneNumberType |
931 |
| - :keyword capabilities: Capabilities of a phone number. |
932 |
| - :paramtype capabilities: |
933 |
| - ~azure.communication.phonenumbers.models.PhoneNumberCapabilitiesRequest |
934 |
| - :keyword assignment_type: Represents the assignment type of the offering. Also known as the use |
935 |
| - case. Known values are: "person" and "application". |
936 |
| - :paramtype assignment_type: str or |
937 |
| - ~azure.communication.phonenumbers.models.PhoneNumberAssignmentType |
938 |
| - :keyword phone_number_prefixes: The phone number prefix to match. If specified, the search will |
939 |
| - be limited to phone numbers that start with the any of the given prefixes. |
940 |
| - :paramtype phone_number_prefixes: list[str] |
941 |
| - """ |
942 |
| - super().__init__(**kwargs) |
943 |
| - self.phone_number_type = phone_number_type |
944 |
| - self.capabilities = capabilities |
945 |
| - self.assignment_type = assignment_type |
946 |
| - self.phone_number_prefixes = phone_number_prefixes |
947 |
| - |
948 |
| - |
949 |
| -class PhoneNumbersBrowseResult(_serialization.Model): |
950 |
| - """PhoneNumbersBrowseResult. |
951 |
| -
|
952 |
| - All required parameters must be populated in order to send to server. |
953 |
| -
|
954 |
| - :ivar phone_numbers: The phone numbers that are available for purchase. Required. |
955 |
| - :vartype phone_numbers: list[~azure.communication.phonenumbers.models.AvailablePhoneNumber] |
956 |
| - """ |
957 |
| - |
958 |
| - _validation = { |
959 |
| - "phone_numbers": {"required": True}, |
960 |
| - } |
961 |
| - |
962 |
| - _attribute_map = { |
963 |
| - "phone_numbers": {"key": "phoneNumbers", "type": "[AvailablePhoneNumber]"}, |
964 |
| - } |
965 |
| - |
966 |
| - def __init__(self, *, phone_numbers: List["_models.AvailablePhoneNumber"], **kwargs: Any) -> None: |
967 |
| - """ |
968 |
| - :keyword phone_numbers: The phone numbers that are available for purchase. Required. |
969 |
| - :paramtype phone_numbers: list[~azure.communication.phonenumbers.models.AvailablePhoneNumber] |
970 |
| - """ |
971 |
| - super().__init__(**kwargs) |
972 |
| - self.phone_numbers = phone_numbers |
973 |
| - |
974 |
| - |
975 | 888 | class PhoneNumberSearchRequest(_serialization.Model):
|
976 | 889 | """Represents a phone number search request to find phone numbers. Found phone numbers are
|
977 | 890 | temporarily held for a following purchase.
|
@@ -1134,107 +1047,6 @@ def __init__(
|
1134 | 1047 | self.search_expires_by = search_expires_by
|
1135 | 1048 |
|
1136 | 1049 |
|
1137 |
| -class PhoneNumbersReservation(_serialization.Model): |
1138 |
| - """PhoneNumbersReservation. |
1139 |
| -
|
1140 |
| - Variables are only populated by the server, and will be ignored when sending a request. |
1141 |
| -
|
1142 |
| - All required parameters must be populated in order to send to server. |
1143 |
| -
|
1144 |
| - :ivar id: The id of the reservation. Required. |
1145 |
| - :vartype id: str |
1146 |
| - :ivar expires_at: The time at which the reservation will expire. If a reservation is not |
1147 |
| - purchased before this time, all of the reserved phone numbers will be released and made |
1148 |
| - available for others to purchase. Required. |
1149 |
| - :vartype expires_at: ~datetime.datetime |
1150 |
| - :ivar phone_numbers: Dictionary of :code:`<AvailablePhoneNumber>`. Required. |
1151 |
| - :vartype phone_numbers: dict[str, |
1152 |
| - ~azure.communication.phonenumbers.models.AvailablePhoneNumber] |
1153 |
| - :ivar status: Required. Known values are: "active", "submitted", "completed", and "expired". |
1154 |
| - :vartype status: str or ~azure.communication.phonenumbers.models.ReservationStatus |
1155 |
| - """ |
1156 |
| - |
1157 |
| - _validation = { |
1158 |
| - "id": {"required": True, "readonly": True}, |
1159 |
| - "expires_at": {"required": True, "readonly": True}, |
1160 |
| - "phone_numbers": {"required": True}, |
1161 |
| - "status": {"required": True, "readonly": True}, |
1162 |
| - } |
1163 |
| - |
1164 |
| - _attribute_map = { |
1165 |
| - "id": {"key": "id", "type": "str"}, |
1166 |
| - "expires_at": {"key": "expiresAt", "type": "iso-8601"}, |
1167 |
| - "phone_numbers": {"key": "phoneNumbers", "type": "{AvailablePhoneNumber}"}, |
1168 |
| - "status": {"key": "status", "type": "str"}, |
1169 |
| - } |
1170 |
| - |
1171 |
| - def __init__(self, *, phone_numbers: Dict[str, "_models.AvailablePhoneNumber"], **kwargs: Any) -> None: |
1172 |
| - """ |
1173 |
| - :keyword phone_numbers: Dictionary of :code:`<AvailablePhoneNumber>`. Required. |
1174 |
| - :paramtype phone_numbers: dict[str, |
1175 |
| - ~azure.communication.phonenumbers.models.AvailablePhoneNumber] |
1176 |
| - """ |
1177 |
| - super().__init__(**kwargs) |
1178 |
| - self.id = None |
1179 |
| - self.expires_at = None |
1180 |
| - self.phone_numbers = phone_numbers |
1181 |
| - self.status = None |
1182 |
| - |
1183 |
| - |
1184 |
| -class PhoneNumbersReservationPurchaseRequest(_serialization.Model): |
1185 |
| - """The phone number search purchase request. |
1186 |
| -
|
1187 |
| - :ivar consent_to_not_resell_numbers: The consent to not resell numbers. |
1188 |
| - :vartype consent_to_not_resell_numbers: bool |
1189 |
| - """ |
1190 |
| - |
1191 |
| - _attribute_map = { |
1192 |
| - "consent_to_not_resell_numbers": {"key": "consentToNotResellNumbers", "type": "bool"}, |
1193 |
| - } |
1194 |
| - |
1195 |
| - def __init__(self, *, consent_to_not_resell_numbers: Optional[bool] = None, **kwargs: Any) -> None: |
1196 |
| - """ |
1197 |
| - :keyword consent_to_not_resell_numbers: The consent to not resell numbers. |
1198 |
| - :paramtype consent_to_not_resell_numbers: bool |
1199 |
| - """ |
1200 |
| - super().__init__(**kwargs) |
1201 |
| - self.consent_to_not_resell_numbers = consent_to_not_resell_numbers |
1202 |
| - |
1203 |
| - |
1204 |
| -class PhoneNumbersReservations(_serialization.Model): |
1205 |
| - """PhoneNumbersReservations. |
1206 |
| -
|
1207 |
| - All required parameters must be populated in order to send to server. |
1208 |
| -
|
1209 |
| - :ivar reservations: Represents a list of phone numbers. Required. |
1210 |
| - :vartype reservations: list[~azure.communication.phonenumbers.models.PhoneNumbersReservation] |
1211 |
| - :ivar next_link: Represents the URL link to the next page of phone number results. |
1212 |
| - :vartype next_link: str |
1213 |
| - """ |
1214 |
| - |
1215 |
| - _validation = { |
1216 |
| - "reservations": {"required": True}, |
1217 |
| - } |
1218 |
| - |
1219 |
| - _attribute_map = { |
1220 |
| - "reservations": {"key": "reservations", "type": "[PhoneNumbersReservation]"}, |
1221 |
| - "next_link": {"key": "nextLink", "type": "str"}, |
1222 |
| - } |
1223 |
| - |
1224 |
| - def __init__( |
1225 |
| - self, *, reservations: List["_models.PhoneNumbersReservation"], next_link: Optional[str] = None, **kwargs: Any |
1226 |
| - ) -> None: |
1227 |
| - """ |
1228 |
| - :keyword reservations: Represents a list of phone numbers. Required. |
1229 |
| - :paramtype reservations: list[~azure.communication.phonenumbers.models.PhoneNumbersReservation] |
1230 |
| - :keyword next_link: Represents the URL link to the next page of phone number results. |
1231 |
| - :paramtype next_link: str |
1232 |
| - """ |
1233 |
| - super().__init__(**kwargs) |
1234 |
| - self.reservations = reservations |
1235 |
| - self.next_link = next_link |
1236 |
| - |
1237 |
| - |
1238 | 1050 | class PurchasedPhoneNumber(_serialization.Model): # pylint: disable=too-many-instance-attributes
|
1239 | 1051 | """Represents a purchased phone number.
|
1240 | 1052 |
|
|
0 commit comments