Skip to content

Commit 5760cbc

Browse files
updating from new cosmos spec (Azure#16198)
1 parent 45a96e7 commit 5760cbc

File tree

11 files changed

+29
-131
lines changed

11 files changed

+29
-131
lines changed

sdk/tables/azure-data-tables/azure/data/tables/_generated/_azure_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AzureTable(object):
2828
:vartype table: azure.data.tables.operations.TableOperations
2929
:ivar service: ServiceOperations operations
3030
:vartype service: azure.data.tables.operations.ServiceOperations
31-
:param url: The URL of the service account or table that is the target of the desired operation.
31+
:param url: The URL of the service account or table that is the targe of the desired operation.
3232
:type url: str
3333
"""
3434

sdk/tables/azure-data-tables/azure/data/tables/_generated/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AzureTableConfiguration(Configuration):
2424
Note that all parameters used to create this instance are saved as instance
2525
attributes.
2626
27-
:param url: The URL of the service account or table that is the target of the desired operation.
27+
:param url: The URL of the service account or table that is the targe of the desired operation.
2828
:type url: str
2929
"""
3030

sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_azure_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AzureTable(object):
2424
:vartype table: azure.data.tables.aio.operations.TableOperations
2525
:ivar service: ServiceOperations operations
2626
:vartype service: azure.data.tables.aio.operations.ServiceOperations
27-
:param url: The URL of the service account or table that is the target of the desired operation.
27+
:param url: The URL of the service account or table that is the targe of the desired operation.
2828
:type url: str
2929
"""
3030

sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class AzureTableConfiguration(Configuration):
2020
Note that all parameters used to create this instance are saved as instance
2121
attributes.
2222
23-
:param url: The URL of the service account or table that is the target of the desired operation.
23+
:param url: The URL of the service account or table that is the targe of the desired operation.
2424
:type url: str
2525
"""
2626

sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/operations/_table_operations.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ async def query(
112112

113113
if response.status_code not in [200]:
114114
map_error(status_code=response.status_code, response=response, error_map=error_map)
115-
error = self._deserialize(_models.TableServiceError, response)
116-
raise HttpResponseError(response=response, model=error)
115+
raise HttpResponseError(response=response)
117116

118117
response_headers = {}
119118
response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id'))
@@ -393,7 +392,7 @@ async def query_entities(
393392
return deserialized
394393
query_entities.metadata = {'url': '/{table}()'} # type: ignore
395394

396-
async def query_entities_with_partition_and_row_key(
395+
async def query_entity_with_partition_and_row_key(
397396
self,
398397
table: str,
399398
partition_key: str,
@@ -403,7 +402,7 @@ async def query_entities_with_partition_and_row_key(
403402
query_options: Optional["_models.QueryOptions"] = None,
404403
**kwargs
405404
) -> Dict[str, object]:
406-
"""Queries entities in a table.
405+
"""Queries a single entity in a table.
407406
408407
:param table: The name of the table.
409408
:type table: str
@@ -440,7 +439,7 @@ async def query_entities_with_partition_and_row_key(
440439
accept = "application/json;odata=minimalmetadata"
441440

442441
# Construct URL
443-
url = self.query_entities_with_partition_and_row_key.metadata['url'] # type: ignore
442+
url = self.query_entity_with_partition_and_row_key.metadata['url'] # type: ignore
444443
path_format_arguments = {
445444
'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True),
446445
'table': self._serialize.url("table", table, 'str'),
@@ -491,7 +490,7 @@ async def query_entities_with_partition_and_row_key(
491490
return cls(pipeline_response, deserialized, response_headers)
492491

493492
return deserialized
494-
query_entities_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore
493+
query_entity_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore
495494

496495
async def update_entity(
497496
self,

sdk/tables/azure-data-tables/azure/data/tables/_generated/models/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
from ._models_py3 import TableResponse
2222
from ._models_py3 import TableResponseProperties
2323
from ._models_py3 import TableServiceError
24-
from ._models_py3 import TableServiceErrorOdataError
25-
from ._models_py3 import TableServiceErrorOdataErrorMessage
2624
from ._models_py3 import TableServiceProperties
2725
from ._models_py3 import TableServiceStats
2826
except (SyntaxError, ImportError):
@@ -40,8 +38,6 @@
4038
from ._models import TableResponse # type: ignore
4139
from ._models import TableResponseProperties # type: ignore
4240
from ._models import TableServiceError # type: ignore
43-
from ._models import TableServiceErrorOdataError # type: ignore
44-
from ._models import TableServiceErrorOdataErrorMessage # type: ignore
4541
from ._models import TableServiceProperties # type: ignore
4642
from ._models import TableServiceStats # type: ignore
4743

@@ -66,8 +62,6 @@
6662
'TableResponse',
6763
'TableResponseProperties',
6864
'TableServiceError',
69-
'TableServiceErrorOdataError',
70-
'TableServiceErrorOdataErrorMessage',
7165
'TableServiceProperties',
7266
'TableServiceStats',
7367
'GeoReplicationStatusType',

sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models.py

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -463,69 +463,25 @@ def __init__(
463463
class TableServiceError(msrest.serialization.Model):
464464
"""Table Service error.
465465
466-
:param odata_error: The odata error.
467-
:type odata_error: ~azure.data.tables.models.TableServiceErrorOdataError
466+
:param message: The error message.
467+
:type message: str
468468
"""
469469

470470
_attribute_map = {
471-
'odata_error': {'key': 'odata\\.error', 'type': 'TableServiceErrorOdataError'},
471+
'message': {'key': 'Message', 'type': 'str', 'xml': {'name': 'Message'}},
472472
}
473-
474-
def __init__(
475-
self,
476-
**kwargs
477-
):
478-
super(TableServiceError, self).__init__(**kwargs)
479-
self.odata_error = kwargs.get('odata_error', None)
480-
481-
482-
class TableServiceErrorOdataError(msrest.serialization.Model):
483-
"""The odata error.
484-
485-
:param code: The service error code. The error codes possible are listed in:
486-
https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes.
487-
:type code: str
488-
:param message: The service error message.
489-
:type message: ~azure.data.tables.models.TableServiceErrorOdataErrorMessage
490-
"""
491-
492-
_attribute_map = {
493-
'code': {'key': 'code', 'type': 'str'},
494-
'message': {'key': 'message', 'type': 'TableServiceErrorOdataErrorMessage'},
473+
_xml_map = {
474+
495475
}
496476

497477
def __init__(
498478
self,
499479
**kwargs
500480
):
501-
super(TableServiceErrorOdataError, self).__init__(**kwargs)
502-
self.code = kwargs.get('code', None)
481+
super(TableServiceError, self).__init__(**kwargs)
503482
self.message = kwargs.get('message', None)
504483

505484

506-
class TableServiceErrorOdataErrorMessage(msrest.serialization.Model):
507-
"""The service error message.
508-
509-
:param lang: Language code of the error message.
510-
:type lang: str
511-
:param value: The error message.
512-
:type value: str
513-
"""
514-
515-
_attribute_map = {
516-
'lang': {'key': 'lang', 'type': 'str'},
517-
'value': {'key': 'value', 'type': 'str'},
518-
}
519-
520-
def __init__(
521-
self,
522-
**kwargs
523-
):
524-
super(TableServiceErrorOdataErrorMessage, self).__init__(**kwargs)
525-
self.lang = kwargs.get('lang', None)
526-
self.value = kwargs.get('value', None)
527-
528-
529485
class TableServiceProperties(msrest.serialization.Model):
530486
"""Table Service Properties.
531487

sdk/tables/azure-data-tables/azure/data/tables/_generated/models/_models_py3.py

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -522,77 +522,27 @@ def __init__(
522522
class TableServiceError(msrest.serialization.Model):
523523
"""Table Service error.
524524
525-
:param odata_error: The odata error.
526-
:type odata_error: ~azure.data.tables.models.TableServiceErrorOdataError
525+
:param message: The error message.
526+
:type message: str
527527
"""
528528

529529
_attribute_map = {
530-
'odata_error': {'key': 'odata\\.error', 'type': 'TableServiceErrorOdataError'},
530+
'message': {'key': 'Message', 'type': 'str', 'xml': {'name': 'Message'}},
531531
}
532-
533-
def __init__(
534-
self,
535-
*,
536-
odata_error: Optional["TableServiceErrorOdataError"] = None,
537-
**kwargs
538-
):
539-
super(TableServiceError, self).__init__(**kwargs)
540-
self.odata_error = odata_error
541-
542-
543-
class TableServiceErrorOdataError(msrest.serialization.Model):
544-
"""The odata error.
545-
546-
:param code: The service error code. The error codes possible are listed in:
547-
https://docs.microsoft.com/rest/api/storageservices/table-service-error-codes.
548-
:type code: str
549-
:param message: The service error message.
550-
:type message: ~azure.data.tables.models.TableServiceErrorOdataErrorMessage
551-
"""
552-
553-
_attribute_map = {
554-
'code': {'key': 'code', 'type': 'str'},
555-
'message': {'key': 'message', 'type': 'TableServiceErrorOdataErrorMessage'},
532+
_xml_map = {
533+
556534
}
557535

558536
def __init__(
559537
self,
560538
*,
561-
code: Optional[str] = None,
562-
message: Optional["TableServiceErrorOdataErrorMessage"] = None,
539+
message: Optional[str] = None,
563540
**kwargs
564541
):
565-
super(TableServiceErrorOdataError, self).__init__(**kwargs)
566-
self.code = code
542+
super(TableServiceError, self).__init__(**kwargs)
567543
self.message = message
568544

569545

570-
class TableServiceErrorOdataErrorMessage(msrest.serialization.Model):
571-
"""The service error message.
572-
573-
:param lang: Language code of the error message.
574-
:type lang: str
575-
:param value: The error message.
576-
:type value: str
577-
"""
578-
579-
_attribute_map = {
580-
'lang': {'key': 'lang', 'type': 'str'},
581-
'value': {'key': 'value', 'type': 'str'},
582-
}
583-
584-
def __init__(
585-
self,
586-
*,
587-
lang: Optional[str] = None,
588-
value: Optional[str] = None,
589-
**kwargs
590-
):
591-
super(TableServiceErrorOdataErrorMessage, self).__init__(**kwargs)
592-
self.lang = lang
593-
self.value = value
594-
595-
596546
class TableServiceProperties(msrest.serialization.Model):
597547
"""Table Service Properties.
598548

sdk/tables/azure-data-tables/azure/data/tables/_generated/operations/_table_operations.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ def query(
117117

118118
if response.status_code not in [200]:
119119
map_error(status_code=response.status_code, response=response, error_map=error_map)
120-
error = self._deserialize(_models.TableServiceError, response)
121-
raise HttpResponseError(response=response, model=error)
120+
raise HttpResponseError(response=response)
122121

123122
response_headers = {}
124123
response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id'))
@@ -401,7 +400,7 @@ def query_entities(
401400
return deserialized
402401
query_entities.metadata = {'url': '/{table}()'} # type: ignore
403402

404-
def query_entities_with_partition_and_row_key(
403+
def query_entity_with_partition_and_row_key(
405404
self,
406405
table, # type: str
407406
partition_key, # type: str
@@ -412,7 +411,7 @@ def query_entities_with_partition_and_row_key(
412411
**kwargs # type: Any
413412
):
414413
# type: (...) -> Dict[str, object]
415-
"""Queries entities in a table.
414+
"""Queries a single entity in a table.
416415
417416
:param table: The name of the table.
418417
:type table: str
@@ -449,7 +448,7 @@ def query_entities_with_partition_and_row_key(
449448
accept = "application/json;odata=minimalmetadata"
450449

451450
# Construct URL
452-
url = self.query_entities_with_partition_and_row_key.metadata['url'] # type: ignore
451+
url = self.query_entity_with_partition_and_row_key.metadata['url'] # type: ignore
453452
path_format_arguments = {
454453
'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True),
455454
'table': self._serialize.url("table", table, 'str'),
@@ -500,7 +499,7 @@ def query_entities_with_partition_and_row_key(
500499
return cls(pipeline_response, deserialized, response_headers)
501500

502501
return deserialized
503-
query_entities_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore
502+
query_entity_with_partition_and_row_key.metadata = {'url': '/{table}(PartitionKey=\'{partitionKey}\',RowKey=\'{rowKey}\')'} # type: ignore
504503

505504
def update_entity(
506505
self,

sdk/tables/azure-data-tables/azure/data/tables/_table_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def get_entity(
529529
:caption: Get a single entity from a table
530530
"""
531531
try:
532-
entity = self._client.table.query_entities_with_partition_and_row_key(
532+
entity = self._client.table.query_entity_with_partition_and_row_key(
533533
table=self.table_name,
534534
partition_key=partition_key,
535535
row_key=row_key,

0 commit comments

Comments
 (0)