id
int64 0
843k
| repository_name
stringlengths 7
55
| file_path
stringlengths 9
332
| class_name
stringlengths 3
290
| human_written_code
stringlengths 12
4.36M
| class_skeleton
stringlengths 19
2.2M
| total_program_units
int64 1
9.57k
| total_doc_str
int64 0
4.2k
| AvgCountLine
float64 0
7.89k
| AvgCountLineBlank
float64 0
300
| AvgCountLineCode
float64 0
7.89k
| AvgCountLineComment
float64 0
7.89k
| AvgCyclomatic
float64 0
130
| CommentToCodeRatio
float64 0
176
| CountClassBase
float64 0
48
| CountClassCoupled
float64 0
589
| CountClassCoupledModified
float64 0
581
| CountClassDerived
float64 0
5.37k
| CountDeclInstanceMethod
float64 0
4.2k
| CountDeclInstanceVariable
float64 0
299
| CountDeclMethod
float64 0
4.2k
| CountDeclMethodAll
float64 0
4.2k
| CountLine
float64 1
115k
| CountLineBlank
float64 0
9.01k
| CountLineCode
float64 0
94.4k
| CountLineCodeDecl
float64 0
46.1k
| CountLineCodeExe
float64 0
91.3k
| CountLineComment
float64 0
27k
| CountStmt
float64 1
93.2k
| CountStmtDecl
float64 0
46.1k
| CountStmtExe
float64 0
90.2k
| MaxCyclomatic
float64 0
759
| MaxInheritanceTree
float64 0
16
| MaxNesting
float64 0
34
| SumCyclomatic
float64 0
6k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,600 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.DataTransferJobFeedResults
|
class DataTransferJobFeedResults(_serialization.Model):
"""The List operation response, that contains the Data Transfer jobs and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Data Transfer jobs and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.DataTransferJobGetResults]
:ivar next_link: URL to get the next set of Data Transfer job list results if there are any.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[DataTransferJobGetResults]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
|
class DataTransferJobFeedResults(_serialization.Model):
'''The List operation response, that contains the Data Transfer jobs and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Data Transfer jobs and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.DataTransferJobGetResults]
:ivar next_link: URL to get the next set of Data Transfer job list results if there are any.
:vartype next_link: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 5 | 0 | 4 | 1 | 1 | 0.62 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 5 | 13 | 6 | 11 | 8 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
9,601 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ErrorResponseAutoGenerated
|
class ErrorResponseAutoGenerated(_serialization.Model):
"""Error Response.
:ivar code: Error code.
:vartype code: str
:ivar message: Error message indicating why the operation failed.
:vartype message: str
"""
_attribute_map = {
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
}
def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword code: Error code.
:paramtype code: str
:keyword message: Error message indicating why the operation failed.
:paramtype message: str
"""
super().__init__(**kwargs)
self.code = code
self.message = message
|
class ErrorResponseAutoGenerated(_serialization.Model):
'''Error Response.
:ivar code: Error code.
:vartype code: str
:ivar message: Error message indicating why the operation failed.
:vartype message: str
'''
def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword code: Error code.
:paramtype code: str
:keyword message: Error message indicating why the operation failed.
:paramtype message: str
'''
pass
| 2 | 2 | 10 | 0 | 4 | 6 | 1 | 1.33 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 24 | 3 | 9 | 5 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,602 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ExcludedPath
|
class ExcludedPath(_serialization.Model):
"""ExcludedPath.
:ivar path: The path for which the indexing behavior applies to. Index paths typically start
with root and end with wildcard (/path/*).
:vartype path: str
"""
_attribute_map = {
"path": {"key": "path", "type": "str"},
}
def __init__(self, *, path: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword path: The path for which the indexing behavior applies to. Index paths typically start
with root and end with wildcard (/path/*).
:paramtype path: str
"""
super().__init__(**kwargs)
self.path = path
|
class ExcludedPath(_serialization.Model):
'''ExcludedPath.
:ivar path: The path for which the indexing behavior applies to. Index paths typically start
with root and end with wildcard (/path/*).
:vartype path: str
'''
def __init__(self, *, path: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword path: The path for which the indexing behavior applies to. Index paths typically start
with root and end with wildcard (/path/*).
:paramtype path: str
'''
pass
| 2 | 2 | 8 | 0 | 3 | 5 | 1 | 1.43 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 16 | 20 | 3 | 7 | 4 | 5 | 10 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
9,603 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ExtendedResourceProperties
|
class ExtendedResourceProperties(_serialization.Model):
"""The system generated resource properties associated with SQL databases, SQL containers, Gremlin
databases and Gremlin graphs.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
"""
_validation = {
"rid": {"readonly": True},
"ts": {"readonly": True},
"etag": {"readonly": True},
}
_attribute_map = {
"rid": {"key": "_rid", "type": "str"},
"ts": {"key": "_ts", "type": "float"},
"etag": {"key": "_etag", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.rid = None
self.ts = None
self.etag = None
|
class ExtendedResourceProperties(_serialization.Model):
'''The system generated resource properties associated with SQL databases, SQL containers, Gremlin
databases and Gremlin graphs.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 6 | 0 | 5 | 1 | 1 | 0.75 | 1 | 2 | 0 | 17 | 1 | 3 | 1 | 16 | 33 | 5 | 16 | 7 | 14 | 12 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
9,604 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphGetResults
|
class GremlinGraphGetResults(ARMResourceProperties):
"""An Azure Cosmos DB Gremlin graph.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GremlinGraphGetPropertiesResource"},
"options": {"key": "properties.options", "type": "GremlinGraphGetPropertiesOptions"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GremlinGraphGetPropertiesResource"] = None,
options: Optional["_models.GremlinGraphGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GremlinGraphGetResults(ARMResourceProperties):
'''An Azure Cosmos DB Gremlin graph.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GremlinGraphGetPropertiesResource"] = None,
options: Optional["_models.GremlinGraphGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions
'''
pass
| 2 | 2 | 30 | 0 | 13 | 17 | 1 | 1.41 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 75 | 5 | 29 | 15 | 18 | 41 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,605 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphListResult
|
class GremlinGraphListResult(_serialization.Model):
"""The List operation response, that contains the graphs and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of graphs and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[GremlinGraphGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class GremlinGraphListResult(_serialization.Model):
'''The List operation response, that contains the graphs and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of graphs and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GremlinGraphGetResults]
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.6 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 21 | 5 | 10 | 5 | 8 | 6 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,606 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/enrichment/ip_geodata/_show.py
|
azext_sentinel.aaz.latest.sentinel.enrichment.ip_geodata._show.Show.IPGeodataGet
|
class IPGeodataGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/ip/geodata/",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"ipAddress", self.ctx.args.ip_address,
required=True,
),
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.asn = AAZStrType()
_schema_on_200.carrier = AAZStrType()
_schema_on_200.city = AAZStrType()
_schema_on_200.city_cf = AAZIntType(
serialized_name="cityCf",
)
_schema_on_200.continent = AAZStrType()
_schema_on_200.country = AAZStrType()
_schema_on_200.country_cf = AAZIntType(
serialized_name="countryCf",
)
_schema_on_200.ip_addr = AAZStrType(
serialized_name="ipAddr",
)
_schema_on_200.ip_routing_type = AAZStrType(
serialized_name="ipRoutingType",
)
_schema_on_200.latitude = AAZStrType()
_schema_on_200.longitude = AAZStrType()
_schema_on_200.organization = AAZStrType()
_schema_on_200.organization_type = AAZStrType(
serialized_name="organizationType",
)
_schema_on_200.region = AAZStrType()
_schema_on_200.state = AAZStrType()
_schema_on_200.state_cf = AAZIntType(
serialized_name="stateCf",
)
_schema_on_200.state_code = AAZStrType(
serialized_name="stateCode",
)
return cls._schema_on_200
|
class IPGeodataGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 0 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 114 | 14 | 100 | 26 | 83 | 0 | 50 | 19 | 40 | 2 | 1 | 1 | 11 |
9,607 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/enrichment/domain_whois/_show.py
|
azext_sentinel.aaz.latest.sentinel.enrichment.domain_whois._show.Show.DomainWhoisGet
|
class DomainWhoisGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecurityInsights/enrichment/domain/whois/",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"domain", self.ctx.args.domain,
required=True,
),
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.created = AAZStrType()
_schema_on_200.domain = AAZStrType()
_schema_on_200.expires = AAZStrType()
_schema_on_200.parsed_whois = AAZObjectType(
serialized_name="parsedWhois",
)
_schema_on_200.server = AAZStrType()
_schema_on_200.updated = AAZStrType()
parsed_whois = cls._schema_on_200.parsed_whois
parsed_whois.contacts = AAZObjectType()
parsed_whois.name_servers = AAZListType(
serialized_name="nameServers",
)
parsed_whois.registrar = AAZObjectType()
parsed_whois.statuses = AAZListType()
contacts = cls._schema_on_200.parsed_whois.contacts
contacts.admin = AAZObjectType()
_build_schema_enrichment_domain_whois_contact_read(contacts.admin)
contacts.billing = AAZObjectType()
_build_schema_enrichment_domain_whois_contact_read(
contacts.billing)
contacts.registrant = AAZObjectType()
_build_schema_enrichment_domain_whois_contact_read(
contacts.registrant)
contacts.tech = AAZObjectType()
_build_schema_enrichment_domain_whois_contact_read(contacts.tech)
name_servers = cls._schema_on_200.parsed_whois.name_servers
name_servers.Element = AAZStrType()
registrar = cls._schema_on_200.parsed_whois.registrar
registrar.abuse_contact_email = AAZStrType(
serialized_name="abuseContactEmail",
)
registrar.abuse_contact_phone = AAZStrType(
serialized_name="abuseContactPhone",
)
registrar.iana_id = AAZStrType(
serialized_name="ianaId",
)
registrar.name = AAZStrType()
registrar.url = AAZStrType()
registrar.whois_server = AAZStrType(
serialized_name="whoisServer",
)
statuses = cls._schema_on_200.parsed_whois.statuses
statuses.Element = AAZStrType()
return cls._schema_on_200
|
class DomainWhoisGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 131 | 19 | 112 | 31 | 95 | 0 | 64 | 24 | 54 | 2 | 1 | 1 | 11 |
9,608 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_update.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("etag", AAZStrType, ".etag")
_builder.set_const("kind", "APIPolling", AAZStrType, ".api_polling", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "AmazonWebServicesCloudTrail", AAZStrType,
".aws_cloud_trail", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AmazonWebServicesS3", AAZStrType, ".aws_s3", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "AzureActiveDirectory", AAZStrType,
".azure_active_directory", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AzureAdvancedThreatProtection", AAZStrType,
".azure_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AzureSecurityCenter", AAZStrType,
".azure_security_center", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "Dynamics365", AAZStrType, ".dynamics365", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "GenericUI", AAZStrType, ".generic_ui", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "IOT", AAZStrType, ".iot", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftCloudAppSecurity", AAZStrType,
".cloud_app_security", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftDefenderAdvancedThreatProtection",
AAZStrType, ".defender_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftThreatIntelligence", AAZStrType,
".microsoft_intelligence", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftThreatProtection", AAZStrType,
".microsoft_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "Office365", AAZStrType, ".office365", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "Office365Project", AAZStrType,
".office365_project", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "OfficeATP", AAZStrType, ".office_atp", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "OfficeIRM", AAZStrType, ".office_irm", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "OfficePowerBI", AAZStrType, ".office_power_bi", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "ThreatIntelligence", AAZStrType,
".threat_intelligence", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "ThreatIntelligenceTaxii", AAZStrType,
".intelligence_taxii", typ_kwargs={"flags": {"required": True}})
_builder.discriminate_by("kind", "APIPolling")
_builder.discriminate_by("kind", "AmazonWebServicesCloudTrail")
_builder.discriminate_by("kind", "AmazonWebServicesS3")
_builder.discriminate_by("kind", "AzureActiveDirectory")
_builder.discriminate_by("kind", "AzureAdvancedThreatProtection")
_builder.discriminate_by("kind", "AzureSecurityCenter")
_builder.discriminate_by("kind", "Dynamics365")
_builder.discriminate_by("kind", "GenericUI")
_builder.discriminate_by("kind", "IOT")
_builder.discriminate_by("kind", "MicrosoftCloudAppSecurity")
_builder.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection")
_builder.discriminate_by("kind", "MicrosoftThreatIntelligence")
_builder.discriminate_by("kind", "MicrosoftThreatProtection")
_builder.discriminate_by("kind", "Office365")
_builder.discriminate_by("kind", "Office365Project")
_builder.discriminate_by("kind", "OfficeATP")
_builder.discriminate_by("kind", "OfficeIRM")
_builder.discriminate_by("kind", "OfficePowerBI")
_builder.discriminate_by("kind", "ThreatIntelligence")
_builder.discriminate_by("kind", "ThreatIntelligenceTaxii")
disc_api_polling = _builder.get("{kind:APIPolling}")
if disc_api_polling is not None:
disc_api_polling.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:APIPolling}.properties")
if properties is not None:
_build_schema_codeless_ui_connector_config_properties_update(properties.set_prop(
"connectorUiConfig", AAZObjectType, ".api_polling.connector_ui_config"))
properties.set_prop(
"pollingConfig", AAZObjectType, ".api_polling.polling_config")
polling_config = _builder.get(
"{kind:APIPolling}.properties.pollingConfig")
if polling_config is not None:
polling_config.set_prop("auth", AAZObjectType, ".auth", typ_kwargs={
"flags": {"required": True}})
polling_config.set_prop("isActive", AAZBoolType, ".is_active")
polling_config.set_prop("paging", AAZObjectType, ".paging")
polling_config.set_prop("request", AAZObjectType, ".request", typ_kwargs={
"flags": {"required": True}})
polling_config.set_prop("response", AAZObjectType, ".response")
auth = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.auth")
if auth is not None:
auth.set_prop("apiKeyIdentifier", AAZStrType,
".api_key_identifier")
auth.set_prop("apiKeyName", AAZStrType, ".api_key_name")
auth.set_prop("authType", AAZStrType, ".auth_type",
typ_kwargs={"flags": {"required": True}})
auth.set_prop("authorizationEndpoint",
AAZStrType, ".authorization_endpoint")
auth.set_prop("flowName", AAZStrType, ".flow_name")
auth.set_prop("isApiKeyInPostPayload", AAZStrType,
".is_api_key_in_post_payload")
auth.set_prop("isClientSecretInHeader",
AAZBoolType, ".is_client_secret_in_header")
auth.set_prop("redirectionEndpoint", AAZStrType,
".redirection_endpoint")
auth.set_prop("scope", AAZStrType, ".scope")
auth.set_prop("tokenEndpoint", AAZStrType, ".token_endpoint")
paging = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.paging")
if paging is not None:
paging.set_prop("nextPageParaName", AAZStrType,
".next_page_para_name")
paging.set_prop("nextPageTokenJsonPath",
AAZStrType, ".next_page_token_json_path")
paging.set_prop("pageCountAttributePath",
AAZStrType, ".page_count_attribute_path")
paging.set_prop("pageSize", AAZIntType, ".page_size")
paging.set_prop("pageSizeParaName", AAZStrType,
".page_size_para_name")
paging.set_prop("pageTimeStampAttributePath",
AAZStrType, ".page_time_stamp_attribute_path")
paging.set_prop("pageTotalCountAttributePath",
AAZStrType, ".page_total_count_attribute_path")
paging.set_prop("pagingType", AAZStrType, ".paging_type", typ_kwargs={
"flags": {"required": True}})
paging.set_prop("searchTheLatestTimeStampFromEventsList",
AAZStrType, ".search_the_latest_time_stamp_from_events_list")
request = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.request")
if request is not None:
request.set_prop("apiEndpoint", AAZStrType, ".api_endpoint", typ_kwargs={
"flags": {"required": True}})
request.set_prop("endTimeAttributeName",
AAZStrType, ".end_time_attribute_name")
request.set_prop("httpMethod", AAZStrType, ".http_method", typ_kwargs={
"flags": {"required": True}})
request.set_prop("queryParametersTemplate",
AAZStrType, ".query_parameters_template")
request.set_prop("queryTimeFormat", AAZStrType, ".query_time_format", typ_kwargs={
"flags": {"required": True}})
request.set_prop("queryWindowInMin", AAZIntType, ".query_window_in_min", typ_kwargs={
"flags": {"required": True}})
request.set_prop("rateLimitQps", AAZIntType, ".rate_limit_qps")
request.set_prop("retryCount", AAZIntType, ".retry_count")
request.set_prop("startTimeAttributeName",
AAZStrType, ".start_time_attribute_name")
request.set_prop("timeoutInSeconds",
AAZIntType, ".timeout_in_seconds")
response = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.response")
if response is not None:
response.set_prop("eventsJsonPaths", AAZListType, ".events_json_paths", typ_kwargs={
"flags": {"required": True}})
response.set_prop("isGzipCompressed",
AAZBoolType, ".is_gzip_compressed")
response.set_prop("successStatusJsonPath",
AAZStrType, ".success_status_json_path")
response.set_prop("successStatusValue",
AAZStrType, ".success_status_value")
events_json_paths = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.response.eventsJsonPaths")
if events_json_paths is not None:
events_json_paths.set_elements(AAZStrType, ".")
disc_amazon_web_services_cloud_trail = _builder.get(
"{kind:AmazonWebServicesCloudTrail}")
if disc_amazon_web_services_cloud_trail is not None:
disc_amazon_web_services_cloud_trail.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties")
if properties is not None:
properties.set_prop("awsRoleArn", AAZStrType,
".aws_cloud_trail.aws_role_arn")
properties.set_prop("dataTypes", AAZObjectType, ".aws_cloud_trail.data_types", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_amazon_web_services_s3 = _builder.get(
"{kind:AmazonWebServicesS3}")
if disc_amazon_web_services_s3 is not None:
disc_amazon_web_services_s3.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AmazonWebServicesS3}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".aws_s3.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("destinationTable", AAZStrType, ".aws_s3.destination_table", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("roleArn", AAZStrType, ".aws_s3.role_arn", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("sqsUrls", AAZListType, ".aws_s3.sqs_urls", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:AmazonWebServicesS3}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:AmazonWebServicesS3}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
sqs_urls = _builder.get(
"{kind:AmazonWebServicesS3}.properties.sqsUrls")
if sqs_urls is not None:
sqs_urls.set_elements(AAZStrType, ".")
disc_azure_active_directory = _builder.get(
"{kind:AzureActiveDirectory}")
if disc_azure_active_directory is not None:
disc_azure_active_directory.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AzureActiveDirectory}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(properties.set_prop(
"dataTypes", AAZObjectType, ".azure_active_directory.data_types"))
properties.set_prop("tenantId", AAZStrType, ".azure_active_directory.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_azure_advanced_threat_protection = _builder.get(
"{kind:AzureAdvancedThreatProtection}")
if disc_azure_advanced_threat_protection is not None:
disc_azure_advanced_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:AzureAdvancedThreatProtection}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(
properties.set_prop("dataTypes", AAZObjectType, ".azure_protection.data_types"))
properties.set_prop("tenantId", AAZStrType, ".azure_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_azure_security_center = _builder.get(
"{kind:AzureSecurityCenter}")
if disc_azure_security_center is not None:
disc_azure_security_center.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AzureSecurityCenter}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(properties.set_prop(
"dataTypes", AAZObjectType, ".azure_security_center.data_types"))
properties.set_prop(
"subscriptionId", AAZStrType, ".azure_security_center.subscription_id")
disc_dynamics365 = _builder.get("{kind:Dynamics365}")
if disc_dynamics365 is not None:
disc_dynamics365.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Dynamics365}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".dynamics365.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".dynamics365.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:Dynamics365}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("dynamics365CdsActivities", AAZObjectType,
".dynamics365_cds_activities", typ_kwargs={"flags": {"required": True}})
dynamics365_cds_activities = _builder.get(
"{kind:Dynamics365}.properties.dataTypes.dynamics365CdsActivities")
if dynamics365_cds_activities is not None:
dynamics365_cds_activities.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_generic_ui = _builder.get("{kind:GenericUI}")
if disc_generic_ui is not None:
disc_generic_ui.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:GenericUI}.properties")
if properties is not None:
_build_schema_codeless_ui_connector_config_properties_update(properties.set_prop(
"connectorUiConfig", AAZObjectType, ".generic_ui.connector_ui_config"))
disc_iot = _builder.get("{kind:IOT}")
if disc_iot is not None:
disc_iot.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:IOT}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(
properties.set_prop("dataTypes", AAZObjectType, ".iot.data_types"))
properties.set_prop(
"subscriptionId", AAZStrType, ".iot.subscription_id")
disc_microsoft_cloud_app_security = _builder.get(
"{kind:MicrosoftCloudAppSecurity}")
if disc_microsoft_cloud_app_security is not None:
disc_microsoft_cloud_app_security.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftCloudAppSecurity}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".cloud_app_security.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".cloud_app_security.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftCloudAppSecurity}.properties.dataTypes")
if data_types is not None:
_build_schema_data_connector_data_type_common_update(data_types.set_prop(
"alerts", AAZObjectType, ".alerts", typ_kwargs={"flags": {"required": True}}))
_build_schema_data_connector_data_type_common_update(
data_types.set_prop("discoveryLogs", AAZObjectType, ".discovery_logs"))
disc_microsoft_defender_advanced_threat_protection = _builder.get(
"{kind:MicrosoftDefenderAdvancedThreatProtection}")
if disc_microsoft_defender_advanced_threat_protection is not None:
disc_microsoft_defender_advanced_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftDefenderAdvancedThreatProtection}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(properties.set_prop(
"dataTypes", AAZObjectType, ".defender_protection.data_types"))
properties.set_prop("tenantId", AAZStrType, ".defender_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_microsoft_threat_intelligence = _builder.get(
"{kind:MicrosoftThreatIntelligence}")
if disc_microsoft_threat_intelligence is not None:
disc_microsoft_threat_intelligence.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".microsoft_intelligence.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".microsoft_intelligence.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("bingSafetyPhishingURL", AAZObjectType,
".bing_safety_phishing_url", typ_kwargs={"flags": {"required": True}})
data_types.set_prop("microsoftEmergingThreatFeed", AAZObjectType,
".microsoft_emerging_threat_feed", typ_kwargs={"flags": {"required": True}})
bing_safety_phishing_url = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes.bingSafetyPhishingURL")
if bing_safety_phishing_url is not None:
bing_safety_phishing_url.set_prop(
"lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
bing_safety_phishing_url.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
microsoft_emerging_threat_feed = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes.microsoftEmergingThreatFeed")
if microsoft_emerging_threat_feed is not None:
microsoft_emerging_threat_feed.set_prop(
"lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
microsoft_emerging_threat_feed.set_prop(
"state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})
disc_microsoft_threat_protection = _builder.get(
"{kind:MicrosoftThreatProtection}")
if disc_microsoft_threat_protection is not None:
disc_microsoft_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftThreatProtection}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".microsoft_protection.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".microsoft_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftThreatProtection}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("incidents", AAZObjectType, ".incidents", typ_kwargs={
"flags": {"required": True}})
incidents = _builder.get(
"{kind:MicrosoftThreatProtection}.properties.dataTypes.incidents")
if incidents is not None:
incidents.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_office365 = _builder.get("{kind:Office365}")
if disc_office365 is not None:
disc_office365.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Office365}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office365.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office365.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get("{kind:Office365}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("exchange", AAZObjectType, ".exchange", typ_kwargs={
"flags": {"required": True}})
data_types.set_prop("sharePoint", AAZObjectType, ".share_point", typ_kwargs={
"flags": {"required": True}})
data_types.set_prop("teams", AAZObjectType, ".teams", typ_kwargs={
"flags": {"required": True}})
exchange = _builder.get(
"{kind:Office365}.properties.dataTypes.exchange")
if exchange is not None:
exchange.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
share_point = _builder.get(
"{kind:Office365}.properties.dataTypes.sharePoint")
if share_point is not None:
share_point.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
teams = _builder.get("{kind:Office365}.properties.dataTypes.teams")
if teams is not None:
teams.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_office365_project = _builder.get("{kind:Office365Project}")
if disc_office365_project is not None:
disc_office365_project.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Office365Project}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office365_project.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office365_project.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:Office365Project}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:Office365Project}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_office_atp = _builder.get("{kind:OfficeATP}")
if disc_office_atp is not None:
disc_office_atp.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficeATP}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(
properties.set_prop("dataTypes", AAZObjectType, ".office_atp.data_types"))
properties.set_prop("tenantId", AAZStrType, ".office_atp.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_office_irm = _builder.get("{kind:OfficeIRM}")
if disc_office_irm is not None:
disc_office_irm.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficeIRM}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_update(
properties.set_prop("dataTypes", AAZObjectType, ".office_irm.data_types"))
properties.set_prop("tenantId", AAZStrType, ".office_irm.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_office_power_bi = _builder.get("{kind:OfficePowerBI}")
if disc_office_power_bi is not None:
disc_office_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficePowerBI}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office_power_bi.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office_power_bi.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:OfficePowerBI}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:OfficePowerBI}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_threat_intelligence = _builder.get(
"{kind:ThreatIntelligence}")
if disc_threat_intelligence is not None:
disc_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:ThreatIntelligence}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".threat_intelligence.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".threat_intelligence.tenant_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tipLookbackPeriod", AAZStrType,
".threat_intelligence.tip_lookback_period", typ_kwargs={"nullable": True})
data_types = _builder.get(
"{kind:ThreatIntelligence}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("indicators", AAZObjectType, ".indicators", typ_kwargs={
"flags": {"required": True}})
indicators = _builder.get(
"{kind:ThreatIntelligence}.properties.dataTypes.indicators")
if indicators is not None:
indicators.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_threat_intelligence_taxii = _builder.get(
"{kind:ThreatIntelligenceTaxii}")
if disc_threat_intelligence_taxii is not None:
disc_threat_intelligence_taxii.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties")
if properties is not None:
properties.set_prop("collectionId", AAZStrType,
".intelligence_taxii.collection_id")
properties.set_prop("dataTypes", AAZObjectType, ".intelligence_taxii.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("friendlyName", AAZStrType,
".intelligence_taxii.friendly_name")
properties.set_prop("password", AAZStrType,
".intelligence_taxii.password")
properties.set_prop("pollingFrequency", AAZStrType, ".intelligence_taxii.polling_frequency", typ_kwargs={
"flags": {"required": True}, "nullable": True})
properties.set_prop("taxiiLookbackPeriod", AAZStrType,
".intelligence_taxii.taxii_lookback_period", typ_kwargs={"nullable": True})
properties.set_prop("taxiiServer", AAZStrType,
".intelligence_taxii.taxii_server")
properties.set_prop("tenantId", AAZStrType, ".intelligence_taxii.tenant_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("userName", AAZStrType,
".intelligence_taxii.user_name")
properties.set_prop("workspaceId", AAZStrType,
".intelligence_taxii.workspace_id")
data_types = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("taxiiClient", AAZObjectType, ".taxii_client", typ_kwargs={
"flags": {"required": True}})
taxii_client = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties.dataTypes.taxiiClient")
if taxii_client is not None:
taxii_client.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 202 | 36 | 166 | 0 | 37 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 407 | 74 | 333 | 43 | 330 | 0 | 329 | 43 | 326 | 72 | 1 | 1 | 73 |
9,609 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_update.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._update.Update.DataConnectorsGet
|
class DataConnectorsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_build_schema_data_connector_read(cls._schema_on_200)
return cls._schema_on_200
|
class DataConnectorsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,610 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_update.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._update.Update.DataConnectorsCreateOrUpdate
|
class DataConnectorsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_build_schema_data_connector_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class DataConnectorsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 98 | 15 | 83 | 28 | 64 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
9,611 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_show.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._show.Show.DataConnectorsGet
|
class DataConnectorsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType()
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.kind = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
disc_api_polling = cls._schema_on_200.discriminate_by(
"kind", "APIPolling")
disc_api_polling.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
properties.polling_config = AAZObjectType(
serialized_name="pollingConfig",
)
polling_config = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config
polling_config.auth = AAZObjectType(
flags={"required": True},
)
polling_config.is_active = AAZBoolType(
serialized_name="isActive",
)
polling_config.paging = AAZObjectType()
polling_config.request = AAZObjectType(
flags={"required": True},
)
polling_config.response = AAZObjectType()
auth = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config.auth
auth.api_key_identifier = AAZStrType(
serialized_name="apiKeyIdentifier",
)
auth.api_key_name = AAZStrType(
serialized_name="apiKeyName",
)
auth.auth_type = AAZStrType(
serialized_name="authType",
flags={"required": True},
)
auth.authorization_endpoint = AAZStrType(
serialized_name="authorizationEndpoint",
)
auth.flow_name = AAZStrType(
serialized_name="flowName",
)
auth.is_api_key_in_post_payload = AAZStrType(
serialized_name="isApiKeyInPostPayload",
)
auth.is_client_secret_in_header = AAZBoolType(
serialized_name="isClientSecretInHeader",
)
auth.redirection_endpoint = AAZStrType(
serialized_name="redirectionEndpoint",
)
auth.scope = AAZStrType()
auth.token_endpoint = AAZStrType(
serialized_name="tokenEndpoint",
)
paging = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config.paging
paging.next_page_para_name = AAZStrType(
serialized_name="nextPageParaName",
)
paging.next_page_token_json_path = AAZStrType(
serialized_name="nextPageTokenJsonPath",
)
paging.page_count_attribute_path = AAZStrType(
serialized_name="pageCountAttributePath",
)
paging.page_size = AAZIntType(
serialized_name="pageSize",
)
paging.page_size_para_name = AAZStrType(
serialized_name="pageSizeParaName",
)
paging.page_time_stamp_attribute_path = AAZStrType(
serialized_name="pageTimeStampAttributePath",
)
paging.page_total_count_attribute_path = AAZStrType(
serialized_name="pageTotalCountAttributePath",
)
paging.paging_type = AAZStrType(
serialized_name="pagingType",
flags={"required": True},
)
paging.search_the_latest_time_stamp_from_events_list = AAZStrType(
serialized_name="searchTheLatestTimeStampFromEventsList",
)
request = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config.request
request.api_endpoint = AAZStrType(
serialized_name="apiEndpoint",
flags={"required": True},
)
request.end_time_attribute_name = AAZStrType(
serialized_name="endTimeAttributeName",
)
request.http_method = AAZStrType(
serialized_name="httpMethod",
flags={"required": True},
)
request.query_parameters_template = AAZStrType(
serialized_name="queryParametersTemplate",
)
request.query_time_format = AAZStrType(
serialized_name="queryTimeFormat",
flags={"required": True},
)
request.query_window_in_min = AAZIntType(
serialized_name="queryWindowInMin",
flags={"required": True},
)
request.rate_limit_qps = AAZIntType(
serialized_name="rateLimitQps",
)
request.retry_count = AAZIntType(
serialized_name="retryCount",
)
request.start_time_attribute_name = AAZStrType(
serialized_name="startTimeAttributeName",
)
request.timeout_in_seconds = AAZIntType(
serialized_name="timeoutInSeconds",
)
response = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config.response
response.events_json_paths = AAZListType(
serialized_name="eventsJsonPaths",
flags={"required": True},
)
response.is_gzip_compressed = AAZBoolType(
serialized_name="isGzipCompressed",
)
response.success_status_json_path = AAZStrType(
serialized_name="successStatusJsonPath",
)
response.success_status_value = AAZStrType(
serialized_name="successStatusValue",
)
events_json_paths = cls._schema_on_200.discriminate_by(
"kind", "APIPolling").properties.polling_config.response.events_json_paths
events_json_paths.Element = AAZStrType()
disc_amazon_web_services_cloud_trail = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesCloudTrail")
disc_amazon_web_services_cloud_trail.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties
properties.aws_role_arn = AAZStrType(
serialized_name="awsRoleArn",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_amazon_web_services_s3 = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesS3")
disc_amazon_web_services_s3.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesS3").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.destination_table = AAZStrType(
serialized_name="destinationTable",
flags={"required": True},
)
properties.role_arn = AAZStrType(
serialized_name="roleArn",
flags={"required": True},
)
properties.sqs_urls = AAZListType(
serialized_name="sqsUrls",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
sqs_urls = cls._schema_on_200.discriminate_by(
"kind", "AmazonWebServicesS3").properties.sqs_urls
sqs_urls.Element = AAZStrType()
disc_azure_active_directory = cls._schema_on_200.discriminate_by(
"kind", "AzureActiveDirectory")
disc_azure_active_directory.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "AzureActiveDirectory").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_advanced_threat_protection = cls._schema_on_200.discriminate_by(
"kind", "AzureAdvancedThreatProtection")
disc_azure_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "AzureAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_security_center = cls._schema_on_200.discriminate_by(
"kind", "AzureSecurityCenter")
disc_azure_security_center.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "AzureSecurityCenter").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_dynamics365 = cls._schema_on_200.discriminate_by(
"kind", "Dynamics365")
disc_dynamics365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Dynamics365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "Dynamics365").properties.data_types
data_types.dynamics365_cds_activities = AAZObjectType(
serialized_name="dynamics365CdsActivities",
flags={"required": True},
)
dynamics365_cds_activities = cls._schema_on_200.discriminate_by(
"kind", "Dynamics365").properties.data_types.dynamics365_cds_activities
dynamics365_cds_activities.state = AAZStrType(
flags={"required": True},
)
disc_generic_ui = cls._schema_on_200.discriminate_by(
"kind", "GenericUI")
disc_generic_ui.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "GenericUI").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
disc_iot = cls._schema_on_200.discriminate_by("kind", "IOT")
disc_iot.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "IOT").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_microsoft_cloud_app_security = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftCloudAppSecurity")
disc_microsoft_cloud_app_security.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties.data_types
data_types.alerts = AAZObjectType(
flags={"required": True},
)
_build_schema_data_connector_data_type_common_read(
data_types.alerts)
data_types.discovery_logs = AAZObjectType(
serialized_name="discoveryLogs",
)
_build_schema_data_connector_data_type_common_read(
data_types.discovery_logs)
disc_microsoft_defender_advanced_threat_protection = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection")
disc_microsoft_defender_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_microsoft_threat_intelligence = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatIntelligence")
disc_microsoft_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types
data_types.bing_safety_phishing_url = AAZObjectType(
serialized_name="bingSafetyPhishingURL",
flags={"required": True},
)
data_types.microsoft_emerging_threat_feed = AAZObjectType(
serialized_name="microsoftEmergingThreatFeed",
flags={"required": True},
)
bing_safety_phishing_url = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.bing_safety_phishing_url
bing_safety_phishing_url.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
bing_safety_phishing_url.state = AAZStrType(
flags={"required": True},
)
microsoft_emerging_threat_feed = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.microsoft_emerging_threat_feed
microsoft_emerging_threat_feed.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
microsoft_emerging_threat_feed.state = AAZStrType(
flags={"required": True},
)
disc_microsoft_threat_protection = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatProtection")
disc_microsoft_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types
data_types.incidents = AAZObjectType(
flags={"required": True},
)
incidents = cls._schema_on_200.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types.incidents
incidents.state = AAZStrType(
flags={"required": True},
)
disc_office365 = cls._schema_on_200.discriminate_by(
"kind", "Office365")
disc_office365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Office365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "Office365").properties.data_types
data_types.exchange = AAZObjectType(
flags={"required": True},
)
data_types.share_point = AAZObjectType(
serialized_name="sharePoint",
flags={"required": True},
)
data_types.teams = AAZObjectType(
flags={"required": True},
)
exchange = cls._schema_on_200.discriminate_by(
"kind", "Office365").properties.data_types.exchange
exchange.state = AAZStrType(
flags={"required": True},
)
share_point = cls._schema_on_200.discriminate_by(
"kind", "Office365").properties.data_types.share_point
share_point.state = AAZStrType(
flags={"required": True},
)
teams = cls._schema_on_200.discriminate_by(
"kind", "Office365").properties.data_types.teams
teams.state = AAZStrType(
flags={"required": True},
)
disc_office365_project = cls._schema_on_200.discriminate_by(
"kind", "Office365Project")
disc_office365_project.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "Office365Project").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "Office365Project").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.discriminate_by(
"kind", "Office365Project").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_office_atp = cls._schema_on_200.discriminate_by(
"kind", "OfficeATP")
disc_office_atp.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "OfficeATP").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_irm = cls._schema_on_200.discriminate_by(
"kind", "OfficeIRM")
disc_office_irm.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "OfficeIRM").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_power_bi = cls._schema_on_200.discriminate_by(
"kind", "OfficePowerBI")
disc_office_power_bi.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "OfficePowerBI").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "OfficePowerBI").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.discriminate_by(
"kind", "OfficePowerBI").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligence")
disc_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.tip_lookback_period = AAZStrType(
serialized_name="tipLookbackPeriod",
nullable=True,
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types
data_types.indicators = AAZObjectType(
flags={"required": True},
)
indicators = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types.indicators
indicators.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence_taxii = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligenceTaxii")
disc_threat_intelligence_taxii.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties
properties.collection_id = AAZStrType(
serialized_name="collectionId",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.password = AAZStrType()
properties.polling_frequency = AAZStrType(
serialized_name="pollingFrequency",
flags={"required": True},
nullable=True,
)
properties.taxii_lookback_period = AAZStrType(
serialized_name="taxiiLookbackPeriod",
nullable=True,
)
properties.taxii_server = AAZStrType(
serialized_name="taxiiServer",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.user_name = AAZStrType(
serialized_name="userName",
)
properties.workspace_id = AAZStrType(
serialized_name="workspaceId",
)
data_types = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types
data_types.taxii_client = AAZObjectType(
serialized_name="taxiiClient",
flags={"required": True},
)
taxii_client = cls._schema_on_200.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types.taxii_client
taxii_client.state = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class DataConnectorsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 80 | 8 | 71 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 737 | 86 | 651 | 66 | 634 | 0 | 268 | 59 | 258 | 2 | 1 | 1 | 11 |
9,612 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_list.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._list.List.DataConnectorsList
|
class DataConnectorsList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
disc_api_polling = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling")
disc_api_polling.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
properties.polling_config = AAZObjectType(
serialized_name="pollingConfig",
)
polling_config = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config
polling_config.auth = AAZObjectType(
flags={"required": True},
)
polling_config.is_active = AAZBoolType(
serialized_name="isActive",
)
polling_config.paging = AAZObjectType()
polling_config.request = AAZObjectType(
flags={"required": True},
)
polling_config.response = AAZObjectType()
auth = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config.auth
auth.api_key_identifier = AAZStrType(
serialized_name="apiKeyIdentifier",
)
auth.api_key_name = AAZStrType(
serialized_name="apiKeyName",
)
auth.auth_type = AAZStrType(
serialized_name="authType",
flags={"required": True},
)
auth.authorization_endpoint = AAZStrType(
serialized_name="authorizationEndpoint",
)
auth.flow_name = AAZStrType(
serialized_name="flowName",
)
auth.is_api_key_in_post_payload = AAZStrType(
serialized_name="isApiKeyInPostPayload",
)
auth.is_client_secret_in_header = AAZBoolType(
serialized_name="isClientSecretInHeader",
)
auth.redirection_endpoint = AAZStrType(
serialized_name="redirectionEndpoint",
)
auth.scope = AAZStrType()
auth.token_endpoint = AAZStrType(
serialized_name="tokenEndpoint",
)
paging = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config.paging
paging.next_page_para_name = AAZStrType(
serialized_name="nextPageParaName",
)
paging.next_page_token_json_path = AAZStrType(
serialized_name="nextPageTokenJsonPath",
)
paging.page_count_attribute_path = AAZStrType(
serialized_name="pageCountAttributePath",
)
paging.page_size = AAZIntType(
serialized_name="pageSize",
)
paging.page_size_para_name = AAZStrType(
serialized_name="pageSizeParaName",
)
paging.page_time_stamp_attribute_path = AAZStrType(
serialized_name="pageTimeStampAttributePath",
)
paging.page_total_count_attribute_path = AAZStrType(
serialized_name="pageTotalCountAttributePath",
)
paging.paging_type = AAZStrType(
serialized_name="pagingType",
flags={"required": True},
)
paging.search_the_latest_time_stamp_from_events_list = AAZStrType(
serialized_name="searchTheLatestTimeStampFromEventsList",
)
request = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config.request
request.api_endpoint = AAZStrType(
serialized_name="apiEndpoint",
flags={"required": True},
)
request.end_time_attribute_name = AAZStrType(
serialized_name="endTimeAttributeName",
)
request.http_method = AAZStrType(
serialized_name="httpMethod",
flags={"required": True},
)
request.query_parameters_template = AAZStrType(
serialized_name="queryParametersTemplate",
)
request.query_time_format = AAZStrType(
serialized_name="queryTimeFormat",
flags={"required": True},
)
request.query_window_in_min = AAZIntType(
serialized_name="queryWindowInMin",
flags={"required": True},
)
request.rate_limit_qps = AAZIntType(
serialized_name="rateLimitQps",
)
request.retry_count = AAZIntType(
serialized_name="retryCount",
)
request.start_time_attribute_name = AAZStrType(
serialized_name="startTimeAttributeName",
)
request.timeout_in_seconds = AAZIntType(
serialized_name="timeoutInSeconds",
)
response = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config.response
response.events_json_paths = AAZListType(
serialized_name="eventsJsonPaths",
flags={"required": True},
)
response.is_gzip_compressed = AAZBoolType(
serialized_name="isGzipCompressed",
)
response.success_status_json_path = AAZStrType(
serialized_name="successStatusJsonPath",
)
response.success_status_value = AAZStrType(
serialized_name="successStatusValue",
)
events_json_paths = cls._schema_on_200.value.Element.discriminate_by(
"kind", "APIPolling").properties.polling_config.response.events_json_paths
events_json_paths.Element = AAZStrType()
disc_amazon_web_services_cloud_trail = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesCloudTrail")
disc_amazon_web_services_cloud_trail.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties
properties.aws_role_arn = AAZStrType(
serialized_name="awsRoleArn",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_amazon_web_services_s3 = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesS3")
disc_amazon_web_services_s3.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesS3").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.destination_table = AAZStrType(
serialized_name="destinationTable",
flags={"required": True},
)
properties.role_arn = AAZStrType(
serialized_name="roleArn",
flags={"required": True},
)
properties.sqs_urls = AAZListType(
serialized_name="sqsUrls",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
sqs_urls = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AmazonWebServicesS3").properties.sqs_urls
sqs_urls.Element = AAZStrType()
disc_azure_active_directory = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureActiveDirectory")
disc_azure_active_directory.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureActiveDirectory").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_advanced_threat_protection = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureAdvancedThreatProtection")
disc_azure_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_security_center = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureSecurityCenter")
disc_azure_security_center.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "AzureSecurityCenter").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_dynamics365 = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Dynamics365")
disc_dynamics365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Dynamics365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Dynamics365").properties.data_types
data_types.dynamics365_cds_activities = AAZObjectType(
serialized_name="dynamics365CdsActivities",
flags={"required": True},
)
dynamics365_cds_activities = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Dynamics365").properties.data_types.dynamics365_cds_activities
dynamics365_cds_activities.state = AAZStrType(
flags={"required": True},
)
disc_generic_ui = cls._schema_on_200.value.Element.discriminate_by(
"kind", "GenericUI")
disc_generic_ui.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "GenericUI").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
disc_iot = cls._schema_on_200.value.Element.discriminate_by(
"kind", "IOT")
disc_iot.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "IOT").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_microsoft_cloud_app_security = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftCloudAppSecurity")
disc_microsoft_cloud_app_security.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties.data_types
data_types.alerts = AAZObjectType(
flags={"required": True},
)
_build_schema_data_connector_data_type_common_read(
data_types.alerts)
data_types.discovery_logs = AAZObjectType(
serialized_name="discoveryLogs",
)
_build_schema_data_connector_data_type_common_read(
data_types.discovery_logs)
disc_microsoft_defender_advanced_threat_protection = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection")
disc_microsoft_defender_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_microsoft_threat_intelligence = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatIntelligence")
disc_microsoft_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types
data_types.bing_safety_phishing_url = AAZObjectType(
serialized_name="bingSafetyPhishingURL",
flags={"required": True},
)
data_types.microsoft_emerging_threat_feed = AAZObjectType(
serialized_name="microsoftEmergingThreatFeed",
flags={"required": True},
)
bing_safety_phishing_url = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.bing_safety_phishing_url
bing_safety_phishing_url.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
bing_safety_phishing_url.state = AAZStrType(
flags={"required": True},
)
microsoft_emerging_threat_feed = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.microsoft_emerging_threat_feed
microsoft_emerging_threat_feed.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
microsoft_emerging_threat_feed.state = AAZStrType(
flags={"required": True},
)
disc_microsoft_threat_protection = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatProtection")
disc_microsoft_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types
data_types.incidents = AAZObjectType(
flags={"required": True},
)
incidents = cls._schema_on_200.value.Element.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types.incidents
incidents.state = AAZStrType(
flags={"required": True},
)
disc_office365 = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365")
disc_office365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365").properties.data_types
data_types.exchange = AAZObjectType(
flags={"required": True},
)
data_types.share_point = AAZObjectType(
serialized_name="sharePoint",
flags={"required": True},
)
data_types.teams = AAZObjectType(
flags={"required": True},
)
exchange = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365").properties.data_types.exchange
exchange.state = AAZStrType(
flags={"required": True},
)
share_point = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365").properties.data_types.share_point
share_point.state = AAZStrType(
flags={"required": True},
)
teams = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365").properties.data_types.teams
teams.state = AAZStrType(
flags={"required": True},
)
disc_office365_project = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365Project")
disc_office365_project.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365Project").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365Project").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.value.Element.discriminate_by(
"kind", "Office365Project").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_office_atp = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficeATP")
disc_office_atp.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficeATP").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_irm = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficeIRM")
disc_office_irm.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficeIRM").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_power_bi = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficePowerBI")
disc_office_power_bi.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficePowerBI").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficePowerBI").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200.value.Element.discriminate_by(
"kind", "OfficePowerBI").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligence")
disc_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.tip_lookback_period = AAZStrType(
serialized_name="tipLookbackPeriod",
nullable=True,
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types
data_types.indicators = AAZObjectType(
flags={"required": True},
)
indicators = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types.indicators
indicators.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence_taxii = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligenceTaxii")
disc_threat_intelligence_taxii.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties
properties.collection_id = AAZStrType(
serialized_name="collectionId",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.password = AAZStrType()
properties.polling_frequency = AAZStrType(
serialized_name="pollingFrequency",
flags={"required": True},
nullable=True,
)
properties.taxii_lookback_period = AAZStrType(
serialized_name="taxiiLookbackPeriod",
nullable=True,
)
properties.taxii_server = AAZStrType(
serialized_name="taxiiServer",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.user_name = AAZStrType(
serialized_name="userName",
)
properties.workspace_id = AAZStrType(
serialized_name="workspaceId",
)
data_types = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types
data_types.taxii_client = AAZObjectType(
serialized_name="taxiiClient",
flags={"required": True},
)
taxii_client = cls._schema_on_200.value.Element.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types.taxii_client
taxii_client.state = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class DataConnectorsList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 81 | 9 | 72 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 745 | 88 | 657 | 68 | 640 | 0 | 273 | 61 | 263 | 2 | 1 | 1 | 11 |
9,613 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_disconnect.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._disconnect.Disconnect.DataConnectorsDisconnect
|
class DataConnectorsDisconnect(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/disconnect",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
|
class DataConnectorsDisconnect(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
| 13 | 0 | 7 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 60 | 8 | 52 | 18 | 39 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
9,614 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_delete.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._delete.Delete.DataConnectorsDelete
|
class DataConnectorsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class DataConnectorsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 65 | 9 | 56 | 19 | 42 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,615 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_create.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._create.Create.DataConnectorsCreateOrUpdate
|
class DataConnectorsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("etag", AAZStrType, ".etag")
_builder.set_const("kind", "APIPolling", AAZStrType, ".api_polling", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "AmazonWebServicesCloudTrail", AAZStrType,
".aws_cloud_trail", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AmazonWebServicesS3", AAZStrType, ".aws_s3", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "AzureActiveDirectory", AAZStrType,
".azure_active_directory", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AzureAdvancedThreatProtection", AAZStrType,
".azure_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "AzureSecurityCenter", AAZStrType,
".azure_security_center", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "Dynamics365", AAZStrType, ".dynamics365", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "GenericUI", AAZStrType, ".generic_ui", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "IOT", AAZStrType, ".iot", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftCloudAppSecurity", AAZStrType,
".cloud_app_security", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftDefenderAdvancedThreatProtection",
AAZStrType, ".defender_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftThreatIntelligence", AAZStrType,
".microsoft_intelligence", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "MicrosoftThreatProtection", AAZStrType,
".microsoft_protection", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "Office365", AAZStrType, ".office365", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "Office365Project", AAZStrType,
".office365_project", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "OfficeATP", AAZStrType, ".office_atp", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "OfficeIRM", AAZStrType, ".office_irm", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "OfficePowerBI", AAZStrType, ".office_power_bi", typ_kwargs={
"flags": {"required": True}})
_builder.set_const("kind", "ThreatIntelligence", AAZStrType,
".threat_intelligence", typ_kwargs={"flags": {"required": True}})
_builder.set_const("kind", "ThreatIntelligenceTaxii", AAZStrType,
".intelligence_taxii", typ_kwargs={"flags": {"required": True}})
_builder.discriminate_by("kind", "APIPolling")
_builder.discriminate_by("kind", "AmazonWebServicesCloudTrail")
_builder.discriminate_by("kind", "AmazonWebServicesS3")
_builder.discriminate_by("kind", "AzureActiveDirectory")
_builder.discriminate_by("kind", "AzureAdvancedThreatProtection")
_builder.discriminate_by("kind", "AzureSecurityCenter")
_builder.discriminate_by("kind", "Dynamics365")
_builder.discriminate_by("kind", "GenericUI")
_builder.discriminate_by("kind", "IOT")
_builder.discriminate_by("kind", "MicrosoftCloudAppSecurity")
_builder.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection")
_builder.discriminate_by("kind", "MicrosoftThreatIntelligence")
_builder.discriminate_by("kind", "MicrosoftThreatProtection")
_builder.discriminate_by("kind", "Office365")
_builder.discriminate_by("kind", "Office365Project")
_builder.discriminate_by("kind", "OfficeATP")
_builder.discriminate_by("kind", "OfficeIRM")
_builder.discriminate_by("kind", "OfficePowerBI")
_builder.discriminate_by("kind", "ThreatIntelligence")
_builder.discriminate_by("kind", "ThreatIntelligenceTaxii")
disc_api_polling = _builder.get("{kind:APIPolling}")
if disc_api_polling is not None:
disc_api_polling.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:APIPolling}.properties")
if properties is not None:
_build_schema_codeless_ui_connector_config_properties_create(properties.set_prop(
"connectorUiConfig", AAZObjectType, ".api_polling.connector_ui_config"))
properties.set_prop(
"pollingConfig", AAZObjectType, ".api_polling.polling_config")
polling_config = _builder.get(
"{kind:APIPolling}.properties.pollingConfig")
if polling_config is not None:
polling_config.set_prop("auth", AAZObjectType, ".auth", typ_kwargs={
"flags": {"required": True}})
polling_config.set_prop("isActive", AAZBoolType, ".is_active")
polling_config.set_prop("paging", AAZObjectType, ".paging")
polling_config.set_prop("request", AAZObjectType, ".request", typ_kwargs={
"flags": {"required": True}})
polling_config.set_prop("response", AAZObjectType, ".response")
auth = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.auth")
if auth is not None:
auth.set_prop("apiKeyIdentifier", AAZStrType,
".api_key_identifier")
auth.set_prop("apiKeyName", AAZStrType, ".api_key_name")
auth.set_prop("authType", AAZStrType, ".auth_type",
typ_kwargs={"flags": {"required": True}})
auth.set_prop("authorizationEndpoint",
AAZStrType, ".authorization_endpoint")
auth.set_prop("flowName", AAZStrType, ".flow_name")
auth.set_prop("isApiKeyInPostPayload", AAZStrType,
".is_api_key_in_post_payload")
auth.set_prop("isClientSecretInHeader",
AAZBoolType, ".is_client_secret_in_header")
auth.set_prop("redirectionEndpoint", AAZStrType,
".redirection_endpoint")
auth.set_prop("scope", AAZStrType, ".scope")
auth.set_prop("tokenEndpoint", AAZStrType, ".token_endpoint")
paging = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.paging")
if paging is not None:
paging.set_prop("nextPageParaName", AAZStrType,
".next_page_para_name")
paging.set_prop("nextPageTokenJsonPath",
AAZStrType, ".next_page_token_json_path")
paging.set_prop("pageCountAttributePath",
AAZStrType, ".page_count_attribute_path")
paging.set_prop("pageSize", AAZIntType, ".page_size")
paging.set_prop("pageSizeParaName", AAZStrType,
".page_size_para_name")
paging.set_prop("pageTimeStampAttributePath",
AAZStrType, ".page_time_stamp_attribute_path")
paging.set_prop("pageTotalCountAttributePath",
AAZStrType, ".page_total_count_attribute_path")
paging.set_prop("pagingType", AAZStrType, ".paging_type", typ_kwargs={
"flags": {"required": True}})
paging.set_prop("searchTheLatestTimeStampFromEventsList",
AAZStrType, ".search_the_latest_time_stamp_from_events_list")
request = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.request")
if request is not None:
request.set_prop("apiEndpoint", AAZStrType, ".api_endpoint", typ_kwargs={
"flags": {"required": True}})
request.set_prop("endTimeAttributeName",
AAZStrType, ".end_time_attribute_name")
request.set_prop("httpMethod", AAZStrType, ".http_method", typ_kwargs={
"flags": {"required": True}})
request.set_prop("queryParametersTemplate",
AAZStrType, ".query_parameters_template")
request.set_prop("queryTimeFormat", AAZStrType, ".query_time_format", typ_kwargs={
"flags": {"required": True}})
request.set_prop("queryWindowInMin", AAZIntType, ".query_window_in_min", typ_kwargs={
"flags": {"required": True}})
request.set_prop("rateLimitQps", AAZIntType, ".rate_limit_qps")
request.set_prop("retryCount", AAZIntType, ".retry_count")
request.set_prop("startTimeAttributeName",
AAZStrType, ".start_time_attribute_name")
request.set_prop("timeoutInSeconds",
AAZIntType, ".timeout_in_seconds")
response = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.response")
if response is not None:
response.set_prop("eventsJsonPaths", AAZListType, ".events_json_paths", typ_kwargs={
"flags": {"required": True}})
response.set_prop("isGzipCompressed",
AAZBoolType, ".is_gzip_compressed")
response.set_prop("successStatusJsonPath",
AAZStrType, ".success_status_json_path")
response.set_prop("successStatusValue",
AAZStrType, ".success_status_value")
events_json_paths = _builder.get(
"{kind:APIPolling}.properties.pollingConfig.response.eventsJsonPaths")
if events_json_paths is not None:
events_json_paths.set_elements(AAZStrType, ".")
disc_amazon_web_services_cloud_trail = _builder.get(
"{kind:AmazonWebServicesCloudTrail}")
if disc_amazon_web_services_cloud_trail is not None:
disc_amazon_web_services_cloud_trail.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties")
if properties is not None:
properties.set_prop("awsRoleArn", AAZStrType,
".aws_cloud_trail.aws_role_arn")
properties.set_prop("dataTypes", AAZObjectType, ".aws_cloud_trail.data_types", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:AmazonWebServicesCloudTrail}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_amazon_web_services_s3 = _builder.get(
"{kind:AmazonWebServicesS3}")
if disc_amazon_web_services_s3 is not None:
disc_amazon_web_services_s3.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AmazonWebServicesS3}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".aws_s3.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("destinationTable", AAZStrType, ".aws_s3.destination_table", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("roleArn", AAZStrType, ".aws_s3.role_arn", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("sqsUrls", AAZListType, ".aws_s3.sqs_urls", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:AmazonWebServicesS3}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:AmazonWebServicesS3}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
sqs_urls = _builder.get(
"{kind:AmazonWebServicesS3}.properties.sqsUrls")
if sqs_urls is not None:
sqs_urls.set_elements(AAZStrType, ".")
disc_azure_active_directory = _builder.get(
"{kind:AzureActiveDirectory}")
if disc_azure_active_directory is not None:
disc_azure_active_directory.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AzureActiveDirectory}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(properties.set_prop(
"dataTypes", AAZObjectType, ".azure_active_directory.data_types"))
properties.set_prop("tenantId", AAZStrType, ".azure_active_directory.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_azure_advanced_threat_protection = _builder.get(
"{kind:AzureAdvancedThreatProtection}")
if disc_azure_advanced_threat_protection is not None:
disc_azure_advanced_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:AzureAdvancedThreatProtection}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(
properties.set_prop("dataTypes", AAZObjectType, ".azure_protection.data_types"))
properties.set_prop("tenantId", AAZStrType, ".azure_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_azure_security_center = _builder.get(
"{kind:AzureSecurityCenter}")
if disc_azure_security_center is not None:
disc_azure_security_center.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:AzureSecurityCenter}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(properties.set_prop(
"dataTypes", AAZObjectType, ".azure_security_center.data_types"))
properties.set_prop(
"subscriptionId", AAZStrType, ".azure_security_center.subscription_id")
disc_dynamics365 = _builder.get("{kind:Dynamics365}")
if disc_dynamics365 is not None:
disc_dynamics365.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Dynamics365}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".dynamics365.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".dynamics365.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:Dynamics365}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("dynamics365CdsActivities", AAZObjectType,
".dynamics365_cds_activities", typ_kwargs={"flags": {"required": True}})
dynamics365_cds_activities = _builder.get(
"{kind:Dynamics365}.properties.dataTypes.dynamics365CdsActivities")
if dynamics365_cds_activities is not None:
dynamics365_cds_activities.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_generic_ui = _builder.get("{kind:GenericUI}")
if disc_generic_ui is not None:
disc_generic_ui.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:GenericUI}.properties")
if properties is not None:
_build_schema_codeless_ui_connector_config_properties_create(properties.set_prop(
"connectorUiConfig", AAZObjectType, ".generic_ui.connector_ui_config"))
disc_iot = _builder.get("{kind:IOT}")
if disc_iot is not None:
disc_iot.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:IOT}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(
properties.set_prop("dataTypes", AAZObjectType, ".iot.data_types"))
properties.set_prop(
"subscriptionId", AAZStrType, ".iot.subscription_id")
disc_microsoft_cloud_app_security = _builder.get(
"{kind:MicrosoftCloudAppSecurity}")
if disc_microsoft_cloud_app_security is not None:
disc_microsoft_cloud_app_security.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftCloudAppSecurity}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".cloud_app_security.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".cloud_app_security.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftCloudAppSecurity}.properties.dataTypes")
if data_types is not None:
_build_schema_data_connector_data_type_common_create(data_types.set_prop(
"alerts", AAZObjectType, ".alerts", typ_kwargs={"flags": {"required": True}}))
_build_schema_data_connector_data_type_common_create(
data_types.set_prop("discoveryLogs", AAZObjectType, ".discovery_logs"))
disc_microsoft_defender_advanced_threat_protection = _builder.get(
"{kind:MicrosoftDefenderAdvancedThreatProtection}")
if disc_microsoft_defender_advanced_threat_protection is not None:
disc_microsoft_defender_advanced_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftDefenderAdvancedThreatProtection}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(properties.set_prop(
"dataTypes", AAZObjectType, ".defender_protection.data_types"))
properties.set_prop("tenantId", AAZStrType, ".defender_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_microsoft_threat_intelligence = _builder.get(
"{kind:MicrosoftThreatIntelligence}")
if disc_microsoft_threat_intelligence is not None:
disc_microsoft_threat_intelligence.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".microsoft_intelligence.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".microsoft_intelligence.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("bingSafetyPhishingURL", AAZObjectType,
".bing_safety_phishing_url", typ_kwargs={"flags": {"required": True}})
data_types.set_prop("microsoftEmergingThreatFeed", AAZObjectType,
".microsoft_emerging_threat_feed", typ_kwargs={"flags": {"required": True}})
bing_safety_phishing_url = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes.bingSafetyPhishingURL")
if bing_safety_phishing_url is not None:
bing_safety_phishing_url.set_prop(
"lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
bing_safety_phishing_url.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
microsoft_emerging_threat_feed = _builder.get(
"{kind:MicrosoftThreatIntelligence}.properties.dataTypes.microsoftEmergingThreatFeed")
if microsoft_emerging_threat_feed is not None:
microsoft_emerging_threat_feed.set_prop(
"lookbackPeriod", AAZStrType, ".lookback_period", typ_kwargs={"flags": {"required": True}})
microsoft_emerging_threat_feed.set_prop(
"state", AAZStrType, ".state", typ_kwargs={"flags": {"required": True}})
disc_microsoft_threat_protection = _builder.get(
"{kind:MicrosoftThreatProtection}")
if disc_microsoft_threat_protection is not None:
disc_microsoft_threat_protection.set_prop(
"properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:MicrosoftThreatProtection}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".microsoft_protection.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".microsoft_protection.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:MicrosoftThreatProtection}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("incidents", AAZObjectType, ".incidents", typ_kwargs={
"flags": {"required": True}})
incidents = _builder.get(
"{kind:MicrosoftThreatProtection}.properties.dataTypes.incidents")
if incidents is not None:
incidents.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_office365 = _builder.get("{kind:Office365}")
if disc_office365 is not None:
disc_office365.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Office365}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office365.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office365.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get("{kind:Office365}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("exchange", AAZObjectType, ".exchange", typ_kwargs={
"flags": {"required": True}})
data_types.set_prop("sharePoint", AAZObjectType, ".share_point", typ_kwargs={
"flags": {"required": True}})
data_types.set_prop("teams", AAZObjectType, ".teams", typ_kwargs={
"flags": {"required": True}})
exchange = _builder.get(
"{kind:Office365}.properties.dataTypes.exchange")
if exchange is not None:
exchange.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
share_point = _builder.get(
"{kind:Office365}.properties.dataTypes.sharePoint")
if share_point is not None:
share_point.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
teams = _builder.get("{kind:Office365}.properties.dataTypes.teams")
if teams is not None:
teams.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_office365_project = _builder.get("{kind:Office365Project}")
if disc_office365_project is not None:
disc_office365_project.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:Office365Project}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office365_project.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office365_project.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:Office365Project}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:Office365Project}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_office_atp = _builder.get("{kind:OfficeATP}")
if disc_office_atp is not None:
disc_office_atp.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficeATP}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(
properties.set_prop("dataTypes", AAZObjectType, ".office_atp.data_types"))
properties.set_prop("tenantId", AAZStrType, ".office_atp.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_office_irm = _builder.get("{kind:OfficeIRM}")
if disc_office_irm is not None:
disc_office_irm.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficeIRM}.properties")
if properties is not None:
_build_schema_alerts_data_type_of_data_connector_create(
properties.set_prop("dataTypes", AAZObjectType, ".office_irm.data_types"))
properties.set_prop("tenantId", AAZStrType, ".office_irm.tenant_id", typ_kwargs={
"flags": {"required": True}})
disc_office_power_bi = _builder.get("{kind:OfficePowerBI}")
if disc_office_power_bi is not None:
disc_office_power_bi.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:OfficePowerBI}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".office_power_bi.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".office_power_bi.tenant_id", typ_kwargs={
"flags": {"required": True}})
data_types = _builder.get(
"{kind:OfficePowerBI}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("logs", AAZObjectType, ".logs", typ_kwargs={
"flags": {"required": True}})
logs = _builder.get(
"{kind:OfficePowerBI}.properties.dataTypes.logs")
if logs is not None:
logs.set_prop("state", AAZStrType, ".state",
typ_kwargs={"flags": {"required": True}})
disc_threat_intelligence = _builder.get(
"{kind:ThreatIntelligence}")
if disc_threat_intelligence is not None:
disc_threat_intelligence.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get("{kind:ThreatIntelligence}.properties")
if properties is not None:
properties.set_prop("dataTypes", AAZObjectType, ".threat_intelligence.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tenantId", AAZStrType, ".threat_intelligence.tenant_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("tipLookbackPeriod", AAZStrType,
".threat_intelligence.tip_lookback_period", typ_kwargs={"nullable": True})
data_types = _builder.get(
"{kind:ThreatIntelligence}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("indicators", AAZObjectType, ".indicators", typ_kwargs={
"flags": {"required": True}})
indicators = _builder.get(
"{kind:ThreatIntelligence}.properties.dataTypes.indicators")
if indicators is not None:
indicators.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
disc_threat_intelligence_taxii = _builder.get(
"{kind:ThreatIntelligenceTaxii}")
if disc_threat_intelligence_taxii is not None:
disc_threat_intelligence_taxii.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties")
if properties is not None:
properties.set_prop("collectionId", AAZStrType,
".intelligence_taxii.collection_id")
properties.set_prop("dataTypes", AAZObjectType, ".intelligence_taxii.data_types", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("friendlyName", AAZStrType,
".intelligence_taxii.friendly_name")
properties.set_prop("password", AAZStrType,
".intelligence_taxii.password")
properties.set_prop("pollingFrequency", AAZStrType, ".intelligence_taxii.polling_frequency", typ_kwargs={
"flags": {"required": True}, "nullable": True})
properties.set_prop("taxiiLookbackPeriod", AAZStrType,
".intelligence_taxii.taxii_lookback_period", typ_kwargs={"nullable": True})
properties.set_prop("taxiiServer", AAZStrType,
".intelligence_taxii.taxii_server")
properties.set_prop("tenantId", AAZStrType, ".intelligence_taxii.tenant_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("userName", AAZStrType,
".intelligence_taxii.user_name")
properties.set_prop("workspaceId", AAZStrType,
".intelligence_taxii.workspace_id")
data_types = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties.dataTypes")
if data_types is not None:
data_types.set_prop("taxiiClient", AAZObjectType, ".taxii_client", typ_kwargs={
"flags": {"required": True}})
taxii_client = _builder.get(
"{kind:ThreatIntelligenceTaxii}.properties.dataTypes.taxiiClient")
if taxii_client is not None:
taxii_client.set_prop("state", AAZStrType, ".state", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType()
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.kind = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
disc_api_polling = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling")
disc_api_polling.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
properties.polling_config = AAZObjectType(
serialized_name="pollingConfig",
)
polling_config = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config
polling_config.auth = AAZObjectType(
flags={"required": True},
)
polling_config.is_active = AAZBoolType(
serialized_name="isActive",
)
polling_config.paging = AAZObjectType()
polling_config.request = AAZObjectType(
flags={"required": True},
)
polling_config.response = AAZObjectType()
auth = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config.auth
auth.api_key_identifier = AAZStrType(
serialized_name="apiKeyIdentifier",
)
auth.api_key_name = AAZStrType(
serialized_name="apiKeyName",
)
auth.auth_type = AAZStrType(
serialized_name="authType",
flags={"required": True},
)
auth.authorization_endpoint = AAZStrType(
serialized_name="authorizationEndpoint",
)
auth.flow_name = AAZStrType(
serialized_name="flowName",
)
auth.is_api_key_in_post_payload = AAZStrType(
serialized_name="isApiKeyInPostPayload",
)
auth.is_client_secret_in_header = AAZBoolType(
serialized_name="isClientSecretInHeader",
)
auth.redirection_endpoint = AAZStrType(
serialized_name="redirectionEndpoint",
)
auth.scope = AAZStrType()
auth.token_endpoint = AAZStrType(
serialized_name="tokenEndpoint",
)
paging = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config.paging
paging.next_page_para_name = AAZStrType(
serialized_name="nextPageParaName",
)
paging.next_page_token_json_path = AAZStrType(
serialized_name="nextPageTokenJsonPath",
)
paging.page_count_attribute_path = AAZStrType(
serialized_name="pageCountAttributePath",
)
paging.page_size = AAZIntType(
serialized_name="pageSize",
)
paging.page_size_para_name = AAZStrType(
serialized_name="pageSizeParaName",
)
paging.page_time_stamp_attribute_path = AAZStrType(
serialized_name="pageTimeStampAttributePath",
)
paging.page_total_count_attribute_path = AAZStrType(
serialized_name="pageTotalCountAttributePath",
)
paging.paging_type = AAZStrType(
serialized_name="pagingType",
flags={"required": True},
)
paging.search_the_latest_time_stamp_from_events_list = AAZStrType(
serialized_name="searchTheLatestTimeStampFromEventsList",
)
request = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config.request
request.api_endpoint = AAZStrType(
serialized_name="apiEndpoint",
flags={"required": True},
)
request.end_time_attribute_name = AAZStrType(
serialized_name="endTimeAttributeName",
)
request.http_method = AAZStrType(
serialized_name="httpMethod",
flags={"required": True},
)
request.query_parameters_template = AAZStrType(
serialized_name="queryParametersTemplate",
)
request.query_time_format = AAZStrType(
serialized_name="queryTimeFormat",
flags={"required": True},
)
request.query_window_in_min = AAZIntType(
serialized_name="queryWindowInMin",
flags={"required": True},
)
request.rate_limit_qps = AAZIntType(
serialized_name="rateLimitQps",
)
request.retry_count = AAZIntType(
serialized_name="retryCount",
)
request.start_time_attribute_name = AAZStrType(
serialized_name="startTimeAttributeName",
)
request.timeout_in_seconds = AAZIntType(
serialized_name="timeoutInSeconds",
)
response = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config.response
response.events_json_paths = AAZListType(
serialized_name="eventsJsonPaths",
flags={"required": True},
)
response.is_gzip_compressed = AAZBoolType(
serialized_name="isGzipCompressed",
)
response.success_status_json_path = AAZStrType(
serialized_name="successStatusJsonPath",
)
response.success_status_value = AAZStrType(
serialized_name="successStatusValue",
)
events_json_paths = cls._schema_on_200_201.discriminate_by(
"kind", "APIPolling").properties.polling_config.response.events_json_paths
events_json_paths.Element = AAZStrType()
disc_amazon_web_services_cloud_trail = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesCloudTrail")
disc_amazon_web_services_cloud_trail.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties
properties.aws_role_arn = AAZStrType(
serialized_name="awsRoleArn",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesCloudTrail").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_amazon_web_services_s3 = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesS3")
disc_amazon_web_services_s3.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesS3").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.destination_table = AAZStrType(
serialized_name="destinationTable",
flags={"required": True},
)
properties.role_arn = AAZStrType(
serialized_name="roleArn",
flags={"required": True},
)
properties.sqs_urls = AAZListType(
serialized_name="sqsUrls",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesS3").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
sqs_urls = cls._schema_on_200_201.discriminate_by(
"kind", "AmazonWebServicesS3").properties.sqs_urls
sqs_urls.Element = AAZStrType()
disc_azure_active_directory = cls._schema_on_200_201.discriminate_by(
"kind", "AzureActiveDirectory")
disc_azure_active_directory.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "AzureActiveDirectory").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_advanced_threat_protection = cls._schema_on_200_201.discriminate_by(
"kind", "AzureAdvancedThreatProtection")
disc_azure_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "AzureAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_azure_security_center = cls._schema_on_200_201.discriminate_by(
"kind", "AzureSecurityCenter")
disc_azure_security_center.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "AzureSecurityCenter").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_dynamics365 = cls._schema_on_200_201.discriminate_by(
"kind", "Dynamics365")
disc_dynamics365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "Dynamics365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "Dynamics365").properties.data_types
data_types.dynamics365_cds_activities = AAZObjectType(
serialized_name="dynamics365CdsActivities",
flags={"required": True},
)
dynamics365_cds_activities = cls._schema_on_200_201.discriminate_by(
"kind", "Dynamics365").properties.data_types.dynamics365_cds_activities
dynamics365_cds_activities.state = AAZStrType(
flags={"required": True},
)
disc_generic_ui = cls._schema_on_200_201.discriminate_by(
"kind", "GenericUI")
disc_generic_ui.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "GenericUI").properties
properties.connector_ui_config = AAZObjectType(
serialized_name="connectorUiConfig",
)
_build_schema_codeless_ui_connector_config_properties_read(
properties.connector_ui_config)
disc_iot = cls._schema_on_200_201.discriminate_by("kind", "IOT")
disc_iot.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "IOT").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
disc_microsoft_cloud_app_security = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftCloudAppSecurity")
disc_microsoft_cloud_app_security.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftCloudAppSecurity").properties.data_types
data_types.alerts = AAZObjectType(
flags={"required": True},
)
_build_schema_data_connector_data_type_common_read(
data_types.alerts)
data_types.discovery_logs = AAZObjectType(
serialized_name="discoveryLogs",
)
_build_schema_data_connector_data_type_common_read(
data_types.discovery_logs)
disc_microsoft_defender_advanced_threat_protection = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection")
disc_microsoft_defender_advanced_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftDefenderAdvancedThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_microsoft_threat_intelligence = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatIntelligence")
disc_microsoft_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types
data_types.bing_safety_phishing_url = AAZObjectType(
serialized_name="bingSafetyPhishingURL",
flags={"required": True},
)
data_types.microsoft_emerging_threat_feed = AAZObjectType(
serialized_name="microsoftEmergingThreatFeed",
flags={"required": True},
)
bing_safety_phishing_url = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.bing_safety_phishing_url
bing_safety_phishing_url.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
bing_safety_phishing_url.state = AAZStrType(
flags={"required": True},
)
microsoft_emerging_threat_feed = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatIntelligence").properties.data_types.microsoft_emerging_threat_feed
microsoft_emerging_threat_feed.lookback_period = AAZStrType(
serialized_name="lookbackPeriod",
flags={"required": True},
)
microsoft_emerging_threat_feed.state = AAZStrType(
flags={"required": True},
)
disc_microsoft_threat_protection = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatProtection")
disc_microsoft_threat_protection.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatProtection").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types
data_types.incidents = AAZObjectType(
flags={"required": True},
)
incidents = cls._schema_on_200_201.discriminate_by(
"kind", "MicrosoftThreatProtection").properties.data_types.incidents
incidents.state = AAZStrType(
flags={"required": True},
)
disc_office365 = cls._schema_on_200_201.discriminate_by(
"kind", "Office365")
disc_office365.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "Office365").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "Office365").properties.data_types
data_types.exchange = AAZObjectType(
flags={"required": True},
)
data_types.share_point = AAZObjectType(
serialized_name="sharePoint",
flags={"required": True},
)
data_types.teams = AAZObjectType(
flags={"required": True},
)
exchange = cls._schema_on_200_201.discriminate_by(
"kind", "Office365").properties.data_types.exchange
exchange.state = AAZStrType(
flags={"required": True},
)
share_point = cls._schema_on_200_201.discriminate_by(
"kind", "Office365").properties.data_types.share_point
share_point.state = AAZStrType(
flags={"required": True},
)
teams = cls._schema_on_200_201.discriminate_by(
"kind", "Office365").properties.data_types.teams
teams.state = AAZStrType(
flags={"required": True},
)
disc_office365_project = cls._schema_on_200_201.discriminate_by(
"kind", "Office365Project")
disc_office365_project.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "Office365Project").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "Office365Project").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200_201.discriminate_by(
"kind", "Office365Project").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_office_atp = cls._schema_on_200_201.discriminate_by(
"kind", "OfficeATP")
disc_office_atp.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "OfficeATP").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_irm = cls._schema_on_200_201.discriminate_by(
"kind", "OfficeIRM")
disc_office_irm.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "OfficeIRM").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
)
_build_schema_alerts_data_type_of_data_connector_read(
properties.data_types)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
disc_office_power_bi = cls._schema_on_200_201.discriminate_by(
"kind", "OfficePowerBI")
disc_office_power_bi.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "OfficePowerBI").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "OfficePowerBI").properties.data_types
data_types.logs = AAZObjectType(
flags={"required": True},
)
logs = cls._schema_on_200_201.discriminate_by(
"kind", "OfficePowerBI").properties.data_types.logs
logs.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligence")
disc_threat_intelligence.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligence").properties
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.tip_lookback_period = AAZStrType(
serialized_name="tipLookbackPeriod",
nullable=True,
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types
data_types.indicators = AAZObjectType(
flags={"required": True},
)
indicators = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligence").properties.data_types.indicators
indicators.state = AAZStrType(
flags={"required": True},
)
disc_threat_intelligence_taxii = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligenceTaxii")
disc_threat_intelligence_taxii.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties
properties.collection_id = AAZStrType(
serialized_name="collectionId",
)
properties.data_types = AAZObjectType(
serialized_name="dataTypes",
flags={"required": True},
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.password = AAZStrType()
properties.polling_frequency = AAZStrType(
serialized_name="pollingFrequency",
flags={"required": True},
nullable=True,
)
properties.taxii_lookback_period = AAZStrType(
serialized_name="taxiiLookbackPeriod",
nullable=True,
)
properties.taxii_server = AAZStrType(
serialized_name="taxiiServer",
)
properties.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"required": True},
)
properties.user_name = AAZStrType(
serialized_name="userName",
)
properties.workspace_id = AAZStrType(
serialized_name="workspaceId",
)
data_types = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types
data_types.taxii_client = AAZObjectType(
serialized_name="taxiiClient",
flags={"required": True},
)
taxii_client = cls._schema_on_200_201.discriminate_by(
"kind", "ThreatIntelligenceTaxii").properties.data_types.taxii_client
taxii_client.state = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200_201
|
class DataConnectorsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 112 | 15 | 97 | 0 | 8 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 1,144 | 159 | 985 | 108 | 966 | 0 | 594 | 100 | 583 | 72 | 1 | 1 | 83 |
9,616 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/data_connector/_connect.py
|
azext_sentinel.aaz.latest.sentinel.data_connector._connect.Connect.DataConnectorsConnect
|
class DataConnectorsConnect(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectors/{dataConnectorId}/connect",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataConnectorId", self.ctx.args.data_connector_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("apiKey", AAZStrType, ".api_key")
_builder.set_prop("authorizationCode",
AAZStrType, ".authorization_code")
_builder.set_prop("clientId", AAZStrType, ".client_id")
_builder.set_prop("clientSecret", AAZStrType, ".client_secret")
_builder.set_prop("dataCollectionEndpoint",
AAZStrType, ".endpoint")
_builder.set_prop("dataCollectionRuleImmutableId",
AAZStrType, ".rule_immutable_id")
_builder.set_prop("kind", AAZStrType, ".kind")
_builder.set_prop("outputStream", AAZStrType, ".output_stream")
_builder.set_prop("password", AAZStrType, ".password")
_builder.set_prop("userName", AAZStrType, ".user_name")
return self.serialize_content(_content_value)
def on_200(self, session):
pass
|
class DataConnectorsConnect(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 89 | 11 | 78 | 24 | 61 | 0 | 38 | 17 | 28 | 2 | 1 | 1 | 10 |
9,617 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_update.py
|
azext_sentinel.aaz.latest.sentinel.bookmark.relation._update.Update.BookmarkRelationsGet
|
class BookmarkRelationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"bookmarkId", self.ctx.args.bookmark_id,
required=True,
),
**self.serialize_url_param(
"relationName", self.ctx.args.relation_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_build_schema_relation_read(cls._schema_on_200)
return cls._schema_on_200
|
class BookmarkRelationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 90 | 13 | 77 | 25 | 60 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,618 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_update.py
|
azext_sentinel.aaz.latest.sentinel.bookmark.relation._update.Update.BookmarkRelationsCreateOrUpdate
|
class BookmarkRelationsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"bookmarkId", self.ctx.args.bookmark_id,
required=True,
),
**self.serialize_url_param(
"relationName", self.ctx.args.relation_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_build_schema_relation_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class BookmarkRelationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 102 | 15 | 87 | 28 | 68 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
9,619 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_show.py
|
azext_sentinel.aaz.latest.sentinel.bookmark.relation._show.Show.BookmarkRelationsGet
|
class BookmarkRelationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"bookmarkId", self.ctx.args.bookmark_id,
required=True,
),
**self.serialize_url_param(
"relationName", self.ctx.args.relation_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType()
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.related_resource_id = AAZStrType(
serialized_name="relatedResourceId",
flags={"required": True},
)
properties.related_resource_kind = AAZStrType(
serialized_name="relatedResourceKind",
flags={"read_only": True},
)
properties.related_resource_name = AAZStrType(
serialized_name="relatedResourceName",
flags={"read_only": True},
)
properties.related_resource_type = AAZStrType(
serialized_name="relatedResourceType",
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class BookmarkRelationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 152 | 16 | 136 | 28 | 119 | 0 | 51 | 21 | 41 | 2 | 1 | 1 | 11 |
9,620 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_list.py
|
azext_sentinel.aaz.latest.sentinel.bookmark.relation._list.List.BookmarkRelationsList
|
class BookmarkRelationsList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"bookmarkId", self.ctx.args.bookmark_id,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$orderby", self.ctx.args.orderby,
),
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.related_resource_id = AAZStrType(
serialized_name="relatedResourceId",
flags={"required": True},
)
properties.related_resource_kind = AAZStrType(
serialized_name="relatedResourceKind",
flags={"read_only": True},
)
properties.related_resource_name = AAZStrType(
serialized_name="relatedResourceName",
flags={"read_only": True},
)
properties.related_resource_type = AAZStrType(
serialized_name="relatedResourceType",
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class BookmarkRelationsList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 17 | 1 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 172 | 18 | 154 | 30 | 137 | 0 | 56 | 23 | 46 | 2 | 1 | 1 | 11 |
9,621 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphGetPropertiesResource
|
class GremlinGraphGetPropertiesResource(GremlinGraphResource, ExtendedResourceProperties):
"""GremlinGraphGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
:ivar id: Name of the Cosmos DB Gremlin graph. Required.
:vartype id: str
:ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is
automatic for all document paths within the graph.
:vartype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy
:ivar partition_key: The configuration of the partition key to be used for partitioning data
into multiple partitions.
:vartype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey
:ivar default_ttl: Default time to live.
:vartype default_ttl: int
:ivar unique_key_policy: The unique key policy configuration for specifying uniqueness
constraints on documents in the collection in the Azure Cosmos DB service.
:vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy
:ivar conflict_resolution_policy: The conflict resolution policy for the graph.
:vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
_validation = {
"rid": {"readonly": True},
"ts": {"readonly": True},
"etag": {"readonly": True},
"id": {"required": True},
}
_attribute_map = {
"rid": {"key": "_rid", "type": "str"},
"ts": {"key": "_ts", "type": "float"},
"etag": {"key": "_etag", "type": "str"},
"id": {"key": "id", "type": "str"},
"indexing_policy": {"key": "indexingPolicy", "type": "IndexingPolicy"},
"partition_key": {"key": "partitionKey", "type": "ContainerPartitionKey"},
"default_ttl": {"key": "defaultTtl", "type": "int"},
"unique_key_policy": {"key": "uniqueKeyPolicy", "type": "UniqueKeyPolicy"},
"conflict_resolution_policy": {"key": "conflictResolutionPolicy", "type": "ConflictResolutionPolicy"},
"analytical_storage_ttl": {"key": "analyticalStorageTtl", "type": "int"},
"restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"},
"create_mode": {"key": "createMode", "type": "str"},
}
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
indexing_policy: Optional["_models.IndexingPolicy"] = None,
partition_key: Optional["_models.ContainerPartitionKey"] = None,
default_ttl: Optional[int] = None,
unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None,
conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None,
analytical_storage_ttl: Optional[int] = None,
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
"""
:keyword id: Name of the Cosmos DB Gremlin graph. Required.
:paramtype id: str
:keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is
automatic for all document paths within the graph.
:paramtype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy
:keyword partition_key: The configuration of the partition key to be used for partitioning data
into multiple partitions.
:paramtype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey
:keyword default_ttl: Default time to live.
:paramtype default_ttl: int
:keyword unique_key_policy: The unique key policy configuration for specifying uniqueness
constraints on documents in the collection in the Azure Cosmos DB service.
:paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy
:keyword conflict_resolution_policy: The conflict resolution policy for the graph.
:paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
super().__init__(
id=id,
indexing_policy=indexing_policy,
partition_key=partition_key,
default_ttl=default_ttl,
unique_key_policy=unique_key_policy,
conflict_resolution_policy=conflict_resolution_policy,
analytical_storage_ttl=analytical_storage_ttl,
restore_parameters=restore_parameters,
create_mode=create_mode,
**kwargs
)
self.rid = None
self.ts = None
self.etag = None
self.id = id
self.indexing_policy = indexing_policy
self.partition_key = partition_key
self.default_ttl = default_ttl
self.unique_key_policy = unique_key_policy
self.conflict_resolution_policy = conflict_resolution_policy
self.analytical_storage_ttl = analytical_storage_ttl
self.restore_parameters = restore_parameters
self.create_mode = create_mode
|
class GremlinGraphGetPropertiesResource(GremlinGraphResource, ExtendedResourceProperties):
'''GremlinGraphGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
:ivar id: Name of the Cosmos DB Gremlin graph. Required.
:vartype id: str
:ivar indexing_policy: The configuration of the indexing policy. By default, the indexing is
automatic for all document paths within the graph.
:vartype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy
:ivar partition_key: The configuration of the partition key to be used for partitioning data
into multiple partitions.
:vartype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey
:ivar default_ttl: Default time to live.
:vartype default_ttl: int
:ivar unique_key_policy: The unique key policy configuration for specifying uniqueness
constraints on documents in the collection in the Azure Cosmos DB service.
:vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy
:ivar conflict_resolution_policy: The conflict resolution policy for the graph.
:vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy
:ivar analytical_storage_ttl: Analytical TTL.
:vartype analytical_storage_ttl: int
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
indexing_policy: Optional["_models.IndexingPolicy"] = None,
partition_key: Optional["_models.ContainerPartitionKey"] = None,
default_ttl: Optional[int] = None,
unique_key_policy: Optional["_models.UniqueKeyPolicy"] = None,
conflict_resolution_policy: Optional["_models.ConflictResolutionPolicy"] = None,
analytical_storage_ttl: Optional[int] = None,
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
'''
:keyword id: Name of the Cosmos DB Gremlin graph. Required.
:paramtype id: str
:keyword indexing_policy: The configuration of the indexing policy. By default, the indexing is
automatic for all document paths within the graph.
:paramtype indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy
:keyword partition_key: The configuration of the partition key to be used for partitioning data
into multiple partitions.
:paramtype partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey
:keyword default_ttl: Default time to live.
:paramtype default_ttl: int
:keyword unique_key_policy: The unique key policy configuration for specifying uniqueness
constraints on documents in the collection in the Azure Cosmos DB service.
:paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy
:keyword conflict_resolution_policy: The conflict resolution policy for the graph.
:paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy
:keyword analytical_storage_ttl: Analytical TTL.
:paramtype analytical_storage_ttl: int
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
pass
| 2 | 2 | 62 | 0 | 38 | 25 | 1 | 0.98 | 2 | 4 | 0 | 0 | 1 | 12 | 1 | 18 | 122 | 6 | 59 | 29 | 44 | 58 | 17 | 16 | 15 | 1 | 3 | 0 | 1 |
9,622 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphGetPropertiesOptions
|
class GremlinGraphGetPropertiesOptions(OptionsResource):
"""GremlinGraphGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
"""
|
class GremlinGraphGetPropertiesOptions(OptionsResource):
'''GremlinGraphGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 9 | 1 | 1 | 1 | 0 | 7 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
9,623 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinGraphCreateUpdateParameters
|
class GremlinGraphCreateUpdateParameters(ARMResourceProperties):
"""Parameters to create and update Cosmos DB Gremlin graph.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Gremlin graph. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"resource": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GremlinGraphResource"},
"options": {"key": "properties.options", "type": "CreateUpdateOptions"},
}
def __init__(
self,
*,
resource: "_models.GremlinGraphResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Gremlin graph. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GremlinGraphCreateUpdateParameters(ARMResourceProperties):
'''Parameters to create and update Cosmos DB Gremlin graph.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Gremlin graph. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
def __init__(
self,
*,
resource: "_models.GremlinGraphResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Gremlin graph. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
pass
| 2 | 2 | 31 | 0 | 13 | 18 | 1 | 1.47 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 80 | 6 | 30 | 15 | 19 | 44 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,624 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseRestoreResource
|
class GremlinDatabaseRestoreResource(_serialization.Model):
"""Specific Gremlin Databases to restore.
:ivar database_name: The name of the gremlin database available for restore.
:vartype database_name: str
:ivar graph_names: The names of the graphs available for restore.
:vartype graph_names: list[str]
"""
_attribute_map = {
"database_name": {"key": "databaseName", "type": "str"},
"graph_names": {"key": "graphNames", "type": "[str]"},
}
def __init__(
self, *, database_name: Optional[str] = None, graph_names: Optional[List[str]] = None, **kwargs: Any
) -> None:
"""
:keyword database_name: The name of the gremlin database available for restore.
:paramtype database_name: str
:keyword graph_names: The names of the graphs available for restore.
:paramtype graph_names: list[str]
"""
super().__init__(**kwargs)
self.database_name = database_name
self.graph_names = graph_names
|
class GremlinDatabaseRestoreResource(_serialization.Model):
'''Specific Gremlin Databases to restore.
:ivar database_name: The name of the gremlin database available for restore.
:vartype database_name: str
:ivar graph_names: The names of the graphs available for restore.
:vartype graph_names: list[str]
'''
def __init__(
self, *, database_name: Optional[str] = None, graph_names: Optional[List[str]] = None, **kwargs: Any
) -> None:
'''
:keyword database_name: The name of the gremlin database available for restore.
:paramtype database_name: str
:keyword graph_names: The names of the graphs available for restore.
:paramtype graph_names: list[str]
'''
pass
| 2 | 2 | 12 | 0 | 6 | 6 | 1 | 1.09 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 3 | 11 | 7 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,625 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.FailoverPolicies
|
class FailoverPolicies(_serialization.Model):
"""The list of new failover policies for the failover priority change.
All required parameters must be populated in order to send to server.
:ivar failover_policies: List of failover policies. Required.
:vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
"""
_validation = {
"failover_policies": {"required": True},
}
_attribute_map = {
"failover_policies": {"key": "failoverPolicies", "type": "[FailoverPolicy]"},
}
def __init__(self, *, failover_policies: List["_models.FailoverPolicy"], **kwargs: Any) -> None:
"""
:keyword failover_policies: List of failover policies. Required.
:paramtype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
"""
super().__init__(**kwargs)
self.failover_policies = failover_policies
|
class FailoverPolicies(_serialization.Model):
'''The list of new failover policies for the failover priority change.
All required parameters must be populated in order to send to server.
:ivar failover_policies: List of failover policies. Required.
:vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
'''
def __init__(self, *, failover_policies: List["_models.FailoverPolicy"], **kwargs: Any) -> None:
'''
:keyword failover_policies: List of failover policies. Required.
:paramtype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy]
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 0.9 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 24 | 5 | 10 | 5 | 8 | 9 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,626 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.FailoverPolicy
|
class FailoverPolicy(_serialization.Model):
"""The failover policy for a given region of a database account.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique identifier of the region in which the database account replicates to.
Example: <accountName>-<locationName>.
:vartype id: str
:ivar location_name: The name of the region in which the database account exists.
:vartype location_name: str
:ivar failover_priority: The failover priority of the region. A failover priority of 0
indicates a write region. The maximum value for a failover priority = (total number of regions
- 1). Failover priority values must be unique for each of the regions in which the database
account exists.
:vartype failover_priority: int
"""
_validation = {
"id": {"readonly": True},
"failover_priority": {"minimum": 0},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"location_name": {"key": "locationName", "type": "str"},
"failover_priority": {"key": "failoverPriority", "type": "int"},
}
def __init__(
self, *, location_name: Optional[str] = None, failover_priority: Optional[int] = None, **kwargs: Any
) -> None:
"""
:keyword location_name: The name of the region in which the database account exists.
:paramtype location_name: str
:keyword failover_priority: The failover priority of the region. A failover priority of 0
indicates a write region. The maximum value for a failover priority = (total number of regions
- 1). Failover priority values must be unique for each of the regions in which the database
account exists.
:paramtype failover_priority: int
"""
super().__init__(**kwargs)
self.id = None
self.location_name = location_name
self.failover_priority = failover_priority
|
class FailoverPolicy(_serialization.Model):
'''The failover policy for a given region of a database account.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique identifier of the region in which the database account replicates to.
Example: <accountName>-<locationName>.
:vartype id: str
:ivar location_name: The name of the region in which the database account exists.
:vartype location_name: str
:ivar failover_priority: The failover priority of the region. A failover priority of 0
indicates a write region. The maximum value for a failover priority = (total number of regions
- 1). Failover priority values must be unique for each of the regions in which the database
account exists.
:vartype failover_priority: int
'''
def __init__(
self, *, location_name: Optional[str] = None, failover_priority: Optional[int] = None, **kwargs: Any
) -> None:
'''
:keyword location_name: The name of the region in which the database account exists.
:paramtype location_name: str
:keyword failover_priority: The failover priority of the region. A failover priority of 0
indicates a write region. The maximum value for a failover priority = (total number of regions
- 1). Failover priority values must be unique for each of the regions in which the database
account exists.
:paramtype failover_priority: int
'''
pass
| 2 | 2 | 16 | 0 | 7 | 9 | 1 | 1.29 | 1 | 4 | 0 | 0 | 1 | 3 | 1 | 16 | 44 | 5 | 17 | 9 | 13 | 22 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
9,627 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphAPIComputeRegionalServiceResource
|
class GraphAPIComputeRegionalServiceResource(RegionalServiceResource):
"""Resource for a regional service location.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The regional service name.
:vartype name: str
:ivar location: The location name.
:vartype location: str
:ivar status: Describes the status of a service. Known values are: "Creating", "Running",
"Updating", "Deleting", "Error", and "Stopped".
:vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus
:ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute.
:vartype graph_api_compute_endpoint: str
"""
_validation = {
"name": {"readonly": True},
"location": {"readonly": True},
"status": {"readonly": True},
"graph_api_compute_endpoint": {"readonly": True},
}
_attribute_map = {
"name": {"key": "name", "type": "str"},
"location": {"key": "location", "type": "str"},
"status": {"key": "status", "type": "str"},
"graph_api_compute_endpoint": {"key": "graphApiComputeEndpoint", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.graph_api_compute_endpoint = None
|
class GraphAPIComputeRegionalServiceResource(RegionalServiceResource):
'''Resource for a regional service location.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The regional service name.
:vartype name: str
:ivar location: The location name.
:vartype location: str
:ivar status: Describes the status of a service. Known values are: "Creating", "Running",
"Updating", "Deleting", "Error", and "Stopped".
:vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus
:ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute.
:vartype graph_api_compute_endpoint: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.81 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 17 | 34 | 5 | 16 | 5 | 14 | 13 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
9,628 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphAPIComputeServiceResource
|
class GraphAPIComputeServiceResource(_serialization.Model):
"""Describes the service response property for GraphAPICompute.
:ivar properties: Properties for GraphAPIComputeServiceResource.
:vartype properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties
"""
_attribute_map = {
"properties": {"key": "properties", "type": "GraphAPIComputeServiceResourceProperties"},
}
def __init__(
self, *, properties: Optional["_models.GraphAPIComputeServiceResourceProperties"] = None, **kwargs: Any
) -> None:
"""
:keyword properties: Properties for GraphAPIComputeServiceResource.
:paramtype properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties
"""
super().__init__(**kwargs)
self.properties = properties
|
class GraphAPIComputeServiceResource(_serialization.Model):
'''Describes the service response property for GraphAPICompute.
:ivar properties: Properties for GraphAPIComputeServiceResource.
:vartype properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties
'''
def __init__(
self, *, properties: Optional["_models.GraphAPIComputeServiceResourceProperties"] = None, **kwargs: Any
) -> None:
'''
:keyword properties: Properties for GraphAPIComputeServiceResource.
:paramtype properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties
'''
pass
| 2 | 2 | 9 | 0 | 5 | 4 | 1 | 0.89 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 20 | 3 | 9 | 6 | 5 | 8 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
9,629 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphAPIComputeServiceResourceCreateUpdateProperties
|
class GraphAPIComputeServiceResourceCreateUpdateProperties(
ServiceResourceCreateUpdateProperties
): # pylint: disable=name-too-long
"""Properties for Create or Update request for GraphAPIComputeServiceResource.
All required parameters must be populated in order to send to server.
:ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:ivar instance_count: Instance count for the service.
:vartype instance_count: int
:ivar service_type: ServiceType for the service. Required. Known values are:
"SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder".
:vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType
"""
_validation = {
"instance_count": {"minimum": 0},
"service_type": {"required": True},
}
_attribute_map = {
"instance_size": {"key": "instanceSize", "type": "str"},
"instance_count": {"key": "instanceCount", "type": "int"},
"service_type": {"key": "serviceType", "type": "str"},
}
def __init__(
self,
*,
instance_size: Optional[Union[str, "_models.ServiceSize"]] = None,
instance_count: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:keyword instance_count: Instance count for the service.
:paramtype instance_count: int
"""
super().__init__(instance_size=instance_size, instance_count=instance_count, **kwargs)
self.service_type: str = "GraphAPICompute"
|
class GraphAPIComputeServiceResourceCreateUpdateProperties(
ServiceResourceCreateUpdateProperties
):
'''Properties for Create or Update request for GraphAPIComputeServiceResource.
All required parameters must be populated in order to send to server.
:ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:ivar instance_count: Instance count for the service.
:vartype instance_count: int
:ivar service_type: ServiceType for the service. Required. Known values are:
"SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder".
:vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType
'''
def __init__(
self,
*,
instance_size: Optional[Union[str, "_models.ServiceSize"]] = None,
instance_count: Optional[int] = None,
**kwargs: Any
) -> None:
'''
:keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:keyword instance_count: Instance count for the service.
:paramtype instance_count: int
'''
pass
| 2 | 2 | 16 | 0 | 9 | 7 | 1 | 0.9 | 1 | 4 | 0 | 0 | 1 | 1 | 1 | 17 | 44 | 5 | 21 | 13 | 11 | 19 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
9,630 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphAPIComputeServiceResourceProperties
|
class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties):
"""Properties for GraphAPIComputeServiceResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar additional_properties: Unmatched properties from the message are deserialized to this
collection.
:vartype additional_properties: dict[str, any]
:ivar creation_time: Time of the last state change (ISO-8601 format).
:vartype creation_time: ~datetime.datetime
:ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:ivar instance_count: Instance count for the service.
:vartype instance_count: int
:ivar service_type: ServiceType for the service. Required. Known values are:
"SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder".
:vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType
:ivar status: Describes the status of a service. Known values are: "Creating", "Running",
"Updating", "Deleting", "Error", and "Stopped".
:vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus
:ivar graph_api_compute_endpoint: GraphAPICompute endpoint for the service.
:vartype graph_api_compute_endpoint: str
:ivar locations: An array that contains all of the locations for the service.
:vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource]
"""
_validation = {
"creation_time": {"readonly": True},
"instance_count": {"minimum": 0},
"service_type": {"required": True},
"status": {"readonly": True},
"locations": {"readonly": True},
}
_attribute_map = {
"additional_properties": {"key": "", "type": "{object}"},
"creation_time": {"key": "creationTime", "type": "iso-8601"},
"instance_size": {"key": "instanceSize", "type": "str"},
"instance_count": {"key": "instanceCount", "type": "int"},
"service_type": {"key": "serviceType", "type": "str"},
"status": {"key": "status", "type": "str"},
"graph_api_compute_endpoint": {"key": "graphApiComputeEndpoint", "type": "str"},
"locations": {"key": "locations", "type": "[GraphAPIComputeRegionalServiceResource]"},
}
def __init__(
self,
*,
additional_properties: Optional[Dict[str, Any]] = None,
instance_size: Optional[Union[str, "_models.ServiceSize"]] = None,
instance_count: Optional[int] = None,
graph_api_compute_endpoint: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword additional_properties: Unmatched properties from the message are deserialized to this
collection.
:paramtype additional_properties: dict[str, any]
:keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:keyword instance_count: Instance count for the service.
:paramtype instance_count: int
:keyword graph_api_compute_endpoint: GraphAPICompute endpoint for the service.
:paramtype graph_api_compute_endpoint: str
"""
super().__init__(
additional_properties=additional_properties,
instance_size=instance_size,
instance_count=instance_count,
**kwargs
)
self.service_type: str = "GraphAPICompute"
self.graph_api_compute_endpoint = graph_api_compute_endpoint
self.locations = None
|
class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties):
'''Properties for GraphAPIComputeServiceResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar additional_properties: Unmatched properties from the message are deserialized to this
collection.
:vartype additional_properties: dict[str, any]
:ivar creation_time: Time of the last state change (ISO-8601 format).
:vartype creation_time: ~datetime.datetime
:ivar instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:vartype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:ivar instance_count: Instance count for the service.
:vartype instance_count: int
:ivar service_type: ServiceType for the service. Required. Known values are:
"SqlDedicatedGateway", "DataTransfer", "GraphAPICompute", and "MaterializedViewsBuilder".
:vartype service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType
:ivar status: Describes the status of a service. Known values are: "Creating", "Running",
"Updating", "Deleting", "Error", and "Stopped".
:vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus
:ivar graph_api_compute_endpoint: GraphAPICompute endpoint for the service.
:vartype graph_api_compute_endpoint: str
:ivar locations: An array that contains all of the locations for the service.
:vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource]
'''
def __init__(
self,
*,
additional_properties: Optional[Dict[str, Any]] = None,
instance_size: Optional[Union[str, "_models.ServiceSize"]] = None,
instance_count: Optional[int] = None,
graph_api_compute_endpoint: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword additional_properties: Unmatched properties from the message are deserialized to this
collection.
:paramtype additional_properties: dict[str, any]
:keyword instance_size: Instance type for the service. Known values are: "Cosmos.D4s",
"Cosmos.D8s", and "Cosmos.D16s".
:paramtype instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize
:keyword instance_count: Instance count for the service.
:paramtype instance_count: int
:keyword graph_api_compute_endpoint: GraphAPICompute endpoint for the service.
:paramtype graph_api_compute_endpoint: str
'''
pass
| 2 | 2 | 30 | 0 | 18 | 12 | 1 | 1 | 1 | 4 | 0 | 0 | 1 | 3 | 1 | 17 | 78 | 6 | 36 | 15 | 26 | 36 | 8 | 7 | 6 | 1 | 3 | 0 | 1 |
9,631 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResource
|
class GraphResource(_serialization.Model):
"""Cosmos DB Graph resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Graph. Required.
:vartype id: str
"""
_validation = {
"id": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
}
def __init__(self, *, id: str, **kwargs: Any) -> None: # pylint: disable=redefined-builtin
"""
:keyword id: Name of the Cosmos DB Graph. Required.
:paramtype id: str
"""
super().__init__(**kwargs)
self.id = id
|
class GraphResource(_serialization.Model):
'''Cosmos DB Graph resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Graph. Required.
:vartype id: str
'''
def __init__(self, *, id: str, **kwargs: Any) -> None:
'''
:keyword id: Name of the Cosmos DB Graph. Required.
:paramtype id: str
'''
pass
| 2 | 2 | 7 | 0 | 3 | 5 | 1 | 1 | 1 | 3 | 0 | 1 | 1 | 1 | 1 | 16 | 24 | 5 | 10 | 5 | 8 | 10 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,632 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResourceCreateUpdateParameters
|
class GraphResourceCreateUpdateParameters(ARMResourceProperties):
"""Parameters to create and update Cosmos DB Graph resource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Graph resource. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GraphResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"resource": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GraphResource"},
"options": {"key": "properties.options", "type": "CreateUpdateOptions"},
}
def __init__(
self,
*,
resource: "_models.GraphResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Graph resource. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GraphResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GraphResourceCreateUpdateParameters(ARMResourceProperties):
'''Parameters to create and update Cosmos DB Graph resource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Graph resource. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GraphResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
def __init__(
self,
*,
resource: "_models.GraphResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Graph resource. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GraphResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
pass
| 2 | 2 | 31 | 0 | 13 | 18 | 1 | 1.47 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 80 | 6 | 30 | 15 | 19 | 44 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,633 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/securityinsight/azext_sentinel/aaz/latest/sentinel/bookmark/relation/_create.py
|
azext_sentinel.aaz.latest.sentinel.bookmark.relation._create.Create.BookmarkRelationsCreateOrUpdate
|
class BookmarkRelationsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/bookmarks/{bookmarkId}/relations/{relationName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"bookmarkId", self.ctx.args.bookmark_id,
required=True,
),
**self.serialize_url_param(
"relationName", self.ctx.args.relation_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-06-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("etag", AAZStrType, ".etag")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("relatedResourceId", AAZStrType, ".related_resource_id", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType()
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.related_resource_id = AAZStrType(
serialized_name="relatedResourceId",
flags={"required": True},
)
properties.related_resource_kind = AAZStrType(
serialized_name="relatedResourceKind",
flags={"read_only": True},
)
properties.related_resource_name = AAZStrType(
serialized_name="relatedResourceName",
flags={"read_only": True},
)
properties.related_resource_type = AAZStrType(
serialized_name="relatedResourceType",
flags={"read_only": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
flags={"read_only": True},
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
flags={"read_only": True},
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
flags={"read_only": True},
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
flags={"read_only": True},
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
flags={"read_only": True},
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
flags={"read_only": True},
)
return cls._schema_on_200_201
|
class BookmarkRelationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 171 | 19 | 152 | 32 | 133 | 0 | 59 | 24 | 48 | 2 | 1 | 1 | 13 |
9,634 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResourceGetPropertiesOptions
|
class GraphResourceGetPropertiesOptions(OptionsResource):
"""GraphResourceGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
"""
|
class GraphResourceGetPropertiesOptions(OptionsResource):
'''GraphResourceGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 9 | 1 | 1 | 1 | 0 | 7 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
9,635 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResourceGetResults
|
class GraphResourceGetResults(ARMResourceProperties):
"""An Azure Cosmos DB Graph resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GraphResourceGetPropertiesResource"},
"options": {"key": "properties.options", "type": "GraphResourceGetPropertiesOptions"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GraphResourceGetPropertiesResource"] = None,
options: Optional["_models.GraphResourceGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GraphResourceGetResults(ARMResourceProperties):
'''An Azure Cosmos DB Graph resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GraphResourceGetPropertiesResource"] = None,
options: Optional["_models.GraphResourceGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions
'''
pass
| 2 | 2 | 30 | 0 | 13 | 17 | 1 | 1.41 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 75 | 5 | 29 | 15 | 18 | 41 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,636 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResourcesListResult
|
class GraphResourcesListResult(_serialization.Model):
"""The List operation response, that contains the Graph resource and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Graph resource and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GraphResourceGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[GraphResourceGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class GraphResourcesListResult(_serialization.Model):
'''The List operation response, that contains the Graph resource and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Graph resource and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GraphResourceGetResults]
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.6 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 21 | 5 | 10 | 5 | 8 | 6 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,637 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseCreateUpdateParameters
|
class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties):
"""Parameters to create and update Cosmos DB Gremlin database.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Gremlin database. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"resource": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GremlinDatabaseResource"},
"options": {"key": "properties.options", "type": "CreateUpdateOptions"},
}
def __init__(
self,
*,
resource: "_models.GremlinDatabaseResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Gremlin database. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties):
'''Parameters to create and update Cosmos DB Gremlin database.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource: The standard JSON format of a Gremlin database. Required.
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource
:ivar options: A key-value pair of options to be applied for the request. This corresponds to
the headers sent with the request.
:vartype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
def __init__(
self,
*,
resource: "_models.GremlinDatabaseResource",
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
options: Optional["_models.CreateUpdateOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource: The standard JSON format of a Gremlin database. Required.
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource
:keyword options: A key-value pair of options to be applied for the request. This corresponds
to the headers sent with the request.
:paramtype options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions
'''
pass
| 2 | 2 | 31 | 0 | 13 | 18 | 1 | 1.47 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 80 | 6 | 30 | 15 | 19 | 44 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,638 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseGetPropertiesOptions
|
class GremlinDatabaseGetPropertiesOptions(OptionsResource):
"""GremlinDatabaseGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
"""
|
class GremlinDatabaseGetPropertiesOptions(OptionsResource):
'''GremlinDatabaseGetPropertiesOptions.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 9 | 1 | 1 | 1 | 0 | 7 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
9,639 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseGetPropertiesResource
|
class GremlinDatabaseGetPropertiesResource(GremlinDatabaseResource, ExtendedResourceProperties):
"""GremlinDatabaseGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
:ivar id: Name of the Cosmos DB Gremlin database. Required.
:vartype id: str
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
_validation = {
"rid": {"readonly": True},
"ts": {"readonly": True},
"etag": {"readonly": True},
"id": {"required": True},
}
_attribute_map = {
"rid": {"key": "_rid", "type": "str"},
"ts": {"key": "_ts", "type": "float"},
"etag": {"key": "_etag", "type": "str"},
"id": {"key": "id", "type": "str"},
"restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"},
"create_mode": {"key": "createMode", "type": "str"},
}
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
"""
:keyword id: Name of the Cosmos DB Gremlin database. Required.
:paramtype id: str
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
super().__init__(id=id, restore_parameters=restore_parameters, create_mode=create_mode, **kwargs)
self.rid = None
self.ts = None
self.etag = None
self.id = id
self.restore_parameters = restore_parameters
self.create_mode = create_mode
|
class GremlinDatabaseGetPropertiesResource(GremlinDatabaseResource, ExtendedResourceProperties):
'''GremlinDatabaseGetPropertiesResource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
:ivar rid: A system generated property. A unique identifier.
:vartype rid: str
:ivar ts: A system generated property that denotes the last updated timestamp of the resource.
:vartype ts: float
:ivar etag: A system generated property representing the resource etag required for optimistic
concurrency control.
:vartype etag: str
:ivar id: Name of the Cosmos DB Gremlin database. Required.
:vartype id: str
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
'''
:keyword id: Name of the Cosmos DB Gremlin database. Required.
:paramtype id: str
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
pass
| 2 | 2 | 24 | 0 | 15 | 10 | 1 | 0.93 | 2 | 3 | 0 | 0 | 1 | 6 | 1 | 18 | 63 | 6 | 30 | 17 | 21 | 28 | 11 | 10 | 9 | 1 | 3 | 0 | 1 |
9,640 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseGetResults
|
class GremlinDatabaseGetResults(ARMResourceProperties):
"""An Azure Cosmos DB Gremlin database.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ManagedServiceIdentity"},
"resource": {"key": "properties.resource", "type": "GremlinDatabaseGetPropertiesResource"},
"options": {"key": "properties.options", "type": "GremlinDatabaseGetPropertiesOptions"},
}
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GremlinDatabaseGetPropertiesResource"] = None,
options: Optional["_models.GremlinDatabaseGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions
"""
super().__init__(location=location, tags=tags, identity=identity, **kwargs)
self.resource = resource
self.options = options
|
class GremlinDatabaseGetResults(ARMResourceProperties):
'''An Azure Cosmos DB Gremlin database.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the ARM resource.
:vartype id: str
:ivar name: The name of the ARM resource.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar location: The location of the resource group to which the resource belongs.
:vartype location: str
:ivar tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:vartype tags: dict[str, str]
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:ivar resource:
:vartype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource
:ivar options:
:vartype options: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions
'''
def __init__(
self,
*,
location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ManagedServiceIdentity"] = None,
resource: Optional["_models.GremlinDatabaseGetPropertiesResource"] = None,
options: Optional["_models.GremlinDatabaseGetPropertiesOptions"] = None,
**kwargs: Any
) -> None:
'''
:keyword location: The location of the resource group to which the resource belongs.
:paramtype location: str
:keyword tags: Tags are a list of key-value pairs that describe the resource. These tags can be
used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can
be provided for a resource. Each tag must have a key no greater than 128 characters and value
no greater than 256 characters. For example, the default experience for a template type is set
with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table",
"Graph", "DocumentDB", and "MongoDB".
:paramtype tags: dict[str, str]
:keyword identity: Identity for the resource.
:paramtype identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity
:keyword resource:
:paramtype resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource
:keyword options:
:paramtype options: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions
'''
pass
| 2 | 2 | 30 | 0 | 13 | 17 | 1 | 1.41 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 17 | 75 | 5 | 29 | 15 | 18 | 41 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,641 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseListResult
|
class GremlinDatabaseListResult(_serialization.Model):
"""The List operation response, that contains the Gremlin databases and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Gremlin databases and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults]
"""
_validation = {
"value": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[GremlinDatabaseGetResults]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
|
class GremlinDatabaseListResult(_serialization.Model):
'''The List operation response, that contains the Gremlin databases and their properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: List of Gremlin databases and their properties.
:vartype value: list[~azure.mgmt.cosmosdb.models.GremlinDatabaseGetResults]
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.6 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 21 | 5 | 10 | 5 | 8 | 6 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,642 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GremlinDatabaseResource
|
class GremlinDatabaseResource(_serialization.Model):
"""Cosmos DB Gremlin database resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Gremlin database. Required.
:vartype id: str
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
_validation = {
"id": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"restore_parameters": {"key": "restoreParameters", "type": "ResourceRestoreParameters"},
"create_mode": {"key": "createMode", "type": "str"},
}
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
"""
:keyword id: Name of the Cosmos DB Gremlin database. Required.
:paramtype id: str
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
"""
super().__init__(**kwargs)
self.id = id
self.restore_parameters = restore_parameters
self.create_mode = create_mode
|
class GremlinDatabaseResource(_serialization.Model):
'''Cosmos DB Gremlin database resource object.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Gremlin database. Required.
:vartype id: str
:ivar restore_parameters: Parameters to indicate the information about the restore.
:vartype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:ivar create_mode: Enum to indicate the mode of resource creation. Known values are: "Default"
and "Restore".
:vartype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
def __init__(
self,
*,
id: str, # pylint: disable=redefined-builtin
restore_parameters: Optional["_models.ResourceRestoreParameters"] = None,
create_mode: Union[str, "_models.CreateMode"] = "Default",
**kwargs: Any
) -> None:
'''
:keyword id: Name of the Cosmos DB Gremlin database. Required.
:paramtype id: str
:keyword restore_parameters: Parameters to indicate the information about the restore.
:paramtype restore_parameters: ~azure.mgmt.cosmosdb.models.ResourceRestoreParameters
:keyword create_mode: Enum to indicate the mode of resource creation. Known values are:
"Default" and "Restore".
:paramtype create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode
'''
pass
| 2 | 2 | 21 | 0 | 12 | 10 | 1 | 0.95 | 1 | 3 | 0 | 1 | 1 | 3 | 1 | 16 | 45 | 5 | 21 | 14 | 12 | 20 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
9,643 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.GraphResourceGetPropertiesResource
|
class GraphResourceGetPropertiesResource(GraphResource):
"""GraphResourceGetPropertiesResource.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Graph. Required.
:vartype id: str
"""
|
class GraphResourceGetPropertiesResource(GraphResource):
'''GraphResourceGetPropertiesResource.
All required parameters must be populated in order to send to server.
:ivar id: Name of the Cosmos DB Graph. Required.
:vartype id: str
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 8 | 2 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
9,644 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.ContinuousBackupRestoreLocation
|
class ContinuousBackupRestoreLocation(_serialization.Model):
"""Properties of the regional restorable account.
:ivar location: The name of the continuous backup restore location.
:vartype location: str
"""
_attribute_map = {
"location": {"key": "location", "type": "str"},
}
def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword location: The name of the continuous backup restore location.
:paramtype location: str
"""
super().__init__(**kwargs)
self.location = location
|
class ContinuousBackupRestoreLocation(_serialization.Model):
'''Properties of the regional restorable account.
:ivar location: The name of the continuous backup restore location.
:vartype location: str
'''
def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None:
'''
:keyword location: The name of the continuous backup restore location.
:paramtype location: str
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1.14 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 16 | 18 | 3 | 7 | 4 | 5 | 8 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
9,645 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/self-help/azext_self_help/tests/latest/test_self_help.py
|
azext_self_help.tests.latest.test_self_help.SelfHelpScenario
|
class SelfHelpScenario(ScenarioTest):
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_discoverysolutions(self, resource_group, key_vault):
self.kwargs.update({
'filter': "\"ProblemClassificationId eq '00000000-0000-0000-0000-000000000000'\"",
})
list_solution_discovery_result = self.cmd(
'self-help discovery-solution list --filter {filter}', checks=[
self.check(
'[0].type', 'Microsoft.Help/discoverySolutions', case_sensitive=False)
]).get_output_in_json()
self.assertTrue(list_solution_discovery_result is not None)
self.assertTrue(len(list_solution_discovery_result) >= 1)
self.assertTrue("type" in list_solution_discovery_result[0])
self.assertTrue("name" in list_solution_discovery_result[0])
self.assertTrue("id" in list_solution_discovery_result[0])
self.kwargs.update({
'subscription-id': self.get_subscription_id(),
'service-id': "\"6f16735c-b0ae-b275-ad3a-03479cfa1396\"",
'issue-summary': "\"I am not able to make rdp connection to the virtual machine\""
})
list_solution_discovery_result_nlp = self.cmd(
'self-help discovery-solution list-nlp --issue-summary {issue-summary} --service-id {service-id}', checks=[
self.check(
'[0].type', 'Microsoft.Help/discoverSolutions', case_sensitive=False)
]).get_output_in_json()
list_solution_discovery_result_nlp_subscription = self.cmd(
'self-help discovery-solution list-nlp-subscription --issue-summary {issue-summary} --service-id {service-id} --subscription-id {subscription-id}', checks=[
self.check(
'[0].type', 'Microsoft.Help/discoverSolutions', case_sensitive=False)
]).get_output_in_json()
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_diagnostics(self, resource_group, key_vault):
# Create diagnostic for keyVault resource.
diagnostic_name = self.create_random_name(prefix='cli_test', length=15)
self.kwargs.update({
'scope': resource_id(resource_group=resource_group,
subscription=self.get_subscription_id(),
name=key_vault,
namespace='Microsoft.KeyVault',
type='vaults'),
'diagnostic-name': diagnostic_name,
'insights': "[{solutionId:Demo2InsightV2}]"
})
create_diagnostic_result = self.cmd(
"self-help diagnostic create --diagnostic-name {diagnostic-name} --insights {insights} --scope {scope}", checks=[
self.check('name', '{diagnostic-name}'),
self.check('type', 'Microsoft.Help/Diagnostics'),
])
create_diagnostic_result = create_diagnostic_result.get_output_in_json()
self.assertTrue(create_diagnostic_result is not None)
self.assertTrue(create_diagnostic_result["acceptedAt"] is not None)
# Get diagnostic for keyVault resource.
get_diagnostic_result = self.cmd(
"self-help diagnostic show --diagnostic-name {diagnostic-name} --scope {scope}", checks=[
self.check('name', '{diagnostic-name}'),
self.check('type', 'Microsoft.Help/Diagnostics'),
])
get_diagnostic_result = get_diagnostic_result.get_output_in_json()
self.assertTrue(get_diagnostic_result is not None)
self.assertTrue(get_diagnostic_result["acceptedAt"] is not None)
def test_help_check_name_diagnostics(self):
# Check diagnostic name availability.
self.kwargs.update({
'scope': resource_id(subscription=self.get_subscription_id()),
'diagnostic-name': self.create_random_name(prefix='cli_test', length=15),
})
self.cmd(
"self-help check-name-availability --scope {scope} --name {diagnostic-name} --type 'Microsoft.Help/diagnostics'", checks=[
self.check('nameAvailable', 'True'),])
def test_help_check_name_solutions(self):
# Check solution name availability.
self.kwargs.update({
'scope': resource_id(subscription=self.get_subscription_id()),
'solution-name': self.create_random_name(prefix='cli_test', length=15),
})
self.cmd(
"self-help check-name-availability --scope {scope} --name {solution-name} --type 'Microsoft.Help/solutions'", checks=[
self.check('nameAvailable', 'True'),])
def test_help_check_name_troubleshooters(self):
# Check troubleshooter name availability.
self.kwargs.update({
'scope': resource_id(subscription=self.get_subscription_id()),
'troubleshooter-name': str(uuid.uuid4())
})
self.cmd(
"self-help check-name-availability --scope {scope} --name {troubleshooter-name} --type 'Microsoft.Help/troubleshooters'", checks=[
self.check('nameAvailable', 'True'),])
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_solutions(self, resource_group, key_vault):
# Create solution for keyVault resource.
solution_name = self.create_random_name(prefix='cli_test', length=15)
self.kwargs.update({
'scope': resource_id(resource_group=resource_group,
subscription=self.get_subscription_id(),
name=key_vault,
namespace='Microsoft.KeyVault',
type='vaults'),
'solution-name': solution_name,
'trigger-criteria': "[{name:solutionid,value:apollo-cognitve-search-custom-skill}]",
'update-trigger-criteria': "[{name:ReplacementKey,value:<!--56ee7509-92e1-4b9e-97c2-dda53065294c-->}]",
'parameters': '{SearchText:CanNotRDP,SymptomId:KeyVaultVaultNotFoundInsight}',
'update-parameters': '{SearchText:CanNotRDP,SymptomId:KeyVaultVaultNotFoundInsight}'
})
warmup_solution_result = self.cmd(
"self-help solution warmup --solution-name {solution-name} --parameters {parameters} --scope {scope}", checks=[])
create_solution_result = self.cmd(
"self-help solution create --solution-name {solution-name} --trigger-criteria {trigger-criteria} --parameters {parameters} --scope {scope}", checks=[
self.check('name', '{solution-name}'),
self.check('type', 'Microsoft.Help/Solutions')])
create_solution_result = create_solution_result.get_output_in_json()
self.assertTrue(create_solution_result is not None)
self.assertTrue(create_solution_result["id"] is not None)
self.assertTrue(create_solution_result["name"] is not None)
# Get solution for keyVault resource.
get_solution_result = self.cmd(
"self-help solution show --solution-name {solution-name} --scope {scope}", checks=[
self.check('name', '{solution-name}'),
self.check('type', 'Microsoft.Help/Solutions')])
get_solution_result = get_solution_result.get_output_in_json()
self.assertTrue(get_solution_result is not None)
self.assertTrue(get_solution_result["id"] is not None)
self.assertTrue(get_solution_result["name"] is not None)
# Update solution for keyVault resource.
update_solution_result = self.cmd(
"self-help solution update --solution-name {solution-name} --trigger-criteria {update-trigger-criteria} --parameters {update-parameters} --scope {scope}", checks=[
self.check('name', '{solution-name}'),
self.check('type', 'Microsoft.Help/Solutions')])
update_solution_result = update_solution_result.get_output_in_json()
self.assertTrue(update_solution_result is not None)
self.assertTrue(update_solution_result["id"] is not None)
self.assertTrue(update_solution_result["name"] is not None)
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_simplified_solutions(self, resource_group, key_vault):
# Create simplesolution for keyVault resource.
solution_name = self.create_random_name(prefix='cli_test', length=15)
self.kwargs.update({
'scope': resource_id(resource_group=resource_group,
subscription=self.get_subscription_id(),
name=key_vault,
namespace='Microsoft.KeyVault',
type='vaults'),
'solution-name': solution_name,
'solution-id': "apollo-cognitve-search-custom-skill",
'parameters': '{}',
})
create_solution_result = self.cmd(
"self-help simplified-solution create --solution-name {solution-name} --solution-id {solution-id} --parameters {parameters} --scope {scope}", checks=[
self.check('name', '{solution-name}'),
self.check('type', 'Microsoft.Help/simplifiedSolutions')])
create_solution_result = create_solution_result.get_output_in_json()
self.assertTrue(create_solution_result is not None)
self.assertTrue(create_solution_result["id"] is not None)
self.assertTrue(create_solution_result["name"] is not None)
# Get solution for keyVault resource.
get_solution_result = self.cmd(
"self-help simplified-solution show --solution-name {solution-name} --scope {scope}", checks=[
self.check('name', '{solution-name}'),
self.check('type', 'Microsoft.Help/simplifiedSolutions')])
get_solution_result = get_solution_result.get_output_in_json()
self.assertTrue(get_solution_result is not None)
self.assertTrue(get_solution_result["id"] is not None)
self.assertTrue(get_solution_result["name"] is not None)
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_self_help(self, resource_group, key_vault):
# Create simplesolution for keyVault resource.
solution_name = self.create_random_name(prefix='cli_test', length=15)
self.kwargs.update({
'solution-id': "apollo-48996ff7-002f-47c1-85b2-df138843d5d5",
})
# Get solution for keyVault resource.
get_solution_result = self.cmd(
"self-help solution-self-help show --solution-id {solution-id}", checks=[
self.check('name', '{solution-id}'),
self.check('type', 'Microsoft.Help/selfHelp')])
get_solution_result = get_solution_result.get_output_in_json()
self.assertTrue(get_solution_result is not None)
self.assertTrue(get_solution_result["id"] is not None)
self.assertTrue(get_solution_result["name"] is not None)
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_troubleshooters(self, resource_group, key_vault):
# Create solution for keyVault resource.
resourceId = resource_id(resource_group=resource_group,
subscription=self.get_subscription_id(),
name=key_vault,
namespace='Microsoft.KeyVault',
type='vaults')
self.kwargs.update({
'scope': resourceId,
'troubleshooter-name': '1b98e3d0-5b5e-4b8f-b1ea-de6142f99999',
'solution-id': 'e104dbdf-9e14-4c9f-bc78-21ac90382231',
'parameters': '{ResourceUri:' + resourceId + '}',
'responses': '[]'
})
create_troubleshooter_result = self.cmd(
"self-help troubleshooter create --troubleshooter-name {troubleshooter-name} --solution-id {solution-id} --parameters {parameters} --scope {scope}", checks=[
self.check('name', '{troubleshooter-name}'),
self.check('type', 'Microsoft.Help/troubleshooters')])
create_troubleshooter_result = create_troubleshooter_result.get_output_in_json()
self.assertTrue(create_troubleshooter_result is not None)
self.assertTrue(create_troubleshooter_result["id"] is not None)
self.assertTrue(create_troubleshooter_result["name"] is not None)
self.assertTrue(create_troubleshooter_result["steps"] is not None)
# Get solution for keyVault resource.
get_troubleshooter_result = self.cmd(
"self-help troubleshooter show --troubleshooter-name {troubleshooter-name} --scope {scope}", checks=[
self.check('name', '{troubleshooter-name}'),
self.check('type', 'Microsoft.Help/troubleshooters')])
get_troubleshooter_result = get_troubleshooter_result.get_output_in_json()
self.assertTrue(get_troubleshooter_result is not None)
self.assertTrue(get_troubleshooter_result["id"] is not None)
self.assertTrue(get_troubleshooter_result["name"] is not None)
self.assertTrue(get_troubleshooter_result["steps"] is not None)
self.kwargs.update(
{'step-id': get_troubleshooter_result["steps"][0]["id"]})
# End troubleshooter for keyVault resource.
self.cmd(
"self-help troubleshooter end --troubleshooter-name {troubleshooter-name} --scope {scope}")
# Restart troubleshooter for keyVault resource.
restart_troubleshooter_result = self.cmd(
"self-help troubleshooter restart --troubleshooter-name {troubleshooter-name} --scope {scope}")
restart_troubleshooter_result = restart_troubleshooter_result.get_output_in_json()
self.assertTrue(restart_troubleshooter_result is not None)
# Continue troubleshooter for keyVault resource.
self.cmd(
"self-help troubleshooter continue --troubleshooter-name {troubleshooter-name} --step-id {step-id} --responses {responses} --scope {scope}")
|
class SelfHelpScenario(ScenarioTest):
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_discoverysolutions(self, resource_group, key_vault):
pass
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_diagnostics(self, resource_group, key_vault):
pass
def test_help_check_name_diagnostics(self):
pass
def test_help_check_name_solutions(self):
pass
def test_help_check_name_troubleshooters(self):
pass
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_solutions(self, resource_group, key_vault):
pass
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_simplified_solutions(self, resource_group, key_vault):
pass
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_self_help(self, resource_group, key_vault):
pass
@ResourceGroupPreparer()
@KeyVaultPreparer()
def test_help_troubleshooters(self, resource_group, key_vault):
pass
| 22 | 0 | 27 | 3 | 22 | 2 | 1 | 0.08 | 1 | 1 | 0 | 0 | 9 | 0 | 9 | 9 | 270 | 40 | 213 | 36 | 191 | 17 | 93 | 30 | 83 | 1 | 1 | 0 | 9 |
9,646 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/self-help/azext_self_help/aaz/latest/self_help/troubleshooter/_restart.py
|
azext_self_help.aaz.latest.self_help.troubleshooter._restart.Restart.TroubleshootersRestart
|
class TroubleshootersRestart(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/{scope}/providers/Microsoft.Help/troubleshooters/{troubleshooterName}/restart",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"scope", self.ctx.args.scope,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"troubleshooterName", self.ctx.args.troubleshooter_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.troubleshooter_resource_name = AAZStrType(
serialized_name="troubleshooterResourceName",
flags={"read_only": True},
)
return cls._schema_on_200
|
class TroubleshootersRestart(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 84 | 14 | 70 | 26 | 53 | 0 | 34 | 19 | 24 | 2 | 1 | 1 | 11 |
9,647 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/tests/latest/test_demo.py
|
azext_redisenterprise.tests.latest.test_demo.Redisenterprisescenario2Test
|
class Redisenterprisescenario2Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario2Test, self).__init__(*args, **kwargs)
self.kwargs.update({
'cluster': self.create_random_name(prefix='clitest-cache2-', length=21),
'no_database': True
})
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg2-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario2(self):
call_scenario2(self)
calc_coverage(__file__)
raise_if()
|
class Redisenterprisescenario2Test(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg2-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario2(self):
pass
| 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 17 | 3 | 14 | 4 | 8 | 0 | 8 | 3 | 5 | 1 | 1 | 0 | 2 |
9,648 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/tests/latest/test_demo.py
|
azext_redisenterprise.tests.latest.test_demo.Redisenterprisescenario1Test
|
class Redisenterprisescenario1Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario1Test, self).__init__(*args, **kwargs)
self.kwargs.update({
'cluster': self.create_random_name(prefix='clitest-cache1-', length=21)
})
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg1-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario1(self, rg):
call_scenario1(self, rg)
calc_coverage(__file__)
raise_if()
|
class Redisenterprisescenario1Test(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg1-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario1(self, rg):
pass
| 5 | 0 | 5 | 1 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 16 | 3 | 13 | 4 | 7 | 0 | 8 | 3 | 5 | 1 | 1 | 0 | 2 |
9,649 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/operation_status/_show.py
|
azext_redisenterprise.aaz.latest.redisenterprise.operation_status._show.Show.OperationsStatusGet
|
class OperationsStatusGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus/{operationId}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"location", self.ctx.args.location,
required=True,
),
**self.serialize_url_param(
"operationId", self.ctx.args.operation_id,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.end_time = AAZStrType(
serialized_name="endTime",
)
_schema_on_200.error = AAZObjectType()
_ShowHelper._build_schema_error_response_read(_schema_on_200.error)
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.start_time = AAZStrType(
serialized_name="startTime",
)
_schema_on_200.status = AAZStrType()
return cls._schema_on_200
|
class OperationsStatusGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 94 | 14 | 80 | 26 | 63 | 0 | 40 | 19 | 30 | 2 | 1 | 1 | 11 |
9,650 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_wait.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._wait.Wait.AccessPolicyAssignmentGet
|
class AccessPolicyAssignmentGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accessPolicyAssignmentName", self.ctx.args.access_policy_assignment_name,
required=True,
),
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.access_policy_name = AAZStrType(
serialized_name="accessPolicyName",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user = AAZObjectType(
flags={"required": True},
)
user = cls._schema_on_200.properties.user
user.object_id = AAZStrType(
serialized_name="objectId",
flags={"required": True},
)
return cls._schema_on_200
|
class AccessPolicyAssignmentGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 11 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 122 | 16 | 106 | 28 | 89 | 0 | 43 | 21 | 33 | 2 | 1 | 1 | 11 |
9,651 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("accessPolicyName", AAZStrType, ".access_policy_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("user", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True}})
user = _builder.get(".properties.user")
if user is not None:
user.set_prop("objectId", AAZStrType, ".object_id",
typ_kwargs={"flags": {"required": True}})
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 10 | 2 | 9 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 23 | 5 | 18 | 6 | 15 | 0 | 14 | 6 | 11 | 3 | 1 | 1 | 4 |
9,652 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._update.Update.AccessPolicyAssignmentGet
|
class AccessPolicyAssignmentGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accessPolicyAssignmentName", self.ctx.args.access_policy_assignment_name,
required=True,
),
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_access_policy_assignment_read(
cls._schema_on_200)
return cls._schema_on_200
|
class AccessPolicyAssignmentGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 90 | 13 | 77 | 25 | 60 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,653 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._update.Update.AccessPolicyAssignmentCreateUpdate
|
class AccessPolicyAssignmentCreateUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accessPolicyAssignmentName", self.ctx.args.access_policy_assignment_name,
required=True,
),
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_access_policy_assignment_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class AccessPolicyAssignmentCreateUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 10 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 118 | 15 | 103 | 29 | 84 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
9,654 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_list.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._list.List.AccessPolicyAssignmentList
|
class AccessPolicyAssignmentList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.access_policy_name = AAZStrType(
serialized_name="accessPolicyName",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user = AAZObjectType(
flags={"required": True},
)
user = cls._schema_on_200.value.Element.properties.user
user.object_id = AAZStrType(
serialized_name="objectId",
flags={"required": True},
)
return cls._schema_on_200
|
class AccessPolicyAssignmentList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 128 | 18 | 110 | 30 | 93 | 0 | 48 | 23 | 38 | 2 | 1 | 1 | 11 |
9,655 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_delete.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._delete.Delete.AccessPolicyAssignmentDelete
|
class AccessPolicyAssignmentDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accessPolicyAssignmentName", self.ctx.args.access_policy_assignment_name,
required=True,
),
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class AccessPolicyAssignmentDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_204(self, session):
pass
def on_200_201(self, session):
pass
| 14 | 0 | 10 | 0 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 92 | 9 | 83 | 20 | 69 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,656 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_create.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database.access_policy_assignment._create.Create.AccessPolicyAssignmentCreateUpdate
|
class AccessPolicyAssignmentCreateUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accessPolicyAssignmentName", self.ctx.args.access_policy_assignment_name,
required=True,
),
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("accessPolicyName", AAZStrType, ".access_policy_name", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("user", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True}})
user = _builder.get(".properties.user")
if user is not None:
user.set_prop("objectId", AAZStrType, ".object_id",
typ_kwargs={"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.access_policy_name = AAZStrType(
serialized_name="accessPolicyName",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user = AAZObjectType(
flags={"required": True},
)
user = cls._schema_on_200_201.properties.user
user.object_id = AAZStrType(
serialized_name="objectId",
flags={"required": True},
)
return cls._schema_on_200_201
|
class AccessPolicyAssignmentCreateUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 14 | 1 | 13 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 161 | 20 | 141 | 34 | 122 | 0 | 56 | 25 | 45 | 3 | 1 | 1 | 15 |
9,657 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_wait.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._wait.Wait.DatabasesGet
|
class DatabasesGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.access_keys_authentication = AAZStrType(
serialized_name="accessKeysAuthentication",
)
properties.client_protocol = AAZStrType(
serialized_name="clientProtocol",
)
properties.clustering_policy = AAZStrType(
serialized_name="clusteringPolicy",
)
properties.defer_upgrade = AAZStrType(
serialized_name="deferUpgrade",
)
properties.eviction_policy = AAZStrType(
serialized_name="evictionPolicy",
)
properties.geo_replication = AAZObjectType(
serialized_name="geoReplication",
)
properties.modules = AAZListType()
properties.persistence = AAZObjectType()
properties.port = AAZIntType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.redis_version = AAZStrType(
serialized_name="redisVersion",
flags={"read_only": True},
)
properties.resource_state = AAZStrType(
serialized_name="resourceState",
flags={"read_only": True},
)
geo_replication = cls._schema_on_200.properties.geo_replication
geo_replication.group_nickname = AAZStrType(
serialized_name="groupNickname",
)
geo_replication.linked_databases = AAZListType(
serialized_name="linkedDatabases",
)
linked_databases = cls._schema_on_200.properties.geo_replication.linked_databases
linked_databases.Element = AAZObjectType()
_element = cls._schema_on_200.properties.geo_replication.linked_databases.Element
_element.id = AAZStrType()
_element.state = AAZStrType(
flags={"read_only": True},
)
modules = cls._schema_on_200.properties.modules
modules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.modules.Element
_element.args = AAZStrType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
persistence = cls._schema_on_200.properties.persistence
persistence.aof_enabled = AAZBoolType(
serialized_name="aofEnabled",
)
persistence.aof_frequency = AAZStrType(
serialized_name="aofFrequency",
)
persistence.rdb_enabled = AAZBoolType(
serialized_name="rdbEnabled",
)
persistence.rdb_frequency = AAZStrType(
serialized_name="rdbFrequency",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class DatabasesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 20 | 1 | 19 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 201 | 22 | 179 | 33 | 162 | 0 | 77 | 26 | 67 | 2 | 1 | 1 | 11 |
9,658 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._update.Update.InstanceUpdateByJson
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("accessKeysAuthentication",
AAZStrType, ".access_keys_authentication")
properties.set_prop(
"clientProtocol", AAZStrType, ".client_protocol")
properties.set_prop(
"deferUpgrade", AAZStrType, ".defer_upgrade")
properties.set_prop(
"evictionPolicy", AAZStrType, ".eviction_policy")
properties.set_prop(
"persistence", AAZObjectType, ".persistence")
persistence = _builder.get(".properties.persistence")
if persistence is not None:
persistence.set_prop("aofEnabled", AAZBoolType, ".aof_enabled")
persistence.set_prop(
"aofFrequency", AAZStrType, ".aof_frequency")
persistence.set_prop("rdbEnabled", AAZBoolType, ".rdb_enabled")
persistence.set_prop(
"rdbFrequency", AAZStrType, ".rdb_frequency")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 13 | 2 | 12 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 29 | 5 | 24 | 6 | 21 | 0 | 20 | 6 | 17 | 3 | 1 | 1 | 4 |
9,659 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._update.Update.DatabasesGet
|
class DatabasesGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_database_read(cls._schema_on_200)
return cls._schema_on_200
|
class DatabasesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,660 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_update.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._update.Update.DatabasesCreate
|
class DatabasesCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "original-uri"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_database_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class DatabasesCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
9,661 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_regenerate_key.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._regenerate_key.RegenerateKey.DatabasesRegenerateKey
|
class DatabasesRegenerateKey(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/regenerateKey",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("keyType", AAZStrType, ".key_type", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class DatabasesRegenerateKey(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 10 | 1 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 125 | 16 | 109 | 30 | 90 | 0 | 41 | 21 | 30 | 3 | 1 | 1 | 13 |
9,662 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_list_keys.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._list_keys.ListKeys.DatabasesListKeys
|
class DatabasesListKeys(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/listKeys",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class DatabasesListKeys(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 95 | 14 | 81 | 26 | 64 | 0 | 35 | 19 | 25 | 2 | 1 | 1 | 11 |
9,663 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_list.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._list.List.DatabasesListByCluster
|
class DatabasesListByCluster(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.client_protocol = AAZStrType(
serialized_name="clientProtocol",
)
properties.clustering_policy = AAZStrType(
serialized_name="clusteringPolicy",
)
properties.eviction_policy = AAZStrType(
serialized_name="evictionPolicy",
)
properties.geo_replication = AAZObjectType(
serialized_name="geoReplication",
)
properties.modules = AAZListType()
properties.persistence = AAZObjectType()
properties.port = AAZIntType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_state = AAZStrType(
serialized_name="resourceState",
flags={"read_only": True},
)
geo_replication = cls._schema_on_200.value.Element.properties.geo_replication
geo_replication.group_nickname = AAZStrType(
serialized_name="groupNickname",
)
geo_replication.linked_databases = AAZListType(
serialized_name="linkedDatabases",
)
linked_databases = cls._schema_on_200.value.Element.properties.geo_replication.linked_databases
linked_databases.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.geo_replication.linked_databases.Element
_element.id = AAZStrType()
_element.state = AAZStrType(
flags={"read_only": True},
)
modules = cls._schema_on_200.value.Element.properties.modules
modules.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.modules.Element
_element.args = AAZStrType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
persistence = cls._schema_on_200.value.Element.properties.persistence
persistence.aof_enabled = AAZBoolType(
serialized_name="aofEnabled",
)
persistence.aof_frequency = AAZStrType(
serialized_name="aofFrequency",
)
persistence.rdb_enabled = AAZBoolType(
serialized_name="rdbEnabled",
)
persistence.rdb_frequency = AAZStrType(
serialized_name="rdbFrequency",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class DatabasesListByCluster(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 20 | 2 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 197 | 24 | 173 | 34 | 156 | 0 | 79 | 27 | 69 | 2 | 1 | 1 | 11 |
9,664 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/tests/latest/test_demo.py
|
azext_redisenterprise.tests.latest.test_demo.Redisenterprisescenario3Test
|
class Redisenterprisescenario3Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario3Test, self).__init__(*args, **kwargs)
self.kwargs.update({
'subscription': self.get_subscription_id(),
'cluster31': self.create_random_name(prefix='clitest-cache31-', length=21),
'cluster32': self.create_random_name(prefix='clitest-cache32-', length=21),
'geo-replication': True,
'database': 'default',
})
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg31-', key='rg31', parameter_name='rg31',
location='westus3', random_name_length=34)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg32-', key='rg32', parameter_name='rg32',
location='westus3', random_name_length=34)
@AllowLargeResponse(size_kb=9999)
def test_redisenterprise_scenario3(self):
call_scenario3(self)
calc_coverage(__file__)
raise_if()
|
class Redisenterprisescenario3Test(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg31-', key='rg31', parameter_name='rg31',
location='westus3', random_name_length=34)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg32-', key='rg32', parameter_name='rg32',
location='westus3', random_name_length=34)
@AllowLargeResponse(size_kb=9999)
def test_redisenterprise_scenario3(self):
pass
| 6 | 0 | 7 | 1 | 7 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 21 | 2 | 19 | 5 | 11 | 0 | 8 | 3 | 5 | 1 | 1 | 0 | 2 |
9,665 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_import.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._import.Import.DatabasesImport
|
class DatabasesImport(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/import",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("sasUris", AAZListType, ".sas_uris", typ_kwargs={
"flags": {"required": True}})
sas_uris = _builder.get(".sasUris")
if sas_uris is not None:
sas_uris.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
pass
|
class DatabasesImport(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
| 17 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 9 | 9 | 100 | 12 | 88 | 26 | 71 | 0 | 34 | 18 | 24 | 3 | 1 | 1 | 12 |
9,666 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/tests/latest/test_demo.py
|
azext_redisenterprise.tests.latest.test_demo.Redisenterprisescenario4Test
|
class Redisenterprisescenario4Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario4Test, self).__init__(*args, **kwargs)
self.kwargs.update({
'cluster': self.create_random_name(prefix='clitest-cache4-', length=21),
'access-policy-assignment': True,
})
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg4-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario4(self, rg):
call_scenario4(self, rg)
calc_coverage(__file__)
raise_if()
|
class Redisenterprisescenario4Test(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg4-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario4(self, rg):
pass
| 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 17 | 3 | 14 | 4 | 8 | 0 | 8 | 3 | 5 | 1 | 1 | 0 | 2 |
9,667 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/_calculate_exchange.py
|
azext_reservation.aaz.latest.reservations._calculate_exchange.CalculateExchange.CalculateExchangePost
|
class CalculateExchangePost(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/calculateExchange",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("reservationsToExchange",
AAZListType, ".ris_to_exchange")
properties.set_prop("reservationsToPurchase",
AAZListType, ".ris_to_purchase")
properties.set_prop("savingsPlansToPurchase",
AAZListType, ".sp_to_purchase")
reservations_to_exchange = _builder.get(
".properties.reservationsToExchange")
if reservations_to_exchange is not None:
reservations_to_exchange.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.reservationsToExchange[]")
if _elements is not None:
_elements.set_prop("quantity", AAZIntType, ".quantity")
_elements.set_prop(
"reservationId", AAZStrType, ".reservation_id")
reservations_to_purchase = _builder.get(
".properties.reservationsToPurchase")
if reservations_to_purchase is not None:
reservations_to_purchase.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.reservationsToPurchase[]")
if _elements is not None:
_elements.set_prop("location", AAZStrType, ".location")
_elements.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_elements.set_prop("sku", AAZObjectType)
properties = _builder.get(
".properties.reservationsToPurchase[].properties")
if properties is not None:
_CalculateExchangeHelper._build_schema_applied_scope_properties_create(
properties.set_prop("appliedScopeProperties", AAZObjectType, ".applied_scope_properties"))
properties.set_prop("appliedScopeType",
AAZStrType, ".applied_scope_type")
properties.set_prop(
"appliedScopes", AAZListType, ".applied_scope")
properties.set_prop("billingPlan", AAZStrType, ".billing_plan")
properties.set_prop(
"billingScopeId", AAZStrType, ".billing_scope")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("quantity", AAZIntType, ".quantity")
properties.set_prop("renew", AAZBoolType, ".renew")
properties.set_prop(
"reservedResourceProperties", AAZObjectType)
properties.set_prop("reservedResourceType",
AAZStrType, ".reserved_resource_type")
properties.set_prop(
"reviewDateTime", AAZStrType, ".review_date_time")
properties.set_prop("term", AAZStrType, ".term")
applied_scopes = _builder.get(
".properties.reservationsToPurchase[].properties.appliedScopes")
if applied_scopes is not None:
applied_scopes.set_elements(AAZStrType, ".")
reserved_resource_properties = _builder.get(
".properties.reservationsToPurchase[].properties.reservedResourceProperties")
if reserved_resource_properties is not None:
reserved_resource_properties.set_prop(
"instanceFlexibility", AAZStrType, ".instance_flexibility")
sku = _builder.get(".properties.reservationsToPurchase[].sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".sku")
savings_plans_to_purchase = _builder.get(
".properties.savingsPlansToPurchase")
if savings_plans_to_purchase is not None:
savings_plans_to_purchase.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.savingsPlansToPurchase[]")
if _elements is not None:
_elements.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_CalculateExchangeHelper._build_schema_sku_name_create(
_elements.set_prop("sku", AAZObjectType, ".sku"))
properties = _builder.get(
".properties.savingsPlansToPurchase[].properties")
if properties is not None:
_CalculateExchangeHelper._build_schema_applied_scope_properties_create(
properties.set_prop("appliedScopeProperties", AAZObjectType, ".applied_scope_properties"))
properties.set_prop("appliedScopeType",
AAZStrType, ".applied_scope_type")
properties.set_prop("billingPlan", AAZStrType, ".billing_plan")
properties.set_prop(
"billingScopeId", AAZStrType, ".billing_scope_id")
properties.set_prop("commitment", AAZObjectType, ".commitment")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("term", AAZStrType, ".term")
commitment = _builder.get(
".properties.savingsPlansToPurchase[].properties.commitment")
if commitment is not None:
commitment.set_prop("amount", AAZFloatType, ".amount")
commitment.set_prop(
"currencyCode", AAZStrType, ".currency_code")
commitment.set_prop("grain", AAZStrType, ".grain")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.error = AAZObjectType()
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.status = AAZStrType()
error = cls._schema_on_200.error
error.code = AAZStrType()
error.message = AAZStrType()
properties = cls._schema_on_200.properties
properties.net_payable = AAZObjectType(
serialized_name="netPayable",
)
_CalculateExchangeHelper._build_schema_price_read(
properties.net_payable)
properties.policy_result = AAZObjectType(
serialized_name="policyResult",
)
properties.purchases_total = AAZObjectType(
serialized_name="purchasesTotal",
)
_CalculateExchangeHelper._build_schema_price_read(
properties.purchases_total)
properties.refunds_total = AAZObjectType(
serialized_name="refundsTotal",
)
_CalculateExchangeHelper._build_schema_price_read(
properties.refunds_total)
properties.reservations_to_exchange = AAZListType(
serialized_name="reservationsToExchange",
)
properties.reservations_to_purchase = AAZListType(
serialized_name="reservationsToPurchase",
)
properties.savings_plans_to_purchase = AAZListType(
serialized_name="savingsPlansToPurchase",
)
properties.session_id = AAZStrType(
serialized_name="sessionId",
)
policy_result = cls._schema_on_200.properties.policy_result
policy_result.policy_errors = AAZListType(
serialized_name="policyErrors",
)
policy_errors = cls._schema_on_200.properties.policy_result.policy_errors
policy_errors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.policy_result.policy_errors.Element
_element.code = AAZStrType()
_element.message = AAZStrType()
reservations_to_exchange = cls._schema_on_200.properties.reservations_to_exchange
reservations_to_exchange.Element = AAZObjectType()
_element = cls._schema_on_200.properties.reservations_to_exchange.Element
_element.billing_information = AAZObjectType(
serialized_name="billingInformation",
)
_element.billing_refund_amount = AAZObjectType(
serialized_name="billingRefundAmount",
)
_CalculateExchangeHelper._build_schema_price_read(
_element.billing_refund_amount)
_element.quantity = AAZIntType()
_element.reservation_id = AAZStrType(
serialized_name="reservationId",
)
billing_information = cls._schema_on_200.properties.reservations_to_exchange.Element.billing_information
billing_information.billing_currency_prorated_amount = AAZObjectType(
serialized_name="billingCurrencyProratedAmount",
)
_CalculateExchangeHelper._build_schema_price_read(
billing_information.billing_currency_prorated_amount)
billing_information.billing_currency_remaining_commitment_amount = AAZObjectType(
serialized_name="billingCurrencyRemainingCommitmentAmount",
)
_CalculateExchangeHelper._build_schema_price_read(
billing_information.billing_currency_remaining_commitment_amount)
billing_information.billing_currency_total_paid_amount = AAZObjectType(
serialized_name="billingCurrencyTotalPaidAmount",
)
_CalculateExchangeHelper._build_schema_price_read(
billing_information.billing_currency_total_paid_amount)
reservations_to_purchase = cls._schema_on_200.properties.reservations_to_purchase
reservations_to_purchase.Element = AAZObjectType()
_element = cls._schema_on_200.properties.reservations_to_purchase.Element
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_CalculateExchangeHelper._build_schema_price_read(
_element.billing_currency_total)
_element.properties = AAZObjectType()
properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties
properties.location = AAZStrType()
properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties.sku = AAZObjectType()
_CalculateExchangeHelper._build_schema_sku_name_read(
properties.sku)
properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_CalculateExchangeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
applied_scopes = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties.applied_scopes
applied_scopes.Element = AAZStrType()
reserved_resource_properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
savings_plans_to_purchase = cls._schema_on_200.properties.savings_plans_to_purchase
savings_plans_to_purchase.Element = AAZObjectType()
_element = cls._schema_on_200.properties.savings_plans_to_purchase.Element
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_CalculateExchangeHelper._build_schema_price_read(
_element.billing_currency_total)
_element.properties = AAZObjectType()
properties = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties
properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties.sku = AAZObjectType()
_CalculateExchangeHelper._build_schema_sku_name_read(
properties.sku)
properties = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_CalculateExchangeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.commitment = AAZObjectType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.term = AAZStrType()
commitment = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties.properties.commitment
commitment.amount = AAZFloatType()
commitment.currency_code = AAZStrType(
serialized_name="currencyCode",
)
commitment.grain = AAZStrType()
return cls._schema_on_200
|
class CalculateExchangePost(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 37 | 4 | 33 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 355 | 47 | 308 | 48 | 291 | 0 | 194 | 40 | 184 | 14 | 1 | 1 | 25 |
9,668 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation_order/_list.py
|
azext_reservation.aaz.latest.reservations.reservation_order._list.List.ReservationOrderList
|
class ReservationOrderList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_ListHelper._build_schema_system_data_read(_element.system_data)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.created_date_time = AAZStrType(
serialized_name="createdDateTime",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.original_quantity = AAZIntType(
serialized_name="originalQuantity",
)
properties.plan_information = AAZObjectType(
serialized_name="planInformation",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.request_date_time = AAZStrType(
serialized_name="requestDateTime",
)
properties.reservations = AAZListType()
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
plan_information = cls._schema_on_200.value.Element.properties.plan_information
plan_information.next_payment_due_date = AAZStrType(
serialized_name="nextPaymentDueDate",
)
plan_information.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
_ListHelper._build_schema_price_read(
plan_information.pricing_currency_total)
plan_information.start_date = AAZStrType(
serialized_name="startDate",
)
plan_information.transactions = AAZListType()
transactions = cls._schema_on_200.value.Element.properties.plan_information.transactions
transactions.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.plan_information.transactions.Element
_element.billing_account = AAZStrType(
serialized_name="billingAccount",
)
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_ListHelper._build_schema_price_read(
_element.billing_currency_total)
_element.due_date = AAZStrType(
serialized_name="dueDate",
)
_element.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
_ListHelper._build_schema_extended_status_info_read(
_element.extended_status_info)
_element.payment_date = AAZStrType(
serialized_name="paymentDate",
)
_element.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
_ListHelper._build_schema_price_read(
_element.pricing_currency_total)
_element.status = AAZStrType()
reservations = cls._schema_on_200.value.Element.properties.reservations
reservations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.reservations.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_ListHelper._build_schema_system_data_read(_element.system_data)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
_ListHelper._build_schema_extended_status_info_read(
properties.extended_status_info)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
merge_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.value.Element.properties.reservations.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.value.Element.properties.reservations.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.value.Element.properties.reservations.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.value.Element.properties.reservations.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.value.Element.properties.reservations.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.reservations.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
return cls._schema_on_200
|
class ReservationOrderList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 15 | 0 | 51 | 3 | 47 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 7 | 0 | 8 | 8 | 424 | 36 | 388 | 41 | 373 | 0 | 183 | 35 | 174 | 2 | 1 | 1 | 10 |
9,669 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation_order/_change_directory.py
|
azext_reservation.aaz.latest.reservations.reservation_order._change_directory.ChangeDirectory.ReservationOrderChangeDirectory
|
class ReservationOrderChangeDirectory(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("destinationTenantId",
AAZStrType, ".destination_tenant_id")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.reservation_order = AAZObjectType(
serialized_name="reservationOrder",
)
_ChangeDirectoryHelper._build_schema_change_directory_result_read(
_schema_on_200.reservation_order)
_schema_on_200.reservations = AAZListType()
reservations = cls._schema_on_200.reservations
reservations.Element = AAZObjectType()
_ChangeDirectoryHelper._build_schema_change_directory_result_read(
reservations.Element)
return cls._schema_on_200
|
class ReservationOrderChangeDirectory(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 1 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 98 | 17 | 81 | 30 | 62 | 0 | 43 | 22 | 32 | 2 | 1 | 1 | 12 |
9,670 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation_order/_calculate_refund.py
|
azext_reservation.aaz.latest.reservations.reservation_order._calculate_refund.CalculateRefund.CalculateRefundPost
|
class CalculateRefundPost(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("id", AAZStrType, ".id")
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("reservationToReturn", AAZObjectType)
properties.set_prop("scope", AAZStrType, ".scope")
reservation_to_return = _builder.get(
".properties.reservationToReturn")
if reservation_to_return is not None:
reservation_to_return.set_prop(
"quantity", AAZIntType, ".quantity")
reservation_to_return.set_prop(
"reservationId", AAZStrType, ".reservation_id")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType()
_schema_on_200.properties = AAZObjectType()
properties = cls._schema_on_200.properties
properties.billing_information = AAZObjectType(
serialized_name="billingInformation",
)
properties.billing_refund_amount = AAZObjectType(
serialized_name="billingRefundAmount",
)
_CalculateRefundHelper._build_schema_price_read(
properties.billing_refund_amount)
properties.policy_result = AAZObjectType(
serialized_name="policyResult",
)
properties.pricing_refund_amount = AAZObjectType(
serialized_name="pricingRefundAmount",
)
_CalculateRefundHelper._build_schema_price_read(
properties.pricing_refund_amount)
properties.quantity = AAZIntType()
properties.session_id = AAZStrType(
serialized_name="sessionId",
)
billing_information = cls._schema_on_200.properties.billing_information
billing_information.billing_currency_prorated_amount = AAZObjectType(
serialized_name="billingCurrencyProratedAmount",
)
_CalculateRefundHelper._build_schema_price_read(
billing_information.billing_currency_prorated_amount)
billing_information.billing_currency_remaining_commitment_amount = AAZObjectType(
serialized_name="billingCurrencyRemainingCommitmentAmount",
)
_CalculateRefundHelper._build_schema_price_read(
billing_information.billing_currency_remaining_commitment_amount)
billing_information.billing_currency_total_paid_amount = AAZObjectType(
serialized_name="billingCurrencyTotalPaidAmount",
)
_CalculateRefundHelper._build_schema_price_read(
billing_information.billing_currency_total_paid_amount)
billing_information.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
billing_information.completed_transactions = AAZIntType(
serialized_name="completedTransactions",
)
billing_information.total_transactions = AAZIntType(
serialized_name="totalTransactions",
)
policy_result = cls._schema_on_200.properties.policy_result
policy_result.properties = AAZObjectType()
properties = cls._schema_on_200.properties.policy_result.properties
properties.consumed_refunds_total = AAZObjectType(
serialized_name="consumedRefundsTotal",
)
_CalculateRefundHelper._build_schema_price_read(
properties.consumed_refunds_total)
properties.max_refund_limit = AAZObjectType(
serialized_name="maxRefundLimit",
)
_CalculateRefundHelper._build_schema_price_read(
properties.max_refund_limit)
properties.policy_errors = AAZListType(
serialized_name="policyErrors",
)
policy_errors = cls._schema_on_200.properties.policy_result.properties.policy_errors
policy_errors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.policy_result.properties.policy_errors.Element
_element.code = AAZStrType()
_element.message = AAZStrType()
return cls._schema_on_200
|
class CalculateRefundPost(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 15 | 1 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 168 | 24 | 144 | 36 | 125 | 0 | 80 | 28 | 69 | 3 | 1 | 1 | 14 |
9,671 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation_order/_calculate.py
|
azext_reservation.aaz.latest.reservations.reservation_order._calculate.Calculate.ReservationOrderCalculate
|
class ReservationOrderCalculate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/calculatePrice",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("sku", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("appliedScopeProperties",
AAZObjectType, ".applied_scope_property")
properties.set_prop("appliedScopeType",
AAZStrType, ".applied_scope_type")
properties.set_prop(
"appliedScopes", AAZListType, ".applied_scope")
properties.set_prop("billingPlan", AAZStrType, ".billing_plan")
properties.set_prop(
"billingScopeId", AAZStrType, ".billing_scope")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("quantity", AAZIntType, ".quantity")
properties.set_prop("renew", AAZBoolType, ".renew")
properties.set_prop(
"reservedResourceProperties", AAZObjectType)
properties.set_prop("reservedResourceType",
AAZStrType, ".reserved_resource_type")
properties.set_prop(
"reviewDateTime", AAZStrType, ".review_date_time")
properties.set_prop("term", AAZStrType, ".term")
applied_scope_properties = _builder.get(
".properties.appliedScopeProperties")
if applied_scope_properties is not None:
applied_scope_properties.set_prop(
"displayName", AAZStrType, ".display_name")
applied_scope_properties.set_prop(
"managementGroupId", AAZStrType, ".management_group_id")
applied_scope_properties.set_prop(
"resourceGroupId", AAZStrType, ".resource_group_id")
applied_scope_properties.set_prop(
"subscriptionId", AAZStrType, ".subscription_id")
applied_scope_properties.set_prop(
"tenantId", AAZStrType, ".tenant_id")
applied_scopes = _builder.get(".properties.appliedScopes")
if applied_scopes is not None:
applied_scopes.set_elements(AAZStrType, ".")
reserved_resource_properties = _builder.get(
".properties.reservedResourceProperties")
if reserved_resource_properties is not None:
reserved_resource_properties.set_prop(
"instanceFlexibility", AAZStrType, ".instance_flexibility")
sku = _builder.get(".sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".sku")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.properties = AAZObjectType()
properties = cls._schema_on_200.properties
properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
properties.grand_total = AAZFloatType(
serialized_name="grandTotal",
)
properties.is_billing_partner_managed = AAZBoolType(
serialized_name="isBillingPartnerManaged",
)
properties.is_tax_included = AAZBoolType(
serialized_name="isTaxIncluded",
)
properties.net_total = AAZFloatType(
serialized_name="netTotal",
)
properties.payment_schedule = AAZListType(
serialized_name="paymentSchedule",
)
properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
properties.reservation_order_id = AAZStrType(
serialized_name="reservationOrderId",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.sku_title = AAZStrType(
serialized_name="skuTitle",
)
properties.tax_total = AAZFloatType(
serialized_name="taxTotal",
)
billing_currency_total = cls._schema_on_200.properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
payment_schedule = cls._schema_on_200.properties.payment_schedule
payment_schedule.Element = AAZObjectType()
_element = cls._schema_on_200.properties.payment_schedule.Element
_element.billing_account = AAZStrType(
serialized_name="billingAccount",
)
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_CalculateHelper._build_schema_price_read(
_element.billing_currency_total)
_element.due_date = AAZStrType(
serialized_name="dueDate",
)
_element.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
_element.payment_date = AAZStrType(
serialized_name="paymentDate",
)
_element.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
_CalculateHelper._build_schema_price_read(
_element.pricing_currency_total)
_element.status = AAZStrType()
extended_status_info = cls._schema_on_200.properties.payment_schedule.Element.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
pricing_currency_total = cls._schema_on_200.properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
return cls._schema_on_200
|
class ReservationOrderCalculate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 20 | 2 | 18 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 196 | 26 | 170 | 37 | 153 | 0 | 100 | 30 | 90 | 6 | 1 | 1 | 16 |
9,672 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_wait.py
|
azext_reservation.aaz.latest.reservations.reservation._wait.Wait.ReservationGet
|
class ReservationGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZIntType()
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.kind = AAZStrType()
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.sku = AAZObjectType()
_WaitHelper._build_schema_sku_name_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_WaitHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_WaitHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_WaitHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_WaitHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_WaitHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 37 | 2 | 35 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 356 | 31 | 325 | 42 | 308 | 0 | 146 | 35 | 136 | 2 | 1 | 1 | 11 |
9,673 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_update.py
|
azext_reservation.aaz.latest.reservations.reservation._update.Update.ReservationUpdate
|
class ReservationUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
_UpdateHelper._build_schema_applied_scope_properties_update(properties.set_prop(
"appliedScopeProperties", AAZObjectType, ".applied_scope_property"))
properties.set_prop("appliedScopeType",
AAZStrType, ".applied_scope_type")
_UpdateHelper._build_schema_applied_scopes_update(
properties.set_prop("appliedScopes", AAZListType, ".applied_scopes"))
properties.set_prop("instanceFlexibility",
AAZStrType, ".instance_flexibility")
properties.set_prop("name", AAZStrType, ".name")
properties.set_prop("renew", AAZBoolType, ".renew")
properties.set_prop("renewProperties", AAZObjectType)
renew_properties = _builder.get(".properties.renewProperties")
if renew_properties is not None:
renew_properties.set_prop(
"purchaseProperties", AAZObjectType, ".renewal_properties")
purchase_properties = _builder.get(
".properties.renewProperties.purchaseProperties")
if purchase_properties is not None:
purchase_properties.set_prop(
"location", AAZStrType, ".location")
purchase_properties.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
purchase_properties.set_prop("sku", AAZObjectType)
properties = _builder.get(
".properties.renewProperties.purchaseProperties.properties")
if properties is not None:
_UpdateHelper._build_schema_applied_scope_properties_update(properties.set_prop(
"appliedScopeProperties", AAZObjectType, ".applied_scope_properties"))
properties.set_prop("appliedScopeType",
AAZStrType, ".applied_scope_type")
_UpdateHelper._build_schema_applied_scopes_update(
properties.set_prop("appliedScopes", AAZListType, ".applied_scopes"))
properties.set_prop("billingPlan", AAZStrType, ".billing_plan")
properties.set_prop(
"billingScopeId", AAZStrType, ".billing_scope_id")
properties.set_prop("displayName", AAZStrType, ".display_name")
properties.set_prop("quantity", AAZIntType, ".quantity")
properties.set_prop("renew", AAZBoolType, ".renew")
properties.set_prop(
"reservedResourceProperties", AAZObjectType)
properties.set_prop("reservedResourceType",
AAZStrType, ".reserved_resource_type")
properties.set_prop("term", AAZStrType, ".term")
reserved_resource_properties = _builder.get(
".properties.renewProperties.purchaseProperties.properties.reservedResourceProperties")
if reserved_resource_properties is not None:
reserved_resource_properties.set_prop(
"instanceFlexibility", AAZStrType, ".instance_flexibility")
sku = _builder.get(
".properties.renewProperties.purchaseProperties.sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".sku")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZIntType()
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.kind = AAZStrType()
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.sku = AAZObjectType()
_UpdateHelper._build_schema_sku_name_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_UpdateHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_UpdateHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_UpdateHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_UpdateHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_UpdateHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 40 | 3 | 38 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 425 | 39 | 386 | 51 | 367 | 0 | 188 | 42 | 177 | 7 | 1 | 1 | 19 |
9,674 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_unarchive.py
|
azext_reservation.aaz.latest.reservations.reservation._unarchive.Unarchive.ReservationUnarchive
|
class ReservationUnarchive(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
|
class ReservationUnarchive(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
| 13 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 52 | 8 | 44 | 18 | 31 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
9,675 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_split.py
|
azext_reservation.aaz.latest.reservations.reservation._split.Split.ReservationSplit
|
class ReservationSplit(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("quantities", AAZListType, ".quantities")
properties.set_prop(
"reservationId", AAZStrType, ".reservation_id")
quantities = _builder.get(".properties.quantities")
if quantities is not None:
quantities.set_elements(AAZIntType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZListType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.Element = AAZObjectType()
_element = cls._schema_on_200.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_SplitHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_SplitHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_SplitHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.Element.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_SplitHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_SplitHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_SplitHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationSplit(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 37 | 3 | 34 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 391 | 36 | 355 | 48 | 336 | 0 | 161 | 39 | 150 | 3 | 1 | 1 | 15 |
9,676 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_show.py
|
azext_reservation.aaz.latest.reservations.reservation._show.Show.ReservationGet
|
class ReservationGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$expand", self.ctx.args.expand,
),
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZIntType()
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.kind = AAZStrType()
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.sku = AAZObjectType()
_ShowHelper._build_schema_sku_name_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ShowHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ShowHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_ShowHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ShowHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ShowHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 37 | 2 | 35 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 356 | 31 | 325 | 42 | 308 | 0 | 146 | 35 | 136 | 2 | 1 | 1 | 11 |
9,677 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_merge.py
|
azext_reservation.aaz.latest.reservations.reservation._merge.Merge.ReservationMerge
|
class ReservationMerge(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("sources", AAZListType, ".sources")
sources = _builder.get(".properties.sources")
if sources is not None:
sources.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZListType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.Element = AAZObjectType()
_element = cls._schema_on_200.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_MergeHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_MergeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_MergeHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.Element.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_MergeHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_MergeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_MergeHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationMerge(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 37 | 3 | 34 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 390 | 36 | 354 | 48 | 335 | 0 | 160 | 39 | 149 | 3 | 1 | 1 | 15 |
9,678 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_list_history.py
|
azext_reservation.aaz.latest.reservations.reservation._list_history.ListHistory.ReservationListRevisions
|
class ReservationListRevisions(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_ListHistoryHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHistoryHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHistoryHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.value.Element.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.value.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.value.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.value.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_ListHistoryHelper._build_schema_sku_name_read(
purchase_properties.sku)
properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHistoryHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHistoryHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.value.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.value.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.value.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.value.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.value.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationListRevisions(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 38 | 3 | 35 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 362 | 33 | 329 | 43 | 312 | 0 | 151 | 36 | 141 | 2 | 1 | 1 | 11 |
9,679 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_list_available_scope.py
|
azext_reservation.aaz.latest.reservations.reservation._list_available_scope.ListAvailableScope.ReservationAvailableScopes
|
class ReservationAvailableScopes(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("scopes", AAZListType, ".scopes")
scopes = _builder.get(".properties.scopes")
if scopes is not None:
scopes.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.properties = AAZObjectType()
properties = cls._schema_on_200.properties
properties.scopes = AAZListType()
scopes = cls._schema_on_200.properties.scopes
scopes.Element = AAZObjectType()
_element = cls._schema_on_200.properties.scopes.Element
_element.scope = AAZStrType()
_element.valid = AAZBoolType()
return cls._schema_on_200
|
class ReservationAvailableScopes(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 11 | 1 | 10 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 128 | 21 | 107 | 35 | 88 | 0 | 53 | 26 | 42 | 3 | 1 | 1 | 15 |
9,680 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_list.py
|
azext_reservation.aaz.latest.reservations.reservation._list.List.ReservationList
|
class ReservationList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.value.Element.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.value.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.value.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.value.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.value.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.value.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.value.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.value.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.value.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 38 | 3 | 35 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 358 | 33 | 325 | 43 | 308 | 0 | 151 | 36 | 141 | 2 | 1 | 1 | 11 |
9,681 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/reservation/_archive.py
|
azext_reservation.aaz.latest.reservations.reservation._archive.Archive.ReservationArchive
|
class ReservationArchive(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"reservationId", self.ctx.args.reservation_id,
required=True,
),
**self.serialize_url_param(
"reservationOrderId", self.ctx.args.reservation_order_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
|
class ReservationArchive(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
| 13 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 52 | 8 | 44 | 18 | 31 | 0 | 22 | 13 | 14 | 2 | 1 | 1 | 8 |
9,682 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/catalog/_show.py
|
azext_reservation.aaz.latest.reservations.catalog._show.Show.GetCatalog
|
class GetCatalog(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.args.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"location", self.ctx.args.location,
),
**self.serialize_query_param(
"offerId", self.ctx.args.offer_id,
),
**self.serialize_query_param(
"planId", self.ctx.args.plan_id,
),
**self.serialize_query_param(
"publisherId", self.ctx.args.publisher_id,
),
**self.serialize_query_param(
"reservedResourceType", self.ctx.args.reserved_resource_type,
),
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.total_items = AAZIntType(
serialized_name="totalItems",
)
_schema_on_200.value = AAZListType(
flags={"read_only": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.billing_plans = AAZDictType(
serialized_name="billingPlans",
)
_element.capabilities = AAZListType(
flags={"read_only": True},
)
_element.locations = AAZListType(
flags={"read_only": True},
)
_element.msrp = AAZObjectType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.resource_type = AAZStrType(
serialized_name="resourceType",
flags={"read_only": True},
)
_element.restrictions = AAZListType(
flags={"read_only": True},
)
_element.size = AAZStrType(
flags={"read_only": True},
)
_element.sku_properties = AAZListType(
serialized_name="skuProperties",
flags={"read_only": True},
)
_element.terms = AAZListType(
flags={"read_only": True},
)
_element.tier = AAZStrType(
flags={"read_only": True},
)
billing_plans = cls._schema_on_200.value.Element.billing_plans
billing_plans.Element = AAZListType()
_element = cls._schema_on_200.value.Element.billing_plans.Element
_element.Element = AAZStrType()
capabilities = cls._schema_on_200.value.Element.capabilities
capabilities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.capabilities.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
locations = cls._schema_on_200.value.Element.locations
locations.Element = AAZStrType()
msrp = cls._schema_on_200.value.Element.msrp
msrp.p1_y = AAZObjectType(
serialized_name="p1Y",
)
_ShowHelper._build_schema_price_read(msrp.p1_y)
msrp.p3_y = AAZObjectType(
serialized_name="p3Y",
)
_ShowHelper._build_schema_price_read(msrp.p3_y)
msrp.p5_y = AAZObjectType(
serialized_name="p5Y",
)
_ShowHelper._build_schema_price_read(msrp.p5_y)
restrictions = cls._schema_on_200.value.Element.restrictions
restrictions.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.restrictions.Element
_element.reason_code = AAZStrType(
serialized_name="reasonCode",
)
_element.type = AAZStrType()
_element.values = AAZListType()
values = cls._schema_on_200.value.Element.restrictions.Element.values
values.Element = AAZStrType()
sku_properties = cls._schema_on_200.value.Element.sku_properties
sku_properties.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.sku_properties.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
terms = cls._schema_on_200.value.Element.terms
terms.Element = AAZStrType()
return cls._schema_on_200
|
class GetCatalog(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 20 | 2 | 18 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 196 | 28 | 168 | 36 | 151 | 0 | 83 | 29 | 73 | 2 | 1 | 1 | 11 |
9,683 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/_list.py
|
azext_reservation.aaz.latest.reservations._list.List.ReservationListAll
|
class ReservationListAll(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/reservations",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$orderby", self.ctx.args.orderby,
),
**self.serialize_query_param(
"selectedState", self.ctx.args.selected_state,
),
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.summary = AAZObjectType()
_schema_on_200.value = AAZListType(
flags={"read_only": True},
)
summary = cls._schema_on_200.summary
summary.cancelled_count = AAZFloatType(
serialized_name="cancelledCount",
flags={"read_only": True},
)
summary.expired_count = AAZFloatType(
serialized_name="expiredCount",
flags={"read_only": True},
)
summary.expiring_count = AAZFloatType(
serialized_name="expiringCount",
flags={"read_only": True},
)
summary.failed_count = AAZFloatType(
serialized_name="failedCount",
flags={"read_only": True},
)
summary.no_benefit_count = AAZFloatType(
serialized_name="noBenefitCount",
flags={"read_only": True},
)
summary.pending_count = AAZFloatType(
serialized_name="pendingCount",
flags={"read_only": True},
)
summary.processing_count = AAZFloatType(
serialized_name="processingCount",
flags={"read_only": True},
)
summary.succeeded_count = AAZFloatType(
serialized_name="succeededCount",
flags={"read_only": True},
)
summary.warning_count = AAZFloatType(
serialized_name="warningCount",
flags={"read_only": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZIntType()
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.kind = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.archived = AAZBoolType()
properties.benefit_start_time = AAZStrType(
serialized_name="benefitStartTime",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.capabilities = AAZStrType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.display_provisioning_state = AAZStrType(
serialized_name="displayProvisioningState",
flags={"read_only": True},
)
properties.effective_date_time = AAZStrType(
serialized_name="effectiveDateTime",
)
properties.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
properties.expiry_date_time = AAZStrType(
serialized_name="expiryDateTime",
)
properties.extended_status_info = AAZObjectType(
serialized_name="extendedStatusInfo",
)
properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
properties.last_updated_date_time = AAZStrType(
serialized_name="lastUpdatedDateTime",
flags={"read_only": True},
)
properties.merge_properties = AAZObjectType(
serialized_name="mergeProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.provisioning_sub_state = AAZStrType(
serialized_name="provisioningSubState",
flags={"read_only": True},
)
properties.purchase_date = AAZStrType(
serialized_name="purchaseDate",
)
properties.purchase_date_time = AAZStrType(
serialized_name="purchaseDateTime",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.renew_destination = AAZStrType(
serialized_name="renewDestination",
)
properties.renew_properties = AAZObjectType(
serialized_name="renewProperties",
)
properties.renew_source = AAZStrType(
serialized_name="renewSource",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.sku_description = AAZStrType(
serialized_name="skuDescription",
)
properties.split_properties = AAZObjectType(
serialized_name="splitProperties",
)
properties.swap_properties = AAZObjectType(
serialized_name="swapProperties",
)
properties.term = AAZStrType()
properties.user_friendly_applied_scope_type = AAZStrType(
serialized_name="userFriendlyAppliedScopeType",
flags={"read_only": True},
)
properties.user_friendly_renew_state = AAZStrType(
serialized_name="userFriendlyRenewState",
flags={"read_only": True},
)
properties.utilization = AAZObjectType(
flags={"read_only": True},
)
extended_status_info = cls._schema_on_200.value.Element.properties.extended_status_info
extended_status_info.message = AAZStrType()
extended_status_info.status_code = AAZStrType(
serialized_name="statusCode",
)
merge_properties = cls._schema_on_200.value.Element.properties.merge_properties
merge_properties.merge_destination = AAZStrType(
serialized_name="mergeDestination",
)
merge_properties.merge_sources = AAZListType(
serialized_name="mergeSources",
)
merge_sources = cls._schema_on_200.value.Element.properties.merge_properties.merge_sources
merge_sources.Element = AAZStrType()
renew_properties = cls._schema_on_200.value.Element.properties.renew_properties
renew_properties.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
renew_properties.pricing_currency_total = AAZObjectType(
serialized_name="pricingCurrencyTotal",
)
renew_properties.purchase_properties = AAZObjectType(
serialized_name="purchaseProperties",
)
billing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.billing_currency_total
billing_currency_total.amount = AAZFloatType()
billing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
pricing_currency_total = cls._schema_on_200.value.Element.properties.renew_properties.pricing_currency_total
pricing_currency_total.amount = AAZFloatType()
pricing_currency_total.currency_code = AAZStrType(
serialized_name="currencyCode",
)
purchase_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties
purchase_properties.location = AAZStrType()
purchase_properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
purchase_properties.sku = AAZObjectType()
_ListHelper._build_schema_sku_name_read(purchase_properties.sku)
properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ListHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
_ListHelper._build_schema_applied_scopes_read(
properties.applied_scopes)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
reserved_resource_properties = cls._schema_on_200.value.Element.properties.renew_properties.purchase_properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
split_properties = cls._schema_on_200.value.Element.properties.split_properties
split_properties.split_destinations = AAZListType(
serialized_name="splitDestinations",
)
split_properties.split_source = AAZStrType(
serialized_name="splitSource",
)
split_destinations = cls._schema_on_200.value.Element.properties.split_properties.split_destinations
split_destinations.Element = AAZStrType()
swap_properties = cls._schema_on_200.value.Element.properties.swap_properties
swap_properties.swap_destination = AAZStrType(
serialized_name="swapDestination",
)
swap_properties.swap_source = AAZStrType(
serialized_name="swapSource",
)
utilization = cls._schema_on_200.value.Element.properties.utilization
utilization.aggregates = AAZListType()
utilization.trend = AAZStrType(
flags={"read_only": True},
)
aggregates = cls._schema_on_200.value.Element.properties.utilization.aggregates
aggregates.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.utilization.aggregates.Element
_element.grain = AAZFloatType(
flags={"read_only": True},
)
_element.grain_unit = AAZStrType(
serialized_name="grainUnit",
flags={"read_only": True},
)
_element.value = AAZFloatType(
flags={"read_only": True},
)
_element.value_unit = AAZStrType(
serialized_name="valueUnit",
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ReservationListAll(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 15 | 0 | 48 | 3 | 45 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 7 | 0 | 8 | 8 | 399 | 33 | 366 | 41 | 351 | 0 | 159 | 35 | 150 | 2 | 1 | 1 | 10 |
9,684 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/reservation/azext_reservation/aaz/latest/reservations/_exchange.py
|
azext_reservation.aaz.latest.reservations._exchange.Exchange.ExchangePost
|
class ExchangePost(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Capacity/exchange",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("sessionId", AAZStrType, ".session_id")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.error = AAZObjectType()
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.properties = AAZObjectType()
_schema_on_200.status = AAZStrType()
error = cls._schema_on_200.error
error.code = AAZStrType()
error.message = AAZStrType()
properties = cls._schema_on_200.properties
properties.net_payable = AAZObjectType(
serialized_name="netPayable",
)
_ExchangeHelper._build_schema_price_read(properties.net_payable)
properties.policy_result = AAZObjectType(
serialized_name="policyResult",
)
properties.purchases_total = AAZObjectType(
serialized_name="purchasesTotal",
)
_ExchangeHelper._build_schema_price_read(
properties.purchases_total)
properties.refunds_total = AAZObjectType(
serialized_name="refundsTotal",
)
_ExchangeHelper._build_schema_price_read(properties.refunds_total)
properties.reservations_to_exchange = AAZListType(
serialized_name="reservationsToExchange",
)
properties.reservations_to_purchase = AAZListType(
serialized_name="reservationsToPurchase",
)
properties.savings_plans_to_purchase = AAZListType(
serialized_name="savingsPlansToPurchase",
)
properties.session_id = AAZStrType(
serialized_name="sessionId",
)
policy_result = cls._schema_on_200.properties.policy_result
policy_result.policy_errors = AAZListType(
serialized_name="policyErrors",
)
policy_errors = cls._schema_on_200.properties.policy_result.policy_errors
policy_errors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.policy_result.policy_errors.Element
_element.code = AAZStrType()
_element.message = AAZStrType()
reservations_to_exchange = cls._schema_on_200.properties.reservations_to_exchange
reservations_to_exchange.Element = AAZObjectType()
_element = cls._schema_on_200.properties.reservations_to_exchange.Element
_element.billing_information = AAZObjectType(
serialized_name="billingInformation",
)
_element.billing_refund_amount = AAZObjectType(
serialized_name="billingRefundAmount",
)
_ExchangeHelper._build_schema_price_read(
_element.billing_refund_amount)
_element.quantity = AAZIntType()
_element.reservation_id = AAZStrType(
serialized_name="reservationId",
)
_element.status = AAZStrType()
billing_information = cls._schema_on_200.properties.reservations_to_exchange.Element.billing_information
billing_information.billing_currency_prorated_amount = AAZObjectType(
serialized_name="billingCurrencyProratedAmount",
)
_ExchangeHelper._build_schema_price_read(
billing_information.billing_currency_prorated_amount)
billing_information.billing_currency_remaining_commitment_amount = AAZObjectType(
serialized_name="billingCurrencyRemainingCommitmentAmount",
)
_ExchangeHelper._build_schema_price_read(
billing_information.billing_currency_remaining_commitment_amount)
billing_information.billing_currency_total_paid_amount = AAZObjectType(
serialized_name="billingCurrencyTotalPaidAmount",
)
_ExchangeHelper._build_schema_price_read(
billing_information.billing_currency_total_paid_amount)
reservations_to_purchase = cls._schema_on_200.properties.reservations_to_purchase
reservations_to_purchase.Element = AAZObjectType()
_element = cls._schema_on_200.properties.reservations_to_purchase.Element
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_ExchangeHelper._build_schema_price_read(
_element.billing_currency_total)
_element.properties = AAZObjectType()
_element.reservation_id = AAZStrType(
serialized_name="reservationId",
)
_element.reservation_order_id = AAZStrType(
serialized_name="reservationOrderId",
)
_element.status = AAZStrType()
properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties
properties.location = AAZStrType()
properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties.sku = AAZObjectType()
_ExchangeHelper._build_schema_sku_name_read(properties.sku)
properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ExchangeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.applied_scopes = AAZListType(
serialized_name="appliedScopes",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.quantity = AAZIntType()
properties.renew = AAZBoolType()
properties.reserved_resource_properties = AAZObjectType(
serialized_name="reservedResourceProperties",
)
properties.reserved_resource_type = AAZStrType(
serialized_name="reservedResourceType",
)
properties.review_date_time = AAZStrType(
serialized_name="reviewDateTime",
)
properties.term = AAZStrType()
applied_scopes = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties.applied_scopes
applied_scopes.Element = AAZStrType()
reserved_resource_properties = cls._schema_on_200.properties.reservations_to_purchase.Element.properties.properties.reserved_resource_properties
reserved_resource_properties.instance_flexibility = AAZStrType(
serialized_name="instanceFlexibility",
)
savings_plans_to_purchase = cls._schema_on_200.properties.savings_plans_to_purchase
savings_plans_to_purchase.Element = AAZObjectType()
_element = cls._schema_on_200.properties.savings_plans_to_purchase.Element
_element.billing_currency_total = AAZObjectType(
serialized_name="billingCurrencyTotal",
)
_ExchangeHelper._build_schema_price_read(
_element.billing_currency_total)
_element.properties = AAZObjectType()
_element.savings_plan_id = AAZStrType(
serialized_name="savingsPlanId",
)
_element.savings_plan_order_id = AAZStrType(
serialized_name="savingsPlanOrderId",
)
_element.status = AAZStrType()
properties = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties
properties.properties = AAZObjectType(
flags={"client_flatten": True},
)
properties.sku = AAZObjectType()
_ExchangeHelper._build_schema_sku_name_read(properties.sku)
properties = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties.properties
properties.applied_scope_properties = AAZObjectType(
serialized_name="appliedScopeProperties",
)
_ExchangeHelper._build_schema_applied_scope_properties_read(
properties.applied_scope_properties)
properties.applied_scope_type = AAZStrType(
serialized_name="appliedScopeType",
)
properties.billing_plan = AAZStrType(
serialized_name="billingPlan",
)
properties.billing_scope_id = AAZStrType(
serialized_name="billingScopeId",
)
properties.commitment = AAZObjectType()
properties.display_name = AAZStrType(
serialized_name="displayName",
)
properties.term = AAZStrType()
commitment = cls._schema_on_200.properties.savings_plans_to_purchase.Element.properties.properties.commitment
commitment.amount = AAZFloatType()
commitment.currency_code = AAZStrType(
serialized_name="currencyCode",
)
commitment.grain = AAZStrType()
return cls._schema_on_200
|
class ExchangePost(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 31 | 3 | 28 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 297 | 35 | 262 | 40 | 245 | 0 | 140 | 32 | 130 | 3 | 1 | 1 | 13 |
9,685 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/tests/latest/test_demo.py
|
azext_redisenterprise.tests.latest.test_demo.Redisenterprisescenario5Test
|
class Redisenterprisescenario5Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario5Test, self).__init__(*args, **kwargs)
self.kwargs.update({
'cluster': self.create_random_name(prefix='clitest-cache5-', length=21),
'access-key-authentication': True,
})
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg5-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario5(self, rg):
call_scenario5(self, rg)
calc_coverage(__file__)
raise_if()
|
class Redisenterprisescenario5Test(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@AllowLargeResponse(size_kb=9999)
@ResourceGroupPreparer(name_prefix='clitest-redisenterprise-rg5-', key='rg', parameter_name='rg',
location='westus3', random_name_length=34)
def test_redisenterprise_scenario5(self, rg):
pass
| 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 17 | 3 | 14 | 4 | 8 | 0 | 8 | 3 | 5 | 1 | 1 | 0 | 2 |
9,686 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_force_unlink.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._force_unlink.ForceUnlink.DatabasesForceUnlink
|
class DatabasesForceUnlink(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("ids", AAZListType, ".unlink_ids", typ_kwargs={
"flags": {"required": True}})
ids = _builder.get(".ids")
if ids is not None:
ids.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
pass
|
class DatabasesForceUnlink(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
| 17 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 9 | 9 | 100 | 12 | 88 | 26 | 71 | 0 | 34 | 18 | 24 | 3 | 1 | 1 | 12 |
9,687 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_flush.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._flush.Flush.DatabasesFlush
|
class DatabasesFlush(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/flush",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("ids", AAZListType, ".linked_ids")
ids = _builder.get(".ids")
if ids is not None:
ids.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
pass
|
class DatabasesFlush(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
| 17 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 9 | 9 | 100 | 12 | 88 | 26 | 71 | 0 | 34 | 18 | 24 | 3 | 1 | 1 | 12 |
9,688 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_export.py
|
azext_redisenterprise.aaz.latest.redisenterprise.database._export.Export.DatabasesExport
|
class DatabasesExport(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/export",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"clusterName", self.ctx.args.cluster_name,
required=True,
),
**self.serialize_url_param(
"databaseName", self.ctx.args.database_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("sasUri", AAZStrType, ".sas_uri",
typ_kwargs={"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
pass
|
class DatabasesExport(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
| 17 | 0 | 9 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 9 | 9 | 96 | 11 | 85 | 25 | 68 | 0 | 31 | 17 | 21 | 3 | 1 | 1 | 11 |
9,689 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NetworkSecurityPerimeterConfigurationListResult
|
class NetworkSecurityPerimeterConfigurationListResult(_serialization.Model): # pylint: disable=name-too-long
"""Result of a list NSP (network security perimeter) configurations request.
:ivar value: Array of network security perimeter results.
:vartype value: list[~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfiguration]
:ivar next_link: The link used to get the next page of results.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[NetworkSecurityPerimeterConfiguration]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self,
*,
value: Optional[List["_models.NetworkSecurityPerimeterConfiguration"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword value: Array of network security perimeter results.
:paramtype value: list[~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfiguration]
:keyword next_link: The link used to get the next page of results.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class NetworkSecurityPerimeterConfigurationListResult(_serialization.Model):
'''Result of a list NSP (network security perimeter) configurations request.
:ivar value: Array of network security perimeter results.
:vartype value: list[~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfiguration]
:ivar next_link: The link used to get the next page of results.
:vartype next_link: str
'''
def __init__(
self,
*,
value: Optional[List["_models.NetworkSecurityPerimeterConfiguration"]] = None,
next_link: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword value: Array of network security perimeter results.
:paramtype value: list[~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfiguration]
:keyword next_link: The link used to get the next page of results.
:paramtype next_link: str
'''
pass
| 2 | 2 | 16 | 0 | 10 | 6 | 1 | 0.87 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 30 | 3 | 15 | 11 | 7 | 13 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,690 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NetworkSecurityPerimeterConfigurationProperties
|
class NetworkSecurityPerimeterConfigurationProperties(_serialization.Model): # pylint: disable=name-too-long
"""Network security configuration properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of a network security perimeter configuration that
is being created or updated. Known values are: "Succeeded", "Creating", "Updating", "Deleting",
"Accepted", "Failed", and "Canceled".
:vartype provisioning_state: str or
~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfigurationProvisioningState
:ivar provisioning_issues: List of provisioning issues, if any.
:vartype provisioning_issues: list[~azure.mgmt.cosmosdb.models.ProvisioningIssue]
:ivar network_security_perimeter: Information about a network security perimeter (NSP).
:vartype network_security_perimeter: ~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeter
:ivar resource_association: Information about resource association.
:vartype resource_association: ~azure.mgmt.cosmosdb.models.ResourceAssociation
:ivar profile: Network security perimeter configuration profile.
:vartype profile: ~azure.mgmt.cosmosdb.models.NetworkSecurityProfile
"""
_validation = {
"provisioning_state": {"readonly": True},
"provisioning_issues": {"readonly": True},
}
_attribute_map = {
"provisioning_state": {"key": "provisioningState", "type": "str"},
"provisioning_issues": {"key": "provisioningIssues", "type": "[ProvisioningIssue]"},
"network_security_perimeter": {"key": "networkSecurityPerimeter", "type": "NetworkSecurityPerimeter"},
"resource_association": {"key": "resourceAssociation", "type": "ResourceAssociation"},
"profile": {"key": "profile", "type": "NetworkSecurityProfile"},
}
def __init__(
self,
*,
network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = None,
resource_association: Optional["_models.ResourceAssociation"] = None,
profile: Optional["_models.NetworkSecurityProfile"] = None,
**kwargs: Any
) -> None:
"""
:keyword network_security_perimeter: Information about a network security perimeter (NSP).
:paramtype network_security_perimeter: ~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeter
:keyword resource_association: Information about resource association.
:paramtype resource_association: ~azure.mgmt.cosmosdb.models.ResourceAssociation
:keyword profile: Network security perimeter configuration profile.
:paramtype profile: ~azure.mgmt.cosmosdb.models.NetworkSecurityProfile
"""
super().__init__(**kwargs)
self.provisioning_state = None
self.provisioning_issues = None
self.network_security_perimeter = network_security_perimeter
self.resource_association = resource_association
self.profile = profile
|
class NetworkSecurityPerimeterConfigurationProperties(_serialization.Model):
'''Network security configuration properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Provisioning state of a network security perimeter configuration that
is being created or updated. Known values are: "Succeeded", "Creating", "Updating", "Deleting",
"Accepted", "Failed", and "Canceled".
:vartype provisioning_state: str or
~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeterConfigurationProvisioningState
:ivar provisioning_issues: List of provisioning issues, if any.
:vartype provisioning_issues: list[~azure.mgmt.cosmosdb.models.ProvisioningIssue]
:ivar network_security_perimeter: Information about a network security perimeter (NSP).
:vartype network_security_perimeter: ~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeter
:ivar resource_association: Information about resource association.
:vartype resource_association: ~azure.mgmt.cosmosdb.models.ResourceAssociation
:ivar profile: Network security perimeter configuration profile.
:vartype profile: ~azure.mgmt.cosmosdb.models.NetworkSecurityProfile
'''
def __init__(
self,
*,
network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = None,
resource_association: Optional["_models.ResourceAssociation"] = None,
profile: Optional["_models.NetworkSecurityProfile"] = None,
**kwargs: Any
) -> None:
'''
:keyword network_security_perimeter: Information about a network security perimeter (NSP).
:paramtype network_security_perimeter: ~azure.mgmt.cosmosdb.models.NetworkSecurityPerimeter
:keyword resource_association: Information about resource association.
:paramtype resource_association: ~azure.mgmt.cosmosdb.models.ResourceAssociation
:keyword profile: Network security perimeter configuration profile.
:paramtype profile: ~azure.mgmt.cosmosdb.models.NetworkSecurityProfile
'''
pass
| 2 | 2 | 22 | 0 | 14 | 8 | 1 | 0.96 | 1 | 2 | 0 | 0 | 1 | 5 | 1 | 16 | 55 | 5 | 26 | 16 | 17 | 25 | 10 | 9 | 8 | 1 | 2 | 0 | 1 |
9,691 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NetworkSecurityProfile
|
class NetworkSecurityProfile(_serialization.Model):
"""Network security perimeter configuration profile.
:ivar name: Name of the profile.
:vartype name: str
:ivar access_rules_version: Current access rules version.
:vartype access_rules_version: int
:ivar access_rules: List of Access Rules.
:vartype access_rules: list[~azure.mgmt.cosmosdb.models.AccessRule]
:ivar diagnostic_settings_version: Current diagnostic settings version.
:vartype diagnostic_settings_version: int
:ivar enabled_log_categories: List of log categories that are enabled.
:vartype enabled_log_categories: list[str]
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"access_rules_version": {"key": "accessRulesVersion", "type": "int"},
"access_rules": {"key": "accessRules", "type": "[AccessRule]"},
"diagnostic_settings_version": {"key": "diagnosticSettingsVersion", "type": "int"},
"enabled_log_categories": {"key": "enabledLogCategories", "type": "[str]"},
}
def __init__(
self,
*,
name: Optional[str] = None,
access_rules_version: Optional[int] = None,
access_rules: Optional[List["_models.AccessRule"]] = None,
diagnostic_settings_version: Optional[int] = None,
enabled_log_categories: Optional[List[str]] = None,
**kwargs: Any
) -> None:
"""
:keyword name: Name of the profile.
:paramtype name: str
:keyword access_rules_version: Current access rules version.
:paramtype access_rules_version: int
:keyword access_rules: List of Access Rules.
:paramtype access_rules: list[~azure.mgmt.cosmosdb.models.AccessRule]
:keyword diagnostic_settings_version: Current diagnostic settings version.
:paramtype diagnostic_settings_version: int
:keyword enabled_log_categories: List of log categories that are enabled.
:paramtype enabled_log_categories: list[str]
"""
super().__init__(**kwargs)
self.name = name
self.access_rules_version = access_rules_version
self.access_rules = access_rules
self.diagnostic_settings_version = diagnostic_settings_version
self.enabled_log_categories = enabled_log_categories
|
class NetworkSecurityProfile(_serialization.Model):
'''Network security perimeter configuration profile.
:ivar name: Name of the profile.
:vartype name: str
:ivar access_rules_version: Current access rules version.
:vartype access_rules_version: int
:ivar access_rules: List of Access Rules.
:vartype access_rules: list[~azure.mgmt.cosmosdb.models.AccessRule]
:ivar diagnostic_settings_version: Current diagnostic settings version.
:vartype diagnostic_settings_version: int
:ivar enabled_log_categories: List of log categories that are enabled.
:vartype enabled_log_categories: list[str]
'''
def __init__(
self,
*,
name: Optional[str] = None,
access_rules_version: Optional[int] = None,
access_rules: Optional[List["_models.AccessRule"]] = None,
diagnostic_settings_version: Optional[int] = None,
enabled_log_categories: Optional[List[str]] = None,
**kwargs: Any
) -> None:
'''
:keyword name: Name of the profile.
:paramtype name: str
:keyword access_rules_version: Current access rules version.
:paramtype access_rules_version: int
:keyword access_rules: List of Access Rules.
:paramtype access_rules: list[~azure.mgmt.cosmosdb.models.AccessRule]
:keyword diagnostic_settings_version: Current diagnostic settings version.
:paramtype diagnostic_settings_version: int
:keyword enabled_log_categories: List of log categories that are enabled.
:paramtype enabled_log_categories: list[str]
'''
pass
| 2 | 2 | 28 | 0 | 16 | 12 | 1 | 1 | 1 | 4 | 0 | 0 | 1 | 5 | 1 | 16 | 51 | 3 | 24 | 17 | 13 | 24 | 9 | 8 | 7 | 1 | 2 | 0 | 1 |
9,692 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NotebookWorkspace
|
class NotebookWorkspace(ARMProxyResource):
"""A notebook workspace resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the database account.
:vartype id: str
:ivar name: The name of the database account.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar notebook_server_endpoint: Specifies the endpoint of Notebook server.
:vartype notebook_server_endpoint: str
:ivar status: Status of the notebook workspace. Possible values are: Creating, Online,
Deleting, Failed, Updating.
:vartype status: str
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"notebook_server_endpoint": {"readonly": True},
"status": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"notebook_server_endpoint": {"key": "properties.notebookServerEndpoint", "type": "str"},
"status": {"key": "properties.status", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.notebook_server_endpoint = None
self.status = None
|
class NotebookWorkspace(ARMProxyResource):
'''A notebook workspace resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the database account.
:vartype id: str
:ivar name: The name of the database account.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
:ivar notebook_server_endpoint: Specifies the endpoint of Notebook server.
:vartype notebook_server_endpoint: str
:ivar status: Status of the notebook workspace. Possible values are: Creating, Online,
Deleting, Failed, Updating.
:vartype status: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 5 | 0 | 4 | 1 | 1 | 0.79 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 17 | 39 | 5 | 19 | 6 | 17 | 15 | 7 | 6 | 5 | 1 | 3 | 0 | 1 |
9,693 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NotebookWorkspaceConnectionInfoResult
|
class NotebookWorkspaceConnectionInfoResult(_serialization.Model):
"""The connection info for the given notebook workspace.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar auth_token: Specifies auth token used for connecting to Notebook server (uses token-based
auth).
:vartype auth_token: str
:ivar notebook_server_endpoint: Specifies the endpoint of Notebook server.
:vartype notebook_server_endpoint: str
"""
_validation = {
"auth_token": {"readonly": True},
"notebook_server_endpoint": {"readonly": True},
}
_attribute_map = {
"auth_token": {"key": "authToken", "type": "str"},
"notebook_server_endpoint": {"key": "notebookServerEndpoint", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.auth_token = None
self.notebook_server_endpoint = None
|
class NotebookWorkspaceConnectionInfoResult(_serialization.Model):
'''The connection info for the given notebook workspace.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar auth_token: Specifies auth token used for connecting to Notebook server (uses token-based
auth).
:vartype auth_token: str
:ivar notebook_server_endpoint: Specifies the endpoint of Notebook server.
:vartype notebook_server_endpoint: str
'''
def __init__(self, **kwargs: Any) -> None:
''' '''
pass
| 2 | 2 | 5 | 0 | 4 | 1 | 1 | 0.69 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 16 | 27 | 5 | 13 | 6 | 11 | 9 | 7 | 6 | 5 | 1 | 2 | 0 | 1 |
9,694 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NotebookWorkspaceCreateUpdateParameters
|
class NotebookWorkspaceCreateUpdateParameters(ARMProxyResource):
"""Parameters to create a notebook workspace resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the database account.
:vartype id: str
:ivar name: The name of the database account.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
"""
|
class NotebookWorkspaceCreateUpdateParameters(ARMProxyResource):
'''Parameters to create a notebook workspace resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: The unique resource identifier of the database account.
:vartype id: str
:ivar name: The name of the database account.
:vartype name: str
:ivar type: The type of Azure resource.
:vartype type: str
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 12 | 2 | 1 | 1 | 0 | 9 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
9,695 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.NotebookWorkspaceListResult
|
class NotebookWorkspaceListResult(_serialization.Model):
"""A list of notebook workspace resources.
:ivar value: Array of notebook workspace resources.
:vartype value: list[~azure.mgmt.cosmosdb.models.NotebookWorkspace]
"""
_attribute_map = {
"value": {"key": "value", "type": "[NotebookWorkspace]"},
}
def __init__(self, *, value: Optional[List["_models.NotebookWorkspace"]] = None, **kwargs: Any) -> None:
"""
:keyword value: Array of notebook workspace resources.
:paramtype value: list[~azure.mgmt.cosmosdb.models.NotebookWorkspace]
"""
super().__init__(**kwargs)
self.value = value
|
class NotebookWorkspaceListResult(_serialization.Model):
'''A list of notebook workspace resources.
:ivar value: Array of notebook workspace resources.
:vartype value: list[~azure.mgmt.cosmosdb.models.NotebookWorkspace]
'''
def __init__(self, *, value: Optional[List["_models.NotebookWorkspace"]] = None, **kwargs: Any) -> None:
'''
:keyword value: Array of notebook workspace resources.
:paramtype value: list[~azure.mgmt.cosmosdb.models.NotebookWorkspace]
'''
pass
| 2 | 2 | 7 | 0 | 3 | 4 | 1 | 1.14 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 16 | 18 | 3 | 7 | 4 | 5 | 8 | 5 | 4 | 3 | 1 | 2 | 0 | 1 |
9,696 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.Operation
|
class Operation(_serialization.Model):
"""REST API operation.
:ivar name: Operation name: {provider}/{resource}/{operation}.
:vartype name: str
:ivar display: The object that represents the operation.
:vartype display: ~azure.mgmt.cosmosdb.models.OperationDisplay
"""
_attribute_map = {
"name": {"key": "name", "type": "str"},
"display": {"key": "display", "type": "OperationDisplay"},
}
def __init__(
self, *, name: Optional[str] = None, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any
) -> None:
"""
:keyword name: Operation name: {provider}/{resource}/{operation}.
:paramtype name: str
:keyword display: The object that represents the operation.
:paramtype display: ~azure.mgmt.cosmosdb.models.OperationDisplay
"""
super().__init__(**kwargs)
self.name = name
self.display = display
|
class Operation(_serialization.Model):
'''REST API operation.
:ivar name: Operation name: {provider}/{resource}/{operation}.
:vartype name: str
:ivar display: The object that represents the operation.
:vartype display: ~azure.mgmt.cosmosdb.models.OperationDisplay
'''
def __init__(
self, *, name: Optional[str] = None, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any
) -> None:
'''
:keyword name: Operation name: {provider}/{resource}/{operation}.
:paramtype name: str
:keyword display: The object that represents the operation.
:paramtype display: ~azure.mgmt.cosmosdb.models.OperationDisplay
'''
pass
| 2 | 2 | 12 | 0 | 6 | 6 | 1 | 1.09 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 26 | 3 | 11 | 7 | 7 | 12 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,697 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.OperationDisplay
|
class OperationDisplay(_serialization.Model):
"""The object that represents the operation.
:ivar provider: Service provider: Microsoft.ResourceProvider.
:vartype provider: str
:ivar resource: Resource on which the operation is performed: Profile, endpoint, etc.
:vartype resource: str
:ivar operation: Operation type: Read, write, delete, etc.
:vartype operation: str
:ivar description: Description of operation.
:vartype description: str
"""
_attribute_map = {
"provider": {"key": "Provider", "type": "str"},
"resource": {"key": "Resource", "type": "str"},
"operation": {"key": "Operation", "type": "str"},
"description": {"key": "Description", "type": "str"},
}
def __init__(
self,
*,
provider: Optional[str] = None,
resource: Optional[str] = None,
operation: Optional[str] = None,
description: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword provider: Service provider: Microsoft.ResourceProvider.
:paramtype provider: str
:keyword resource: Resource on which the operation is performed: Profile, endpoint, etc.
:paramtype resource: str
:keyword operation: Operation type: Read, write, delete, etc.
:paramtype operation: str
:keyword description: Description of operation.
:paramtype description: str
"""
super().__init__(**kwargs)
self.provider = provider
self.resource = resource
self.operation = operation
self.description = description
|
class OperationDisplay(_serialization.Model):
'''The object that represents the operation.
:ivar provider: Service provider: Microsoft.ResourceProvider.
:vartype provider: str
:ivar resource: Resource on which the operation is performed: Profile, endpoint, etc.
:vartype resource: str
:ivar operation: Operation type: Read, write, delete, etc.
:vartype operation: str
:ivar description: Description of operation.
:vartype description: str
'''
def __init__(
self,
*,
provider: Optional[str] = None,
resource: Optional[str] = None,
operation: Optional[str] = None,
description: Optional[str] = None,
**kwargs: Any
) -> None:
'''
:keyword provider: Service provider: Microsoft.ResourceProvider.
:paramtype provider: str
:keyword resource: Resource on which the operation is performed: Profile, endpoint, etc.
:paramtype resource: str
:keyword operation: Operation type: Read, write, delete, etc.
:paramtype operation: str
:keyword description: Description of operation.
:paramtype description: str
'''
pass
| 2 | 2 | 24 | 0 | 14 | 10 | 1 | 0.95 | 1 | 3 | 0 | 0 | 1 | 4 | 1 | 16 | 44 | 3 | 21 | 15 | 11 | 20 | 8 | 7 | 6 | 1 | 2 | 0 | 1 |
9,698 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.OperationListResult
|
class OperationListResult(_serialization.Model):
"""Result of the request to list Resource Provider operations. It contains a list of operations
and a URL link to get the next set of results.
:ivar value: List of operations supported by the Resource Provider.
:vartype value: list[~azure.mgmt.cosmosdb.models.Operation]
:ivar next_link: URL to get the next set of operation list results if there are any.
:vartype next_link: str
"""
_attribute_map = {
"value": {"key": "value", "type": "[Operation]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword value: List of operations supported by the Resource Provider.
:paramtype value: list[~azure.mgmt.cosmosdb.models.Operation]
:keyword next_link: URL to get the next set of operation list results if there are any.
:paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class OperationListResult(_serialization.Model):
'''Result of the request to list Resource Provider operations. It contains a list of operations
and a URL link to get the next set of results.
:ivar value: List of operations supported by the Resource Provider.
:vartype value: list[~azure.mgmt.cosmosdb.models.Operation]
:ivar next_link: URL to get the next set of operation list results if there are any.
:vartype next_link: str
'''
def __init__(
self, *, value: Optional[List["_models.Operation"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
'''
:keyword value: List of operations supported by the Resource Provider.
:paramtype value: list[~azure.mgmt.cosmosdb.models.Operation]
:keyword next_link: URL to get the next set of operation list results if there are any.
:paramtype next_link: str
'''
pass
| 2 | 2 | 12 | 0 | 6 | 6 | 1 | 1.18 | 1 | 3 | 0 | 0 | 1 | 2 | 1 | 16 | 27 | 3 | 11 | 7 | 7 | 13 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
9,699 |
Azure/azure-cli-extensions
|
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/_models_py3.py
|
azext_cosmosdb_preview.vendored_sdks.azure_mgmt_cosmosdb.models._models_py3.OptionsResource
|
class OptionsResource(_serialization.Model):
"""Cosmos DB options resource object.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
"""
_attribute_map = {
"throughput": {"key": "throughput", "type": "int"},
"autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettings"},
}
def __init__(
self,
*,
throughput: Optional[int] = None,
autoscale_settings: Optional["_models.AutoscaleSettings"] = None,
**kwargs: Any
) -> None:
"""
:keyword throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:paramtype throughput: int
:keyword autoscale_settings: Specifies the Autoscale settings.
:paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
"""
super().__init__(**kwargs)
self.throughput = throughput
self.autoscale_settings = autoscale_settings
|
class OptionsResource(_serialization.Model):
'''Cosmos DB options resource object.
:ivar throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:vartype throughput: int
:ivar autoscale_settings: Specifies the Autoscale settings.
:vartype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
'''
def __init__(
self,
*,
throughput: Optional[int] = None,
autoscale_settings: Optional["_models.AutoscaleSettings"] = None,
**kwargs: Any
) -> None:
'''
:keyword throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the
ThroughputSetting resource when retrieving offer details.
:paramtype throughput: int
:keyword autoscale_settings: Specifies the Autoscale settings.
:paramtype autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings
'''
pass
| 2 | 2 | 17 | 0 | 10 | 7 | 1 | 0.93 | 1 | 3 | 0 | 11 | 1 | 2 | 1 | 16 | 32 | 3 | 15 | 11 | 7 | 14 | 6 | 5 | 4 | 1 | 2 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.