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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,900 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.sim._list.List.SimsListByGroup
|
class SimsListByGroup(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.MobileNetwork/simGroups/{simGroupName}/sims",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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.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.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.device_type = AAZStrType(
serialized_name="deviceType",
)
properties.integrated_circuit_card_identifier = AAZStrType(
serialized_name="integratedCircuitCardIdentifier",
)
properties.international_mobile_subscriber_identity = AAZStrType(
serialized_name="internationalMobileSubscriberIdentity",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sim_policy = AAZObjectType(
serialized_name="simPolicy",
)
properties.sim_state = AAZStrType(
serialized_name="simState",
flags={"read_only": True},
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.static_ip_configuration = AAZListType(
serialized_name="staticIpConfiguration",
)
properties.vendor_key_fingerprint = AAZStrType(
serialized_name="vendorKeyFingerprint",
flags={"read_only": True},
)
properties.vendor_name = AAZStrType(
serialized_name="vendorName",
flags={"read_only": True},
)
sim_policy = cls._schema_on_200.value.Element.properties.sim_policy
sim_policy.id = AAZStrType(
flags={"required": True},
)
site_provisioning_state = cls._schema_on_200.value.Element.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
static_ip_configuration = cls._schema_on_200.value.Element.properties.static_ip_configuration
static_ip_configuration.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.static_ip_configuration.Element
_element.attached_data_network = AAZObjectType(
serialized_name="attachedDataNetwork",
)
_element.slice = AAZObjectType()
_element.static_ip = AAZObjectType(
serialized_name="staticIp",
)
attached_data_network = cls._schema_on_200.value.Element.properties.static_ip_configuration.Element.attached_data_network
attached_data_network.id = AAZStrType(
flags={"required": True},
)
slice = cls._schema_on_200.value.Element.properties.static_ip_configuration.Element.slice
slice.id = AAZStrType(
flags={"required": True},
)
static_ip = cls._schema_on_200.value.Element.properties.static_ip_configuration.Element.static_ip
static_ip.ipv4_address = AAZStrType(
serialized_name="ipv4Address",
)
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 SimsListByGroup(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 | 19 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 204 | 25 | 179 | 36 | 162 | 0 | 77 | 29 | 67 | 2 | 1 | 1 | 11 |
8,901 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._update.Update.SimPoliciesCreateOrUpdate
|
class SimPoliciesCreateOrUpdate(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 [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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
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-09-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,
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_sim_policy_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class SimPoliciesCreateOrUpdate(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 |
8,902 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._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}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
_UpdateHelper._build_schema_slice_resource_id_update(properties.set_prop(
"defaultSlice", AAZObjectType, ".default_slice", typ_kwargs={"flags": {"required": True}}))
properties.set_prop("registrationTimer",
AAZIntType, ".registration_timer")
properties.set_prop("rfspIndex", AAZIntType, ".rfsp_index")
properties.set_prop("sliceConfigurations", AAZListType, ".slice_config", typ_kwargs={
"flags": {"required": True}})
_UpdateHelper._build_schema_ambr_update(properties.set_prop(
"ueAmbr", AAZObjectType, ".ue_ambr", typ_kwargs={"flags": {"required": True}}))
slice_configurations = _builder.get(
".properties.sliceConfigurations")
if slice_configurations is not None:
slice_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.sliceConfigurations[]")
if _elements is not None:
_elements.set_prop("dataNetworkConfigurations", AAZListType,
".data_network_config", typ_kwargs={"flags": {"required": True}})
_UpdateHelper._build_schema_data_network_resource_id_update(_elements.set_prop(
"defaultDataNetwork", AAZObjectType, ".default_data_network", typ_kwargs={"flags": {"required": True}}))
_UpdateHelper._build_schema_slice_resource_id_update(_elements.set_prop(
"slice", AAZObjectType, ".slice", typ_kwargs={"flags": {"required": True}}))
data_network_configurations = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations")
if data_network_configurations is not None:
data_network_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[]")
if _elements is not None:
_elements.set_prop("5qi", AAZIntType, ".five_qi")
_elements.set_prop("additionalAllowedSessionTypes",
AAZListType, ".additional_session_type")
_elements.set_prop(
"allocationAndRetentionPriorityLevel", AAZIntType, ".arp_level")
_elements.set_prop("allowedServices", AAZListType, ".allowed_services", typ_kwargs={
"flags": {"required": True}})
_UpdateHelper._build_schema_data_network_resource_id_update(_elements.set_prop(
"dataNetwork", AAZObjectType, ".data_network", typ_kwargs={"flags": {"required": True}}))
_elements.set_prop("defaultSessionType",
AAZStrType, ".default_session_type")
_elements.set_prop("maximumNumberOfBufferedPackets",
AAZIntType, ".maximum_number_of_buffered_packets")
_elements.set_prop("preemptionCapability",
AAZStrType, ".preemption_capability")
_elements.set_prop("preemptionVulnerability",
AAZStrType, ".preemption_vulnerability")
_UpdateHelper._build_schema_ambr_update(_elements.set_prop(
"sessionAmbr", AAZObjectType, ".session_ambr", typ_kwargs={"flags": {"required": True}}))
additional_allowed_session_types = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].additionalAllowedSessionTypes")
if additional_allowed_session_types is not None:
additional_allowed_session_types.set_elements(AAZStrType, ".")
allowed_services = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].allowedServices")
if allowed_services is not None:
allowed_services.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].allowedServices[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 32 | 5 | 27 | 0 | 6 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 66 | 12 | 54 | 11 | 51 | 0 | 50 | 11 | 47 | 10 | 1 | 1 | 11 |
8,903 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_show.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._show.Show.SimPoliciesGet
|
class SimPoliciesGet(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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
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-09-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.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.default_slice = AAZObjectType(
serialized_name="defaultSlice",
flags={"required": True},
)
_ShowHelper._build_schema_slice_resource_id_read(
properties.default_slice)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.registration_timer = AAZIntType(
serialized_name="registrationTimer",
)
properties.rfsp_index = AAZIntType(
serialized_name="rfspIndex",
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.slice_configurations = AAZListType(
serialized_name="sliceConfigurations",
flags={"required": True},
)
properties.ue_ambr = AAZObjectType(
serialized_name="ueAmbr",
flags={"required": True},
)
_ShowHelper._build_schema_ambr_read(properties.ue_ambr)
site_provisioning_state = cls._schema_on_200.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
slice_configurations = cls._schema_on_200.properties.slice_configurations
slice_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element
_element.data_network_configurations = AAZListType(
serialized_name="dataNetworkConfigurations",
flags={"required": True},
)
_element.default_data_network = AAZObjectType(
serialized_name="defaultDataNetwork",
flags={"required": True},
)
_ShowHelper._build_schema_data_network_resource_id_read(
_element.default_data_network)
_element.slice = AAZObjectType(
flags={"required": True},
)
_ShowHelper._build_schema_slice_resource_id_read(_element.slice)
data_network_configurations = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations
data_network_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element
_element["5qi"] = AAZIntType()
_element.additional_allowed_session_types = AAZListType(
serialized_name="additionalAllowedSessionTypes",
)
_element.allocation_and_retention_priority_level = AAZIntType(
serialized_name="allocationAndRetentionPriorityLevel",
)
_element.allowed_services = AAZListType(
serialized_name="allowedServices",
flags={"required": True},
)
_element.data_network = AAZObjectType(
serialized_name="dataNetwork",
flags={"required": True},
)
_ShowHelper._build_schema_data_network_resource_id_read(
_element.data_network)
_element.default_session_type = AAZStrType(
serialized_name="defaultSessionType",
)
_element.maximum_number_of_buffered_packets = AAZIntType(
serialized_name="maximumNumberOfBufferedPackets",
)
_element.preemption_capability = AAZStrType(
serialized_name="preemptionCapability",
)
_element.preemption_vulnerability = AAZStrType(
serialized_name="preemptionVulnerability",
)
_element.session_ambr = AAZObjectType(
serialized_name="sessionAmbr",
flags={"required": True},
)
_ShowHelper._build_schema_ambr_read(_element.session_ambr)
additional_allowed_session_types = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.additional_allowed_session_types
additional_allowed_session_types.Element = AAZStrType()
allowed_services = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services
allowed_services.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services.Element
_element.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimPoliciesGet(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 | 24 | 2 | 22 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 232 | 25 | 207 | 35 | 190 | 0 | 90 | 28 | 80 | 2 | 1 | 1 | 11 |
8,904 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._list.List.SimPoliciesListByMobileNetwork
|
class SimPoliciesListByMobileNetwork(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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_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-09-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.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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.default_slice = AAZObjectType(
serialized_name="defaultSlice",
flags={"required": True},
)
_ListHelper._build_schema_slice_resource_id_read(
properties.default_slice)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.registration_timer = AAZIntType(
serialized_name="registrationTimer",
)
properties.rfsp_index = AAZIntType(
serialized_name="rfspIndex",
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.slice_configurations = AAZListType(
serialized_name="sliceConfigurations",
flags={"required": True},
)
properties.ue_ambr = AAZObjectType(
serialized_name="ueAmbr",
flags={"required": True},
)
_ListHelper._build_schema_ambr_read(properties.ue_ambr)
site_provisioning_state = cls._schema_on_200.value.Element.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
slice_configurations = cls._schema_on_200.value.Element.properties.slice_configurations
slice_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.slice_configurations.Element
_element.data_network_configurations = AAZListType(
serialized_name="dataNetworkConfigurations",
flags={"required": True},
)
_element.default_data_network = AAZObjectType(
serialized_name="defaultDataNetwork",
flags={"required": True},
)
_ListHelper._build_schema_data_network_resource_id_read(
_element.default_data_network)
_element.slice = AAZObjectType(
flags={"required": True},
)
_ListHelper._build_schema_slice_resource_id_read(_element.slice)
data_network_configurations = cls._schema_on_200.value.Element.properties.slice_configurations.Element.data_network_configurations
data_network_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.slice_configurations.Element.data_network_configurations.Element
_element["5qi"] = AAZIntType()
_element.additional_allowed_session_types = AAZListType(
serialized_name="additionalAllowedSessionTypes",
)
_element.allocation_and_retention_priority_level = AAZIntType(
serialized_name="allocationAndRetentionPriorityLevel",
)
_element.allowed_services = AAZListType(
serialized_name="allowedServices",
flags={"required": True},
)
_element.data_network = AAZObjectType(
serialized_name="dataNetwork",
flags={"required": True},
)
_ListHelper._build_schema_data_network_resource_id_read(
_element.data_network)
_element.default_session_type = AAZStrType(
serialized_name="defaultSessionType",
)
_element.maximum_number_of_buffered_packets = AAZIntType(
serialized_name="maximumNumberOfBufferedPackets",
)
_element.preemption_capability = AAZStrType(
serialized_name="preemptionCapability",
)
_element.preemption_vulnerability = AAZStrType(
serialized_name="preemptionVulnerability",
)
_element.session_ambr = AAZObjectType(
serialized_name="sessionAmbr",
flags={"required": True},
)
_ListHelper._build_schema_ambr_read(_element.session_ambr)
additional_allowed_session_types = cls._schema_on_200.value.Element.properties.slice_configurations.Element.data_network_configurations.Element.additional_allowed_session_types
additional_allowed_session_types.Element = AAZStrType()
allowed_services = cls._schema_on_200.value.Element.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services
allowed_services.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services.Element
_element.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimPoliciesListByMobileNetwork(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 | 24 | 2 | 22 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 238 | 27 | 211 | 36 | 194 | 0 | 95 | 29 | 85 | 2 | 1 | 1 | 11 |
8,905 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._delete.Delete.SimPoliciesDelete
|
class SimPoliciesDelete(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,
)
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": "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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
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-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SimPoliciesDelete(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,906 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_create.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._create.Create.SimPoliciesCreateOrUpdate
|
class SimPoliciesCreateOrUpdate(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 [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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
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-09-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", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
_CreateHelper._build_schema_slice_resource_id_create(properties.set_prop(
"defaultSlice", AAZObjectType, ".default_slice", typ_kwargs={"flags": {"required": True}}))
properties.set_prop("registrationTimer",
AAZIntType, ".registration_timer")
properties.set_prop("rfspIndex", AAZIntType, ".rfsp_index")
properties.set_prop("sliceConfigurations", AAZListType, ".slice_config", typ_kwargs={
"flags": {"required": True}})
_CreateHelper._build_schema_ambr_create(properties.set_prop(
"ueAmbr", AAZObjectType, ".ue_ambr", typ_kwargs={"flags": {"required": True}}))
slice_configurations = _builder.get(
".properties.sliceConfigurations")
if slice_configurations is not None:
slice_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.sliceConfigurations[]")
if _elements is not None:
_elements.set_prop("dataNetworkConfigurations", AAZListType,
".data_network_configurations", typ_kwargs={"flags": {"required": True}})
_CreateHelper._build_schema_data_network_resource_id_create(_elements.set_prop(
"defaultDataNetwork", AAZObjectType, ".default_data_network", typ_kwargs={"flags": {"required": True}}))
_CreateHelper._build_schema_slice_resource_id_create(_elements.set_prop(
"slice", AAZObjectType, ".slice", typ_kwargs={"flags": {"required": True}}))
data_network_configurations = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations")
if data_network_configurations is not None:
data_network_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[]")
if _elements is not None:
_elements.set_prop("5qi", AAZIntType, ".five_qi")
_elements.set_prop("additionalAllowedSessionTypes",
AAZListType, ".additional_session_type")
_elements.set_prop(
"allocationAndRetentionPriorityLevel", AAZIntType, ".arp_level")
_elements.set_prop("allowedServices", AAZListType, ".allowed_services", typ_kwargs={
"flags": {"required": True}})
_CreateHelper._build_schema_data_network_resource_id_create(_elements.set_prop(
"dataNetwork", AAZObjectType, ".data_network", typ_kwargs={"flags": {"required": True}}))
_elements.set_prop("defaultSessionType",
AAZStrType, ".default_session_type")
_elements.set_prop("maximumNumberOfBufferedPackets",
AAZIntType, ".maximum_number_of_buffered_packets")
_elements.set_prop("preemptionCapability",
AAZStrType, ".preemption_capability")
_elements.set_prop("preemptionVulnerability",
AAZStrType, ".preemption_vulnerability")
_CreateHelper._build_schema_ambr_create(_elements.set_prop(
"sessionAmbr", AAZObjectType, ".session_ambr", typ_kwargs={"flags": {"required": True}}))
additional_allowed_session_types = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].additionalAllowedSessionTypes")
if additional_allowed_session_types is not None:
additional_allowed_session_types.set_elements(AAZStrType, ".")
allowed_services = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].allowedServices")
if allowed_services is not None:
allowed_services.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.sliceConfigurations[].dataNetworkConfigurations[].allowedServices[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
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.location = AAZStrType(
flags={"required": 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.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.default_slice = AAZObjectType(
serialized_name="defaultSlice",
flags={"required": True},
)
_CreateHelper._build_schema_slice_resource_id_read(
properties.default_slice)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.registration_timer = AAZIntType(
serialized_name="registrationTimer",
)
properties.rfsp_index = AAZIntType(
serialized_name="rfspIndex",
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.slice_configurations = AAZListType(
serialized_name="sliceConfigurations",
flags={"required": True},
)
properties.ue_ambr = AAZObjectType(
serialized_name="ueAmbr",
flags={"required": True},
)
_CreateHelper._build_schema_ambr_read(properties.ue_ambr)
site_provisioning_state = cls._schema_on_200_201.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
slice_configurations = cls._schema_on_200_201.properties.slice_configurations
slice_configurations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.slice_configurations.Element
_element.data_network_configurations = AAZListType(
serialized_name="dataNetworkConfigurations",
flags={"required": True},
)
_element.default_data_network = AAZObjectType(
serialized_name="defaultDataNetwork",
flags={"required": True},
)
_CreateHelper._build_schema_data_network_resource_id_read(
_element.default_data_network)
_element.slice = AAZObjectType(
flags={"required": True},
)
_CreateHelper._build_schema_slice_resource_id_read(_element.slice)
data_network_configurations = cls._schema_on_200_201.properties.slice_configurations.Element.data_network_configurations
data_network_configurations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.slice_configurations.Element.data_network_configurations.Element
_element["5qi"] = AAZIntType()
_element.additional_allowed_session_types = AAZListType(
serialized_name="additionalAllowedSessionTypes",
)
_element.allocation_and_retention_priority_level = AAZIntType(
serialized_name="allocationAndRetentionPriorityLevel",
)
_element.allowed_services = AAZListType(
serialized_name="allowedServices",
flags={"required": True},
)
_element.data_network = AAZObjectType(
serialized_name="dataNetwork",
flags={"required": True},
)
_CreateHelper._build_schema_data_network_resource_id_read(
_element.data_network)
_element.default_session_type = AAZStrType(
serialized_name="defaultSessionType",
)
_element.maximum_number_of_buffered_packets = AAZIntType(
serialized_name="maximumNumberOfBufferedPackets",
)
_element.preemption_capability = AAZStrType(
serialized_name="preemptionCapability",
)
_element.preemption_vulnerability = AAZStrType(
serialized_name="preemptionVulnerability",
)
_element.session_ambr = AAZObjectType(
serialized_name="sessionAmbr",
flags={"required": True},
)
_CreateHelper._build_schema_ambr_read(_element.session_ambr)
additional_allowed_session_types = cls._schema_on_200_201.properties.slice_configurations.Element.data_network_configurations.Element.additional_allowed_session_types
additional_allowed_session_types.Element = AAZStrType()
allowed_services = cls._schema_on_200_201.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services
allowed_services.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services.Element
_element.id = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.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",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class SimPoliciesCreateOrUpdate(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 | 29 | 3 | 27 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 315 | 36 | 279 | 46 | 260 | 0 | 140 | 37 | 129 | 10 | 1 | 1 | 22 |
8,907 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._wait.Wait.SimGroupsGet
|
class SimGroupsGet(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.MobileNetwork/simGroups/{simGroupName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.encryption_key = AAZObjectType(
serialized_name="encryptionKey",
)
properties.mobile_network = AAZObjectType(
serialized_name="mobileNetwork",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
encryption_key = cls._schema_on_200.properties.encryption_key
encryption_key.key_url = AAZStrType(
serialized_name="keyUrl",
)
mobile_network = cls._schema_on_200.properties.mobile_network
mobile_network.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimGroupsGet(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 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 170 | 22 | 148 | 34 | 131 | 0 | 66 | 27 | 56 | 2 | 1 | 1 | 11 |
8,908 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._update.Update.SimGroupsGet
|
class SimGroupsGet(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.MobileNetwork/simGroups/{simGroupName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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()
_UpdateHelper._build_schema_sim_group_read(cls._schema_on_200)
return cls._schema_on_200
|
class SimGroupsGet(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 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,909 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._update.Update.SimGroupsCreateOrUpdate
|
class SimGroupsCreateOrUpdate(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 [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.MobileNetwork/simGroups/{simGroupName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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,
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_sim_group_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class SimGroupsCreateOrUpdate(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 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,910 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._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("identity", AAZObjectType, ".identity")
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"encryptionKey", AAZObjectType, ".encryption_key")
properties.set_prop(
"mobileNetwork", AAZObjectType, ".mobile_network")
encryption_key = _builder.get(".properties.encryptionKey")
if encryption_key is not None:
encryption_key.set_prop("keyUrl", AAZStrType, ".key_url")
mobile_network = _builder.get(".properties.mobileNetwork")
if mobile_network is not None:
mobile_network.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 20 | 4 | 16 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 42 | 9 | 33 | 10 | 30 | 0 | 29 | 10 | 26 | 7 | 1 | 1 | 8 |
8,911 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._list.List.SimGroupsListBySubscription
|
class SimGroupsListBySubscription(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.MobileNetwork/simGroups",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-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.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.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.encryption_key = AAZObjectType(
serialized_name="encryptionKey",
)
properties.mobile_network = AAZObjectType(
serialized_name="mobileNetwork",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
encryption_key = cls._schema_on_200.value.Element.properties.encryption_key
encryption_key.key_url = AAZStrType(
serialized_name="keyUrl",
)
mobile_network = cls._schema_on_200.value.Element.properties.mobile_network
mobile_network.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimGroupsListBySubscription(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 | 2 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 172 | 24 | 148 | 35 | 131 | 0 | 71 | 28 | 61 | 2 | 1 | 1 | 11 |
8,912 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._list.List.SimGroupsListByResourceGroup
|
class SimGroupsListByResourceGroup(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.MobileNetwork/simGroups",
**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(
"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-09-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.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.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.encryption_key = AAZObjectType(
serialized_name="encryptionKey",
)
properties.mobile_network = AAZObjectType(
serialized_name="mobileNetwork",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
encryption_key = cls._schema_on_200.value.Element.properties.encryption_key
encryption_key.key_url = AAZStrType(
serialized_name="keyUrl",
)
mobile_network = cls._schema_on_200.value.Element.properties.mobile_network
mobile_network.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimGroupsListByResourceGroup(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 | 2 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 176 | 24 | 152 | 35 | 135 | 0 | 71 | 28 | 61 | 2 | 1 | 1 | 11 |
8,913 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._delete.Delete.SimGroupsDelete
|
class SimGroupsDelete(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,
)
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": "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.MobileNetwork/simGroups/{simGroupName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SimGroupsDelete(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,914 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_create.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._create.Create.SimGroupsCreateOrUpdate
|
class SimGroupsCreateOrUpdate(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 [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.MobileNetwork/simGroups/{simGroupName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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("identity", AAZObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop(
"encryptionKey", AAZObjectType, ".encryption_key")
properties.set_prop(
"mobileNetwork", AAZObjectType, ".mobile_network")
encryption_key = _builder.get(".properties.encryptionKey")
if encryption_key is not None:
encryption_key.set_prop("keyUrl", AAZStrType, ".key_url")
mobile_network = _builder.get(".properties.mobileNetwork")
if mobile_network is not None:
mobile_network.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
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.identity = AAZObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": 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.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200_201.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.encryption_key = AAZObjectType(
serialized_name="encryptionKey",
)
properties.mobile_network = AAZObjectType(
serialized_name="mobileNetwork",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
encryption_key = cls._schema_on_200_201.properties.encryption_key
encryption_key.key_url = AAZStrType(
serialized_name="keyUrl",
)
mobile_network = cls._schema_on_200_201.properties.mobile_network
mobile_network.id = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.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",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class SimGroupsCreateOrUpdate(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 | 21 | 2 | 19 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 229 | 30 | 199 | 44 | 180 | 0 | 95 | 35 | 84 | 7 | 1 | 1 | 19 |
8,915 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_bulk_upload_sims.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._bulk_upload_sims.BulkUploadSims.SimsBulkUpload
|
class SimsBulkUpload(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.MobileNetwork/simGroups/{simGroupName}/uploadSims",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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("sims", AAZListType, ".sims",
typ_kwargs={"flags": {"required": True}})
sims = _builder.get(".sims")
if sims is not None:
sims.set_elements(AAZObjectType, ".")
_elements = _builder.get(".sims[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
properties = _builder.get(".sims[].properties")
if properties is not None:
properties.set_prop("authenticationKey", AAZStrType, ".authentication_key", typ_kwargs={
"flags": {"secret": True}})
properties.set_prop("deviceType", AAZStrType, ".device_type")
properties.set_prop(
"integratedCircuitCardIdentifier", AAZStrType, ".icc_id")
properties.set_prop("internationalMobileSubscriberIdentity", AAZStrType,
".international_msi", typ_kwargs={"flags": {"required": True}})
properties.set_prop("operatorKeyCode", AAZStrType, ".operator_key_code", typ_kwargs={
"flags": {"secret": True}})
properties.set_prop("simPolicy", AAZObjectType, ".sim_policy")
properties.set_prop("staticIpConfiguration",
AAZListType, ".static_ip_configuration")
sim_policy = _builder.get(".sims[].properties.simPolicy")
if sim_policy is not None:
sim_policy.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
static_ip_configuration = _builder.get(
".sims[].properties.staticIpConfiguration")
if static_ip_configuration is not None:
static_ip_configuration.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".sims[].properties.staticIpConfiguration[]")
if _elements is not None:
_elements.set_prop("attachedDataNetwork",
AAZObjectType, ".attached_data_network")
_elements.set_prop("slice", AAZObjectType, ".slice")
_elements.set_prop("staticIp", AAZObjectType, ".static_ip")
attached_data_network = _builder.get(
".sims[].properties.staticIpConfiguration[].attachedDataNetwork")
if attached_data_network is not None:
attached_data_network.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
slice = _builder.get(
".sims[].properties.staticIpConfiguration[].slice")
if slice is not None:
slice.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
static_ip = _builder.get(
".sims[].properties.staticIpConfiguration[].staticIp")
if static_ip is not None:
static_ip.set_prop("ipv4Address", AAZStrType, ".ipv4_address")
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.end_time = AAZStrType(
serialized_name="endTime",
)
_schema_on_200.error = AAZObjectType()
_BulkUploadSimsHelper._build_schema_error_detail_read(
_schema_on_200.error)
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.percent_complete = AAZFloatType(
serialized_name="percentComplete",
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.resource_id = AAZStrType(
serialized_name="resourceId",
)
_schema_on_200.start_time = AAZStrType(
serialized_name="startTime",
)
_schema_on_200.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class SimsBulkUpload(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 | 16 | 1 | 14 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 178 | 25 | 153 | 38 | 134 | 0 | 85 | 29 | 74 | 10 | 1 | 1 | 22 |
8,916 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/group/_bulk_delete_sims.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.group._bulk_delete_sims.BulkDeleteSims.SimsBulkDelete
|
class SimsBulkDelete(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,
)
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": "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.MobileNetwork/simGroups/{simGroupName}/deleteSims",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
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-09-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("sims", AAZListType, ".sims",
typ_kwargs={"flags": {"required": True}})
sims = _builder.get(".sims")
if sims is not None:
sims.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.end_time = AAZStrType(
serialized_name="endTime",
)
_schema_on_200.error = AAZObjectType()
_BulkDeleteSimsHelper._build_schema_error_detail_read(
_schema_on_200.error)
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.percent_complete = AAZFloatType(
serialized_name="percentComplete",
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.resource_id = AAZStrType(
serialized_name="resourceId",
)
_schema_on_200.start_time = AAZStrType(
serialized_name="startTime",
)
_schema_on_200.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
def on_204(self, session):
pass
|
class SimsBulkDelete(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
def on_204(self, session):
pass
| 20 | 0 | 11 | 1 | 11 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 10 | 1 | 11 | 11 | 149 | 18 | 131 | 32 | 111 | 0 | 56 | 23 | 44 | 4 | 1 | 1 | 16 |
8,917 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network.sim._wait.Wait.SimsGet
|
class SimsGet(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.MobileNetwork/simGroups/{simGroupName}/sims/{simName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
required=True,
),
**self.serialize_url_param(
"simName", self.ctx.args.sim_name,
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-09-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.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.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.device_type = AAZStrType(
serialized_name="deviceType",
)
properties.integrated_circuit_card_identifier = AAZStrType(
serialized_name="integratedCircuitCardIdentifier",
)
properties.international_mobile_subscriber_identity = AAZStrType(
serialized_name="internationalMobileSubscriberIdentity",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.sim_policy = AAZObjectType(
serialized_name="simPolicy",
)
properties.sim_state = AAZStrType(
serialized_name="simState",
flags={"read_only": True},
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.static_ip_configuration = AAZListType(
serialized_name="staticIpConfiguration",
)
properties.vendor_key_fingerprint = AAZStrType(
serialized_name="vendorKeyFingerprint",
flags={"read_only": True},
)
properties.vendor_name = AAZStrType(
serialized_name="vendorName",
flags={"read_only": True},
)
sim_policy = cls._schema_on_200.properties.sim_policy
sim_policy.id = AAZStrType(
flags={"required": True},
)
site_provisioning_state = cls._schema_on_200.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
static_ip_configuration = cls._schema_on_200.properties.static_ip_configuration
static_ip_configuration.Element = AAZObjectType()
_element = cls._schema_on_200.properties.static_ip_configuration.Element
_element.attached_data_network = AAZObjectType(
serialized_name="attachedDataNetwork",
)
_element.slice = AAZObjectType()
_element.static_ip = AAZObjectType(
serialized_name="staticIp",
)
attached_data_network = cls._schema_on_200.properties.static_ip_configuration.Element.attached_data_network
attached_data_network.id = AAZStrType(
flags={"required": True},
)
slice = cls._schema_on_200.properties.static_ip_configuration.Element.slice
slice.id = AAZStrType(
flags={"required": True},
)
static_ip = cls._schema_on_200.properties.static_ip_configuration.Element.static_ip
static_ip.ipv4_address = AAZStrType(
serialized_name="ipv4Address",
)
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 SimsGet(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 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 198 | 23 | 175 | 35 | 158 | 0 | 72 | 28 | 62 | 2 | 1 | 1 | 11 |
8,918 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.sim._delete.Delete.SimsDelete
|
class SimsDelete(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,
)
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": "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.MobileNetwork/simGroups/{simGroupName}/sims/{simName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simGroupName", self.ctx.args.sim_group_name,
required=True,
),
**self.serialize_url_param(
"simName", self.ctx.args.sim_name,
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-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SimsDelete(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,919 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_show.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._show.Show.PacketCoreControlPlanesGet
|
class PacketCoreControlPlanesGet(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.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}",
**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(
"packetCoreControlPlaneName", self.ctx.args.pccp_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-09-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.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.control_plane_access_interface = AAZObjectType(
serialized_name="controlPlaneAccessInterface",
flags={"required": True},
)
properties.control_plane_access_virtual_ipv4_addresses = AAZListType(
serialized_name="controlPlaneAccessVirtualIpv4Addresses",
)
properties.core_network_technology = AAZStrType(
serialized_name="coreNetworkTechnology",
)
properties.diagnostics_upload = AAZObjectType(
serialized_name="diagnosticsUpload",
)
properties.event_hub = AAZObjectType(
serialized_name="eventHub",
)
properties.installation = AAZObjectType()
properties.installed_version = AAZStrType(
serialized_name="installedVersion",
flags={"read_only": True},
)
properties.interop_settings = AAZObjectType(
serialized_name="interopSettings",
)
properties.local_diagnostics_access = AAZObjectType(
serialized_name="localDiagnosticsAccess",
flags={"required": True},
)
properties.platform = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.rollback_version = AAZStrType(
serialized_name="rollbackVersion",
flags={"read_only": True},
)
properties.signaling = AAZObjectType()
properties.sites = AAZListType(
flags={"required": True},
)
properties.sku = AAZStrType(
flags={"required": True},
)
properties.ue_mtu = AAZIntType(
serialized_name="ueMtu",
)
properties.version = AAZStrType()
control_plane_access_interface = cls._schema_on_200.properties.control_plane_access_interface
control_plane_access_interface.ipv4_address = AAZStrType(
serialized_name="ipv4Address",
)
control_plane_access_interface.ipv4_gateway = AAZStrType(
serialized_name="ipv4Gateway",
)
control_plane_access_interface.ipv4_subnet = AAZStrType(
serialized_name="ipv4Subnet",
)
control_plane_access_interface.name = AAZStrType()
control_plane_access_virtual_ipv4_addresses = cls._schema_on_200.properties.control_plane_access_virtual_ipv4_addresses
control_plane_access_virtual_ipv4_addresses.Element = AAZStrType()
diagnostics_upload = cls._schema_on_200.properties.diagnostics_upload
diagnostics_upload.storage_account_container_url = AAZStrType(
serialized_name="storageAccountContainerUrl",
flags={"required": True},
)
event_hub = cls._schema_on_200.properties.event_hub
event_hub.id = AAZStrType(
flags={"required": True},
)
event_hub.reporting_interval = AAZIntType(
serialized_name="reportingInterval",
)
installation = cls._schema_on_200.properties.installation
installation.desired_state = AAZStrType(
serialized_name="desiredState",
)
installation.operation = AAZObjectType()
installation.reasons = AAZListType(
flags={"read_only": True},
)
installation.reinstall_required = AAZStrType(
serialized_name="reinstallRequired",
)
installation.state = AAZStrType()
operation = cls._schema_on_200.properties.installation.operation
operation.id = AAZStrType(
flags={"required": True},
)
reasons = cls._schema_on_200.properties.installation.reasons
reasons.Element = AAZStrType()
local_diagnostics_access = cls._schema_on_200.properties.local_diagnostics_access
local_diagnostics_access.authentication_type = AAZStrType(
serialized_name="authenticationType",
flags={"required": True},
)
local_diagnostics_access.https_server_certificate = AAZObjectType(
serialized_name="httpsServerCertificate",
)
https_server_certificate = cls._schema_on_200.properties.local_diagnostics_access.https_server_certificate
https_server_certificate.certificate_url = AAZStrType(
serialized_name="certificateUrl",
flags={"required": True},
)
https_server_certificate.provisioning = AAZObjectType()
provisioning = cls._schema_on_200.properties.local_diagnostics_access.https_server_certificate.provisioning
provisioning.reason = AAZStrType(
flags={"read_only": True},
)
provisioning.state = AAZStrType(
flags={"read_only": True},
)
platform = cls._schema_on_200.properties.platform
platform.azure_stack_edge_device = AAZObjectType(
serialized_name="azureStackEdgeDevice",
)
_ShowHelper._build_schema_azure_stack_edge_device_resource_id_read(
platform.azure_stack_edge_device)
platform.azure_stack_edge_devices = AAZListType(
serialized_name="azureStackEdgeDevices",
flags={"read_only": True},
)
platform.azure_stack_hci_cluster = AAZObjectType(
serialized_name="azureStackHciCluster",
)
platform.connected_cluster = AAZObjectType(
serialized_name="connectedCluster",
)
platform.custom_location = AAZObjectType(
serialized_name="customLocation",
)
platform.type = AAZStrType(
flags={"required": True},
)
azure_stack_edge_devices = cls._schema_on_200.properties.platform.azure_stack_edge_devices
azure_stack_edge_devices.Element = AAZObjectType()
_ShowHelper._build_schema_azure_stack_edge_device_resource_id_read(
azure_stack_edge_devices.Element)
azure_stack_hci_cluster = cls._schema_on_200.properties.platform.azure_stack_hci_cluster
azure_stack_hci_cluster.id = AAZStrType(
flags={"required": True},
)
connected_cluster = cls._schema_on_200.properties.platform.connected_cluster
connected_cluster.id = AAZStrType(
flags={"required": True},
)
custom_location = cls._schema_on_200.properties.platform.custom_location
custom_location.id = AAZStrType(
flags={"required": True},
)
signaling = cls._schema_on_200.properties.signaling
signaling.nas_reroute = AAZObjectType(
serialized_name="nasReroute",
)
nas_reroute = cls._schema_on_200.properties.signaling.nas_reroute
nas_reroute.macro_mme_group_id = AAZIntType(
serialized_name="macroMmeGroupId",
flags={"required": True},
)
sites = cls._schema_on_200.properties.sites
sites.Element = AAZObjectType()
_element = cls._schema_on_200.properties.sites.Element
_element.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PacketCoreControlPlanesGet(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 | 35 | 3 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 334 | 39 | 295 | 50 | 278 | 0 | 132 | 43 | 122 | 2 | 1 | 1 | 11 |
8,920 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_rollback.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._rollback.Rollback.PacketCoreControlPlanesRollback
|
class PacketCoreControlPlanesRollback(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.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/rollback",
**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(
"packetCoreControlPlaneName", self.ctx.args.pccp_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-09-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.end_time = AAZStrType(
serialized_name="endTime",
)
_schema_on_200.error = AAZObjectType()
_RollbackHelper._build_schema_error_detail_read(
_schema_on_200.error)
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.percent_complete = AAZFloatType(
serialized_name="percentComplete",
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.resource_id = AAZStrType(
serialized_name="resourceId",
)
_schema_on_200.start_time = AAZStrType(
serialized_name="startTime",
)
_schema_on_200.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class PacketCoreControlPlanesRollback(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 | 0 | 11 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 119 | 14 | 105 | 27 | 88 | 0 | 45 | 19 | 35 | 3 | 1 | 1 | 12 |
8,921 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_reinstall.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._reinstall.Reinstall.PacketCoreControlPlanesReinstall
|
class PacketCoreControlPlanesReinstall(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.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/reinstall",
**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(
"packetCoreControlPlaneName", self.ctx.args.pccp_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-09-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.end_time = AAZStrType(
serialized_name="endTime",
)
_schema_on_200.error = AAZObjectType()
_ReinstallHelper._build_schema_error_detail_read(
_schema_on_200.error)
_schema_on_200.id = AAZStrType()
_schema_on_200.name = AAZStrType()
_schema_on_200.percent_complete = AAZFloatType(
serialized_name="percentComplete",
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.resource_id = AAZStrType(
serialized_name="resourceId",
)
_schema_on_200.start_time = AAZStrType(
serialized_name="startTime",
)
_schema_on_200.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class PacketCoreControlPlanesReinstall(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 | 0 | 11 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 119 | 14 | 105 | 27 | 88 | 0 | 45 | 19 | 35 | 3 | 1 | 1 | 12 |
8,922 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogAgreementResourceListResponse
|
class DatadogAgreementResourceListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogAgreementResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[DatadogAgreementResource]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["DatadogAgreementResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
super(DatadogAgreementResourceListResponse, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class DatadogAgreementResourceListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogAgreementResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
*,
value: Optional[List["DatadogAgreementResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.4 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 1 | 24 | 3 | 15 | 11 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,923 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogApiKey
|
class DatadogApiKey(msrest.serialization.Model):
"""DatadogApiKey.
All required parameters must be populated in order to send to Azure.
:param created_by: The user that created the API key.
:type created_by: str
:param name: The name of the API key.
:type name: str
:param key: Required. The value of the API key.
:type key: str
:param created: The time of creation of the API key.
:type created: str
"""
_validation = {
'key': {'required': True},
}
_attribute_map = {
'created_by': {'key': 'createdBy', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'key': {'key': 'key', 'type': 'str'},
'created': {'key': 'created', 'type': 'str'},
}
def __init__(
self,
*,
key: str,
created_by: Optional[str] = None,
name: Optional[str] = None,
created: Optional[str] = None,
**kwargs
):
super(DatadogApiKey, self).__init__(**kwargs)
self.created_by = created_by
self.name = name
self.key = key
self.created = created
|
class DatadogApiKey(msrest.serialization.Model):
'''DatadogApiKey.
All required parameters must be populated in order to send to Azure.
:param created_by: The user that created the API key.
:type created_by: str
:param name: The name of the API key.
:type name: str
:param key: Required. The value of the API key.
:type key: str
:param created: The time of creation of the API key.
:type created: str
'''
def __init__(
self,
*,
key: str,
created_by: Optional[str] = None,
name: Optional[str] = None,
created: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 14 | 0 | 14 | 0 | 1 | 0.46 | 1 | 2 | 0 | 0 | 1 | 4 | 1 | 1 | 40 | 5 | 24 | 16 | 14 | 11 | 9 | 8 | 7 | 1 | 1 | 0 | 1 |
8,924 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogApiKeyListResponse
|
class DatadogApiKeyListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogApiKey]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[DatadogApiKey]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["DatadogApiKey"]] = None,
next_link: Optional[str] = None,
**kwargs
):
super(DatadogApiKeyListResponse, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class DatadogApiKeyListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogApiKey]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
*,
value: Optional[List["DatadogApiKey"]] = None,
next_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.4 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 1 | 24 | 3 | 15 | 11 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,925 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogHost
|
class DatadogHost(msrest.serialization.Model):
"""DatadogHost.
:param name: The name of the host.
:type name: str
:param aliases: The aliases for the host.
:type aliases: list[str]
:param apps: The Datadog integrations reporting metrics for the host.
:type apps: list[str]
:param meta:
:type meta: ~microsoft_datadog_client.models.DatadogHostMetadata
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'aliases': {'key': 'aliases', 'type': '[str]'},
'apps': {'key': 'apps', 'type': '[str]'},
'meta': {'key': 'meta', 'type': 'DatadogHostMetadata'},
}
def __init__(
self,
*,
name: Optional[str] = None,
aliases: Optional[List[str]] = None,
apps: Optional[List[str]] = None,
meta: Optional["DatadogHostMetadata"] = None,
**kwargs
):
super(DatadogHost, self).__init__(**kwargs)
self.name = name
self.aliases = aliases
self.apps = apps
self.meta = meta
|
class DatadogHost(msrest.serialization.Model):
'''DatadogHost.
:param name: The name of the host.
:type name: str
:param aliases: The aliases for the host.
:type aliases: list[str]
:param apps: The Datadog integrations reporting metrics for the host.
:type apps: list[str]
:param meta:
:type meta: ~microsoft_datadog_client.models.DatadogHostMetadata
'''
def __init__(
self,
*,
name: Optional[str] = None,
aliases: Optional[List[str]] = None,
apps: Optional[List[str]] = None,
meta: Optional["DatadogHostMetadata"] = None,
**kwargs
):
pass
| 2 | 1 | 14 | 0 | 14 | 0 | 1 | 0.48 | 1 | 2 | 0 | 0 | 1 | 4 | 1 | 1 | 34 | 3 | 21 | 15 | 11 | 10 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
8,926 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogHostListResponse
|
class DatadogHostListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogHost]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[DatadogHost]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["DatadogHost"]] = None,
next_link: Optional[str] = None,
**kwargs
):
super(DatadogHostListResponse, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class DatadogHostListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogHost]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
*,
value: Optional[List["DatadogHost"]] = None,
next_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.4 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 1 | 24 | 3 | 15 | 11 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,927 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogHostMetadata
|
class DatadogHostMetadata(msrest.serialization.Model):
"""DatadogHostMetadata.
:param agent_version: The agent version.
:type agent_version: str
:param install_method:
:type install_method: ~microsoft_datadog_client.models.DatadogInstallMethod
:param logs_agent:
:type logs_agent: ~microsoft_datadog_client.models.DatadogLogsAgent
"""
_attribute_map = {
'agent_version': {'key': 'agentVersion', 'type': 'str'},
'install_method': {'key': 'installMethod', 'type': 'DatadogInstallMethod'},
'logs_agent': {'key': 'logsAgent', 'type': 'DatadogLogsAgent'},
}
def __init__(
self,
*,
agent_version: Optional[str] = None,
install_method: Optional["DatadogInstallMethod"] = None,
logs_agent: Optional["DatadogLogsAgent"] = None,
**kwargs
):
super(DatadogHostMetadata, self).__init__(**kwargs)
self.agent_version = agent_version
self.install_method = install_method
self.logs_agent = logs_agent
|
class DatadogHostMetadata(msrest.serialization.Model):
'''DatadogHostMetadata.
:param agent_version: The agent version.
:type agent_version: str
:param install_method:
:type install_method: ~microsoft_datadog_client.models.DatadogInstallMethod
:param logs_agent:
:type logs_agent: ~microsoft_datadog_client.models.DatadogLogsAgent
'''
def __init__(
self,
*,
agent_version: Optional[str] = None,
install_method: Optional["DatadogInstallMethod"] = None,
logs_agent: Optional["DatadogLogsAgent"] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.44 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 1 | 29 | 3 | 18 | 13 | 9 | 8 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
8,928 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogInstallMethod
|
class DatadogInstallMethod(msrest.serialization.Model):
"""DatadogInstallMethod.
:param tool: The tool.
:type tool: str
:param tool_version: The tool version.
:type tool_version: str
:param installer_version: The installer version.
:type installer_version: str
"""
_attribute_map = {
'tool': {'key': 'tool', 'type': 'str'},
'tool_version': {'key': 'toolVersion', 'type': 'str'},
'installer_version': {'key': 'installerVersion', 'type': 'str'},
}
def __init__(
self,
*,
tool: Optional[str] = None,
tool_version: Optional[str] = None,
installer_version: Optional[str] = None,
**kwargs
):
super(DatadogInstallMethod, self).__init__(**kwargs)
self.tool = tool
self.tool_version = tool_version
self.installer_version = installer_version
|
class DatadogInstallMethod(msrest.serialization.Model):
'''DatadogInstallMethod.
:param tool: The tool.
:type tool: str
:param tool_version: The tool version.
:type tool_version: str
:param installer_version: The installer version.
:type installer_version: str
'''
def __init__(
self,
*,
tool: Optional[str] = None,
tool_version: Optional[str] = None,
installer_version: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.44 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 1 | 29 | 3 | 18 | 13 | 9 | 8 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
8,929 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogLogsAgent
|
class DatadogLogsAgent(msrest.serialization.Model):
"""DatadogLogsAgent.
:param transport: The transport.
:type transport: str
"""
_attribute_map = {
'transport': {'key': 'transport', 'type': 'str'},
}
def __init__(
self,
*,
transport: Optional[str] = None,
**kwargs
):
super(DatadogLogsAgent, self).__init__(**kwargs)
self.transport = transport
|
class DatadogLogsAgent(msrest.serialization.Model):
'''DatadogLogsAgent.
:param transport: The transport.
:type transport: str
'''
def __init__(
self,
*,
transport: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.33 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 1 | 19 | 3 | 12 | 9 | 5 | 4 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
8,930 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogMonitorResource
|
class DatadogMonitorResource(msrest.serialization.Model):
"""DatadogMonitorResource.
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 Azure.
:ivar id: ARM id of the monitor resource.
:vartype id: str
:ivar name: Name of the monitor resource.
:vartype name: str
:ivar type: The type of the monitor resource.
:vartype type: str
:param sku:
:type sku: ~microsoft_datadog_client.models.ResourceSku
:param properties: Properties specific to the monitor resource.
:type properties: ~microsoft_datadog_client.models.MonitorProperties
:param identity:
:type identity: ~microsoft_datadog_client.models.IdentityProperties
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param location: Required.
:type location: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'system_data': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'ResourceSku'},
'properties': {'key': 'properties', 'type': 'MonitorProperties'},
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'tags': {'key': 'tags', 'type': '{str}'},
'location': {'key': 'location', 'type': 'str'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(
self,
*,
location: str,
sku: Optional["ResourceSku"] = None,
properties: Optional["MonitorProperties"] = None,
identity: Optional["IdentityProperties"] = None,
tags: Optional[Dict[str, str]] = None,
**kwargs
):
super(DatadogMonitorResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.sku = sku
self.properties = properties
self.identity = identity
self.tags = tags
self.location = location
self.system_data = None
|
class DatadogMonitorResource(msrest.serialization.Model):
'''DatadogMonitorResource.
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 Azure.
:ivar id: ARM id of the monitor resource.
:vartype id: str
:ivar name: Name of the monitor resource.
:vartype name: str
:ivar type: The type of the monitor resource.
:vartype type: str
:param sku:
:type sku: ~microsoft_datadog_client.models.ResourceSku
:param properties: Properties specific to the monitor resource.
:type properties: ~microsoft_datadog_client.models.MonitorProperties
:param identity:
:type identity: ~microsoft_datadog_client.models.IdentityProperties
:param tags: A set of tags. Dictionary of :code:`<string>`.
:type tags: dict[str, str]
:param location: Required.
:type location: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
'''
def __init__(
self,
*,
location: str,
sku: Optional["ResourceSku"] = None,
properties: Optional["MonitorProperties"] = None,
identity: Optional["IdentityProperties"] = None,
tags: Optional[Dict[str, str]] = None,
**kwargs
):
pass
| 2 | 1 | 20 | 0 | 20 | 0 | 1 | 0.56 | 1 | 2 | 0 | 0 | 1 | 9 | 1 | 1 | 67 | 6 | 39 | 22 | 28 | 22 | 14 | 13 | 12 | 1 | 1 | 0 | 1 |
8,931 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogMonitorResourceListResponse
|
class DatadogMonitorResourceListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogMonitorResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[DatadogMonitorResource]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["DatadogMonitorResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
super(DatadogMonitorResourceListResponse, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class DatadogMonitorResourceListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogMonitorResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
*,
value: Optional[List["DatadogMonitorResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.4 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 1 | 24 | 3 | 15 | 11 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,932 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogMonitorResourceUpdateParameters
|
class DatadogMonitorResourceUpdateParameters(msrest.serialization.Model):
"""The parameters for a PATCH request to a monitor resource.
:param properties: The set of properties that can be update in a PATCH request to a monitor
resource.
:type properties: ~microsoft_datadog_client.models.MonitorUpdateProperties
:param tags: A set of tags. The new tags of the monitor resource.
:type tags: dict[str, str]
:param sku:
:type sku: ~microsoft_datadog_client.models.ResourceSku
"""
_attribute_map = {
'properties': {'key': 'properties', 'type': 'MonitorUpdateProperties'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'ResourceSku'},
}
def __init__(
self,
*,
properties: Optional["MonitorUpdateProperties"] = None,
tags: Optional[Dict[str, str]] = None,
sku: Optional["ResourceSku"] = None,
**kwargs
):
super(DatadogMonitorResourceUpdateParameters, self).__init__(**kwargs)
self.properties = properties
self.tags = tags
self.sku = sku
|
class DatadogMonitorResourceUpdateParameters(msrest.serialization.Model):
'''The parameters for a PATCH request to a monitor resource.
:param properties: The set of properties that can be update in a PATCH request to a monitor
resource.
:type properties: ~microsoft_datadog_client.models.MonitorUpdateProperties
:param tags: A set of tags. The new tags of the monitor resource.
:type tags: dict[str, str]
:param sku:
:type sku: ~microsoft_datadog_client.models.ResourceSku
'''
def __init__(
self,
*,
properties: Optional["MonitorUpdateProperties"] = None,
tags: Optional[Dict[str, str]] = None,
sku: Optional["ResourceSku"] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.5 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 1 | 30 | 3 | 18 | 13 | 9 | 9 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
8,933 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogOrganizationProperties
|
class DatadogOrganizationProperties(msrest.serialization.Model):
"""Datadog organization properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: Name of the Datadog organization.
:vartype name: str
:ivar id: Id of the Datadog organization.
:vartype id: str
:param linking_auth_code: The auth code used to linking to an existing datadog organization.
:type linking_auth_code: str
:param linking_client_id: The client_id from an existing in exchange for an auth token to link
organization.
:type linking_client_id: str
:param redirect_uri: The redirect uri for linking.
:type redirect_uri: str
:param api_key: Api key associated to the Datadog organization.
:type api_key: str
:param application_key: Application key associated to the Datadog organization.
:type application_key: str
:param enterprise_app_id: The Id of the Enterprise App used for Single sign on.
:type enterprise_app_id: str
"""
_validation = {
'name': {'readonly': True},
'id': {'readonly': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'linking_auth_code': {'key': 'linkingAuthCode', 'type': 'str'},
'linking_client_id': {'key': 'linkingClientId', 'type': 'str'},
'redirect_uri': {'key': 'redirectUri', 'type': 'str'},
'api_key': {'key': 'apiKey', 'type': 'str'},
'application_key': {'key': 'applicationKey', 'type': 'str'},
'enterprise_app_id': {'key': 'enterpriseAppId', 'type': 'str'},
}
def __init__(
self,
*,
linking_auth_code: Optional[str] = None,
linking_client_id: Optional[str] = None,
redirect_uri: Optional[str] = None,
api_key: Optional[str] = None,
application_key: Optional[str] = None,
enterprise_app_id: Optional[str] = None,
**kwargs
):
super(DatadogOrganizationProperties, self).__init__(**kwargs)
self.name = None
self.id = None
self.linking_auth_code = linking_auth_code
self.linking_client_id = linking_client_id
self.redirect_uri = redirect_uri
self.api_key = api_key
self.application_key = application_key
self.enterprise_app_id = enterprise_app_id
|
class DatadogOrganizationProperties(msrest.serialization.Model):
'''Datadog organization properties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: Name of the Datadog organization.
:vartype name: str
:ivar id: Id of the Datadog organization.
:vartype id: str
:param linking_auth_code: The auth code used to linking to an existing datadog organization.
:type linking_auth_code: str
:param linking_client_id: The client_id from an existing in exchange for an auth token to link
organization.
:type linking_client_id: str
:param redirect_uri: The redirect uri for linking.
:type redirect_uri: str
:param api_key: Api key associated to the Datadog organization.
:type api_key: str
:param application_key: Application key associated to the Datadog organization.
:type application_key: str
:param enterprise_app_id: The Id of the Enterprise App used for Single sign on.
:type enterprise_app_id: str
'''
def __init__(
self,
*,
linking_auth_code: Optional[str] = None,
linking_client_id: Optional[str] = None,
redirect_uri: Optional[str] = None,
api_key: Optional[str] = None,
application_key: Optional[str] = None,
enterprise_app_id: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 20 | 0 | 20 | 0 | 1 | 0.57 | 1 | 2 | 0 | 0 | 1 | 8 | 1 | 1 | 60 | 5 | 35 | 22 | 23 | 20 | 13 | 12 | 11 | 1 | 1 | 0 | 1 |
8,934 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogSetPasswordLink
|
class DatadogSetPasswordLink(msrest.serialization.Model):
"""DatadogSetPasswordLink.
:param set_password_link:
:type set_password_link: str
"""
_attribute_map = {
'set_password_link': {'key': 'setPasswordLink', 'type': 'str'},
}
def __init__(
self,
*,
set_password_link: Optional[str] = None,
**kwargs
):
super(DatadogSetPasswordLink, self).__init__(**kwargs)
self.set_password_link = set_password_link
|
class DatadogSetPasswordLink(msrest.serialization.Model):
'''DatadogSetPasswordLink.
:param set_password_link:
:type set_password_link: str
'''
def __init__(
self,
*,
set_password_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.33 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 1 | 19 | 3 | 12 | 9 | 5 | 4 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
8,935 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogSingleSignOnProperties
|
class DatadogSingleSignOnProperties(msrest.serialization.Model):
"""DatadogSingleSignOnProperties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param single_sign_on_state: Various states of the SSO resource. Possible values include:
"Initial", "Enable", "Disable", "Existing".
:type single_sign_on_state: str or ~microsoft_datadog_client.models.SingleSignOnStates
:param enterprise_app_id: The Id of the Enterprise App used for Single sign-on.
:type enterprise_app_id: str
:ivar single_sign_on_url: The login URL specific to this Datadog Organization.
:vartype single_sign_on_url: str
"""
_validation = {
'provisioning_state': {'readonly': True},
'single_sign_on_url': {'readonly': True},
}
_attribute_map = {
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'single_sign_on_state': {'key': 'singleSignOnState', 'type': 'str'},
'enterprise_app_id': {'key': 'enterpriseAppId', 'type': 'str'},
'single_sign_on_url': {'key': 'singleSignOnUrl', 'type': 'str'},
}
def __init__(
self,
*,
single_sign_on_state: Optional[Union[str, "SingleSignOnStates"]] = None,
enterprise_app_id: Optional[str] = None,
**kwargs
):
super(DatadogSingleSignOnProperties, self).__init__(**kwargs)
self.provisioning_state = None
self.single_sign_on_state = single_sign_on_state
self.enterprise_app_id = enterprise_app_id
self.single_sign_on_url = None
|
class DatadogSingleSignOnProperties(msrest.serialization.Model):
'''DatadogSingleSignOnProperties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param single_sign_on_state: Various states of the SSO resource. Possible values include:
"Initial", "Enable", "Disable", "Existing".
:type single_sign_on_state: str or ~microsoft_datadog_client.models.SingleSignOnStates
:param enterprise_app_id: The Id of the Enterprise App used for Single sign-on.
:type enterprise_app_id: str
:ivar single_sign_on_url: The login URL specific to this Datadog Organization.
:vartype single_sign_on_url: str
'''
def __init__(
self,
*,
single_sign_on_state: Optional[Union[str, "SingleSignOnStates"]] = None,
enterprise_app_id: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.57 | 1 | 2 | 0 | 0 | 1 | 4 | 1 | 1 | 41 | 5 | 23 | 14 | 15 | 13 | 9 | 8 | 7 | 1 | 1 | 0 | 1 |
8,936 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogSingleSignOnResource
|
class DatadogSingleSignOnResource(msrest.serialization.Model):
"""DatadogSingleSignOnResource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: ARM id of the resource.
:vartype id: str
:ivar name: Name of the configuration.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param properties:
:type properties: ~microsoft_datadog_client.models.DatadogSingleSignOnProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'system_data': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'DatadogSingleSignOnProperties'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(
self,
*,
properties: Optional["DatadogSingleSignOnProperties"] = None,
**kwargs
):
super(DatadogSingleSignOnResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = properties
self.system_data = None
|
class DatadogSingleSignOnResource(msrest.serialization.Model):
'''DatadogSingleSignOnResource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: ARM id of the resource.
:vartype id: str
:ivar name: Name of the configuration.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param properties:
:type properties: ~microsoft_datadog_client.models.DatadogSingleSignOnProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
'''
def __init__(
self,
*,
properties: Optional["DatadogSingleSignOnProperties"] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 44 | 5 | 26 | 14 | 19 | 13 | 10 | 9 | 8 | 1 | 1 | 0 | 1 |
8,937 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogSingleSignOnResourceListResponse
|
class DatadogSingleSignOnResourceListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogSingleSignOnResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[DatadogSingleSignOnResource]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
*,
value: Optional[List["DatadogSingleSignOnResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
super(DatadogSingleSignOnResourceListResponse, self).__init__(**kwargs)
self.value = value
self.next_link = next_link
|
class DatadogSingleSignOnResourceListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.DatadogSingleSignOnResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
*,
value: Optional[List["DatadogSingleSignOnResource"]] = None,
next_link: Optional[str] = None,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.4 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 1 | 24 | 3 | 15 | 11 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,938 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.ErrorDetail
|
class ErrorDetail(msrest.serialization.Model):
"""The error detail.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~microsoft_datadog_client.models.ErrorDetail]
:ivar additional_info: The error additional info.
:vartype additional_info: list[~microsoft_datadog_client.models.ErrorAdditionalInfo]
"""
_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorDetail]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}
def __init__(
self,
**kwargs
):
super(ErrorDetail, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None
|
class ErrorDetail(msrest.serialization.Model):
'''The error detail.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~microsoft_datadog_client.models.ErrorDetail]
:ivar additional_info: The error additional info.
:vartype additional_info: list[~microsoft_datadog_client.models.ErrorAdditionalInfo]
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.52 | 1 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 43 | 5 | 25 | 12 | 20 | 13 | 10 | 9 | 8 | 1 | 1 | 0 | 1 |
8,939 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogAgreementResource
|
class DatadogAgreementResource(msrest.serialization.Model):
"""DatadogAgreementResource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: ARM id of the resource.
:vartype id: str
:ivar name: Name of the agreement.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param properties: Represents the properties of the resource.
:type properties: ~microsoft_datadog_client.models.DatadogAgreementProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'system_data': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'DatadogAgreementProperties'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(
self,
*,
properties: Optional["DatadogAgreementProperties"] = None,
**kwargs
):
super(DatadogAgreementResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = properties
self.system_data = None
|
class DatadogAgreementResource(msrest.serialization.Model):
'''DatadogAgreementResource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: ARM id of the resource.
:vartype id: str
:ivar name: Name of the agreement.
:vartype name: str
:ivar type: The type of the resource.
:vartype type: str
:param properties: Represents the properties of the resource.
:type properties: ~microsoft_datadog_client.models.DatadogAgreementProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
'''
def __init__(
self,
*,
properties: Optional["DatadogAgreementProperties"] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 44 | 5 | 26 | 14 | 19 | 13 | 10 | 9 | 8 | 1 | 1 | 0 | 1 |
8,940 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.DatadogAgreementProperties
|
class DatadogAgreementProperties(msrest.serialization.Model):
"""Terms properties.
:param publisher: Publisher identifier string.
:type publisher: str
:param product: Product identifier string.
:type product: str
:param plan: Plan identifier string.
:type plan: str
:param license_text_link: Link to HTML with Microsoft and Publisher terms.
:type license_text_link: str
:param privacy_policy_link: Link to the privacy policy of the publisher.
:type privacy_policy_link: str
:param retrieve_datetime: Date and time in UTC of when the terms were accepted. This is empty
if Accepted is false.
:type retrieve_datetime: ~datetime.datetime
:param signature: Terms signature.
:type signature: str
:param accepted: If any version of the terms have been accepted, otherwise false.
:type accepted: bool
"""
_attribute_map = {
'publisher': {'key': 'publisher', 'type': 'str'},
'product': {'key': 'product', 'type': 'str'},
'plan': {'key': 'plan', 'type': 'str'},
'license_text_link': {'key': 'licenseTextLink', 'type': 'str'},
'privacy_policy_link': {'key': 'privacyPolicyLink', 'type': 'str'},
'retrieve_datetime': {'key': 'retrieveDatetime', 'type': 'iso-8601'},
'signature': {'key': 'signature', 'type': 'str'},
'accepted': {'key': 'accepted', 'type': 'bool'},
}
def __init__(
self,
*,
publisher: Optional[str] = None,
product: Optional[str] = None,
plan: Optional[str] = None,
license_text_link: Optional[str] = None,
privacy_policy_link: Optional[str] = None,
retrieve_datetime: Optional[datetime.datetime] = None,
signature: Optional[str] = None,
accepted: Optional[bool] = None,
**kwargs
):
super(DatadogAgreementProperties, self).__init__(**kwargs)
self.publisher = publisher
self.product = product
self.plan = plan
self.license_text_link = license_text_link
self.privacy_policy_link = privacy_policy_link
self.retrieve_datetime = retrieve_datetime
self.signature = signature
self.accepted = accepted
|
class DatadogAgreementProperties(msrest.serialization.Model):
'''Terms properties.
:param publisher: Publisher identifier string.
:type publisher: str
:param product: Product identifier string.
:type product: str
:param plan: Plan identifier string.
:type plan: str
:param license_text_link: Link to HTML with Microsoft and Publisher terms.
:type license_text_link: str
:param privacy_policy_link: Link to the privacy policy of the publisher.
:type privacy_policy_link: str
:param retrieve_datetime: Date and time in UTC of when the terms were accepted. This is empty
if Accepted is false.
:type retrieve_datetime: ~datetime.datetime
:param signature: Terms signature.
:type signature: str
:param accepted: If any version of the terms have been accepted, otherwise false.
:type accepted: bool
'''
def __init__(
self,
*,
publisher: Optional[str] = None,
product: Optional[str] = None,
plan: Optional[str] = None,
license_text_link: Optional[str] = None,
privacy_policy_link: Optional[str] = None,
retrieve_datetime: Optional[datetime.datetime] = None,
signature: Optional[str] = None,
accepted: Optional[bool] = None,
**kwargs
):
pass
| 2 | 1 | 22 | 0 | 22 | 0 | 1 | 0.58 | 1 | 4 | 0 | 0 | 1 | 8 | 1 | 1 | 55 | 3 | 33 | 23 | 19 | 19 | 12 | 11 | 10 | 1 | 1 | 0 | 1 |
8,941 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.UserInfo
|
class UserInfo(msrest.serialization.Model):
"""User info.
:param name: Name of the user.
:type name: str
:param email_address: Email of the user used by Datadog for contacting them if needed.
:type email_address: str
:param phone_number: Phone number of the user used by Datadog for contacting them if needed.
:type phone_number: str
"""
_validation = {
'name': {'max_length': 50, 'min_length': 0},
'email_address': {'pattern': r'^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,}$'},
'phone_number': {'max_length': 40, 'min_length': 0},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'email_address': {'key': 'emailAddress', 'type': 'str'},
'phone_number': {'key': 'phoneNumber', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(UserInfo, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.email_address = kwargs.get('email_address', None)
self.phone_number = kwargs.get('phone_number', None)
|
class UserInfo(msrest.serialization.Model):
'''User info.
:param name: Name of the user.
:type name: str
:param email_address: Email of the user used by Datadog for contacting them if needed.
:type email_address: str
:param phone_number: Phone number of the user used by Datadog for contacting them if needed.
:type phone_number: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.42 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 31 | 4 | 19 | 10 | 14 | 8 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
8,942 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.SystemData
|
class SystemData(msrest.serialization.Model):
"""Metadata pertaining to creation and last modification of the resource.
:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource. Possible values
include: "User", "Application", "ManagedIdentity", "Key".
:type created_by_type: str or ~microsoft_datadog_client.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: ~datetime.datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the resource. Possible
values include: "User", "Application", "ManagedIdentity", "Key".
:type last_modified_by_type: str or ~microsoft_datadog_client.models.CreatedByType
:param last_modified_at: The timestamp of resource last modification (UTC).
:type last_modified_at: ~datetime.datetime
"""
_attribute_map = {
'created_by': {'key': 'createdBy', 'type': 'str'},
'created_by_type': {'key': 'createdByType', 'type': 'str'},
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
}
def __init__(
self,
**kwargs
):
super(SystemData, self).__init__(**kwargs)
self.created_by = kwargs.get('created_by', None)
self.created_by_type = kwargs.get('created_by_type', None)
self.created_at = kwargs.get('created_at', None)
self.last_modified_by = kwargs.get('last_modified_by', None)
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
self.last_modified_at = kwargs.get('last_modified_at', None)
|
class SystemData(msrest.serialization.Model):
'''Metadata pertaining to creation and last modification of the resource.
:param created_by: The identity that created the resource.
:type created_by: str
:param created_by_type: The type of identity that created the resource. Possible values
include: "User", "Application", "ManagedIdentity", "Key".
:type created_by_type: str or ~microsoft_datadog_client.models.CreatedByType
:param created_at: The timestamp of resource creation (UTC).
:type created_at: ~datetime.datetime
:param last_modified_by: The identity that last modified the resource.
:type last_modified_by: str
:param last_modified_by_type: The type of identity that last modified the resource. Possible
values include: "User", "Application", "ManagedIdentity", "Key".
:type last_modified_by_type: str or ~microsoft_datadog_client.models.CreatedByType
:param last_modified_at: The timestamp of resource last modification (UTC).
:type last_modified_at: ~datetime.datetime
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 11 | 0 | 11 | 0 | 1 | 0.8 | 1 | 1 | 0 | 0 | 1 | 6 | 1 | 1 | 39 | 3 | 20 | 12 | 15 | 16 | 10 | 9 | 8 | 1 | 1 | 0 | 1 |
8,943 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._list.List.PacketCoreControlPlanesListBySubscription
|
class PacketCoreControlPlanesListBySubscription(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.MobileNetwork/packetCoreControlPlanes",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-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.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.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.control_plane_access_interface = AAZObjectType(
serialized_name="controlPlaneAccessInterface",
flags={"required": True},
)
properties.control_plane_access_virtual_ipv4_addresses = AAZListType(
serialized_name="controlPlaneAccessVirtualIpv4Addresses",
)
properties.core_network_technology = AAZStrType(
serialized_name="coreNetworkTechnology",
)
properties.diagnostics_upload = AAZObjectType(
serialized_name="diagnosticsUpload",
)
properties.event_hub = AAZObjectType(
serialized_name="eventHub",
)
properties.installation = AAZObjectType()
properties.installed_version = AAZStrType(
serialized_name="installedVersion",
flags={"read_only": True},
)
properties.interop_settings = AAZObjectType(
serialized_name="interopSettings",
)
properties.local_diagnostics_access = AAZObjectType(
serialized_name="localDiagnosticsAccess",
flags={"required": True},
)
properties.platform = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.rollback_version = AAZStrType(
serialized_name="rollbackVersion",
flags={"read_only": True},
)
properties.signaling = AAZObjectType()
properties.sites = AAZListType(
flags={"required": True},
)
properties.sku = AAZStrType(
flags={"required": True},
)
properties.ue_mtu = AAZIntType(
serialized_name="ueMtu",
)
properties.version = AAZStrType()
control_plane_access_interface = cls._schema_on_200.value.Element.properties.control_plane_access_interface
control_plane_access_interface.ipv4_address = AAZStrType(
serialized_name="ipv4Address",
)
control_plane_access_interface.ipv4_gateway = AAZStrType(
serialized_name="ipv4Gateway",
)
control_plane_access_interface.ipv4_subnet = AAZStrType(
serialized_name="ipv4Subnet",
)
control_plane_access_interface.name = AAZStrType()
control_plane_access_virtual_ipv4_addresses = cls._schema_on_200.value.Element.properties.control_plane_access_virtual_ipv4_addresses
control_plane_access_virtual_ipv4_addresses.Element = AAZStrType()
diagnostics_upload = cls._schema_on_200.value.Element.properties.diagnostics_upload
diagnostics_upload.storage_account_container_url = AAZStrType(
serialized_name="storageAccountContainerUrl",
flags={"required": True},
)
event_hub = cls._schema_on_200.value.Element.properties.event_hub
event_hub.id = AAZStrType(
flags={"required": True},
)
event_hub.reporting_interval = AAZIntType(
serialized_name="reportingInterval",
)
installation = cls._schema_on_200.value.Element.properties.installation
installation.desired_state = AAZStrType(
serialized_name="desiredState",
)
installation.operation = AAZObjectType()
installation.reasons = AAZListType(
flags={"read_only": True},
)
installation.reinstall_required = AAZStrType(
serialized_name="reinstallRequired",
)
installation.state = AAZStrType()
operation = cls._schema_on_200.value.Element.properties.installation.operation
operation.id = AAZStrType(
flags={"required": True},
)
reasons = cls._schema_on_200.value.Element.properties.installation.reasons
reasons.Element = AAZStrType()
local_diagnostics_access = cls._schema_on_200.value.Element.properties.local_diagnostics_access
local_diagnostics_access.authentication_type = AAZStrType(
serialized_name="authenticationType",
flags={"required": True},
)
local_diagnostics_access.https_server_certificate = AAZObjectType(
serialized_name="httpsServerCertificate",
)
https_server_certificate = cls._schema_on_200.value.Element.properties.local_diagnostics_access.https_server_certificate
https_server_certificate.certificate_url = AAZStrType(
serialized_name="certificateUrl",
flags={"required": True},
)
https_server_certificate.provisioning = AAZObjectType()
provisioning = cls._schema_on_200.value.Element.properties.local_diagnostics_access.https_server_certificate.provisioning
provisioning.reason = AAZStrType(
flags={"read_only": True},
)
provisioning.state = AAZStrType(
flags={"read_only": True},
)
platform = cls._schema_on_200.value.Element.properties.platform
platform.azure_stack_edge_device = AAZObjectType(
serialized_name="azureStackEdgeDevice",
)
_ListHelper._build_schema_azure_stack_edge_device_resource_id_read(
platform.azure_stack_edge_device)
platform.azure_stack_edge_devices = AAZListType(
serialized_name="azureStackEdgeDevices",
flags={"read_only": True},
)
platform.azure_stack_hci_cluster = AAZObjectType(
serialized_name="azureStackHciCluster",
)
platform.connected_cluster = AAZObjectType(
serialized_name="connectedCluster",
)
platform.custom_location = AAZObjectType(
serialized_name="customLocation",
)
platform.type = AAZStrType(
flags={"required": True},
)
azure_stack_edge_devices = cls._schema_on_200.value.Element.properties.platform.azure_stack_edge_devices
azure_stack_edge_devices.Element = AAZObjectType()
_ListHelper._build_schema_azure_stack_edge_device_resource_id_read(
azure_stack_edge_devices.Element)
azure_stack_hci_cluster = cls._schema_on_200.value.Element.properties.platform.azure_stack_hci_cluster
azure_stack_hci_cluster.id = AAZStrType(
flags={"required": True},
)
connected_cluster = cls._schema_on_200.value.Element.properties.platform.connected_cluster
connected_cluster.id = AAZStrType(
flags={"required": True},
)
custom_location = cls._schema_on_200.value.Element.properties.platform.custom_location
custom_location.id = AAZStrType(
flags={"required": True},
)
signaling = cls._schema_on_200.value.Element.properties.signaling
signaling.nas_reroute = AAZObjectType(
serialized_name="nasReroute",
)
nas_reroute = cls._schema_on_200.value.Element.properties.signaling.nas_reroute
nas_reroute.macro_mme_group_id = AAZIntType(
serialized_name="macroMmeGroupId",
flags={"required": True},
)
sites = cls._schema_on_200.value.Element.properties.sites
sites.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sites.Element
_element.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PacketCoreControlPlanesListBySubscription(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 | 35 | 3 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 336 | 41 | 295 | 51 | 278 | 0 | 137 | 44 | 127 | 2 | 1 | 1 | 11 |
8,944 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._list.List.PacketCoreControlPlanesListByResourceGroup
|
class PacketCoreControlPlanesListByResourceGroup(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.MobileNetwork/packetCoreControlPlanes",
**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(
"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-09-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.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.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.control_plane_access_interface = AAZObjectType(
serialized_name="controlPlaneAccessInterface",
flags={"required": True},
)
properties.control_plane_access_virtual_ipv4_addresses = AAZListType(
serialized_name="controlPlaneAccessVirtualIpv4Addresses",
)
properties.core_network_technology = AAZStrType(
serialized_name="coreNetworkTechnology",
)
properties.diagnostics_upload = AAZObjectType(
serialized_name="diagnosticsUpload",
)
properties.event_hub = AAZObjectType(
serialized_name="eventHub",
)
properties.installation = AAZObjectType()
properties.installed_version = AAZStrType(
serialized_name="installedVersion",
flags={"read_only": True},
)
properties.interop_settings = AAZObjectType(
serialized_name="interopSettings",
)
properties.local_diagnostics_access = AAZObjectType(
serialized_name="localDiagnosticsAccess",
flags={"required": True},
)
properties.platform = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.rollback_version = AAZStrType(
serialized_name="rollbackVersion",
flags={"read_only": True},
)
properties.signaling = AAZObjectType()
properties.sites = AAZListType(
flags={"required": True},
)
properties.sku = AAZStrType(
flags={"required": True},
)
properties.ue_mtu = AAZIntType(
serialized_name="ueMtu",
)
properties.version = AAZStrType()
control_plane_access_interface = cls._schema_on_200.value.Element.properties.control_plane_access_interface
control_plane_access_interface.ipv4_address = AAZStrType(
serialized_name="ipv4Address",
)
control_plane_access_interface.ipv4_gateway = AAZStrType(
serialized_name="ipv4Gateway",
)
control_plane_access_interface.ipv4_subnet = AAZStrType(
serialized_name="ipv4Subnet",
)
control_plane_access_interface.name = AAZStrType()
control_plane_access_virtual_ipv4_addresses = cls._schema_on_200.value.Element.properties.control_plane_access_virtual_ipv4_addresses
control_plane_access_virtual_ipv4_addresses.Element = AAZStrType()
diagnostics_upload = cls._schema_on_200.value.Element.properties.diagnostics_upload
diagnostics_upload.storage_account_container_url = AAZStrType(
serialized_name="storageAccountContainerUrl",
flags={"required": True},
)
event_hub = cls._schema_on_200.value.Element.properties.event_hub
event_hub.id = AAZStrType(
flags={"required": True},
)
event_hub.reporting_interval = AAZIntType(
serialized_name="reportingInterval",
)
installation = cls._schema_on_200.value.Element.properties.installation
installation.desired_state = AAZStrType(
serialized_name="desiredState",
)
installation.operation = AAZObjectType()
installation.reasons = AAZListType(
flags={"read_only": True},
)
installation.reinstall_required = AAZStrType(
serialized_name="reinstallRequired",
)
installation.state = AAZStrType()
operation = cls._schema_on_200.value.Element.properties.installation.operation
operation.id = AAZStrType(
flags={"required": True},
)
reasons = cls._schema_on_200.value.Element.properties.installation.reasons
reasons.Element = AAZStrType()
local_diagnostics_access = cls._schema_on_200.value.Element.properties.local_diagnostics_access
local_diagnostics_access.authentication_type = AAZStrType(
serialized_name="authenticationType",
flags={"required": True},
)
local_diagnostics_access.https_server_certificate = AAZObjectType(
serialized_name="httpsServerCertificate",
)
https_server_certificate = cls._schema_on_200.value.Element.properties.local_diagnostics_access.https_server_certificate
https_server_certificate.certificate_url = AAZStrType(
serialized_name="certificateUrl",
flags={"required": True},
)
https_server_certificate.provisioning = AAZObjectType()
provisioning = cls._schema_on_200.value.Element.properties.local_diagnostics_access.https_server_certificate.provisioning
provisioning.reason = AAZStrType(
flags={"read_only": True},
)
provisioning.state = AAZStrType(
flags={"read_only": True},
)
platform = cls._schema_on_200.value.Element.properties.platform
platform.azure_stack_edge_device = AAZObjectType(
serialized_name="azureStackEdgeDevice",
)
_ListHelper._build_schema_azure_stack_edge_device_resource_id_read(
platform.azure_stack_edge_device)
platform.azure_stack_edge_devices = AAZListType(
serialized_name="azureStackEdgeDevices",
flags={"read_only": True},
)
platform.azure_stack_hci_cluster = AAZObjectType(
serialized_name="azureStackHciCluster",
)
platform.connected_cluster = AAZObjectType(
serialized_name="connectedCluster",
)
platform.custom_location = AAZObjectType(
serialized_name="customLocation",
)
platform.type = AAZStrType(
flags={"required": True},
)
azure_stack_edge_devices = cls._schema_on_200.value.Element.properties.platform.azure_stack_edge_devices
azure_stack_edge_devices.Element = AAZObjectType()
_ListHelper._build_schema_azure_stack_edge_device_resource_id_read(
azure_stack_edge_devices.Element)
azure_stack_hci_cluster = cls._schema_on_200.value.Element.properties.platform.azure_stack_hci_cluster
azure_stack_hci_cluster.id = AAZStrType(
flags={"required": True},
)
connected_cluster = cls._schema_on_200.value.Element.properties.platform.connected_cluster
connected_cluster.id = AAZStrType(
flags={"required": True},
)
custom_location = cls._schema_on_200.value.Element.properties.platform.custom_location
custom_location.id = AAZStrType(
flags={"required": True},
)
signaling = cls._schema_on_200.value.Element.properties.signaling
signaling.nas_reroute = AAZObjectType(
serialized_name="nasReroute",
)
nas_reroute = cls._schema_on_200.value.Element.properties.signaling.nas_reroute
nas_reroute.macro_mme_group_id = AAZIntType(
serialized_name="macroMmeGroupId",
flags={"required": True},
)
sites = cls._schema_on_200.value.Element.properties.sites
sites.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.sites.Element
_element.id = AAZStrType(
flags={"required": 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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PacketCoreControlPlanesListByResourceGroup(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 | 36 | 3 | 32 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 340 | 41 | 299 | 51 | 282 | 0 | 137 | 44 | 127 | 2 | 1 | 1 | 11 |
8,945 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/pccp/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.pccp._delete.Delete.PacketCoreControlPlanesDelete
|
class PacketCoreControlPlanesDelete(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,
)
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": "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.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}",
**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(
"packetCoreControlPlaneName", self.ctx.args.pccp_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-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class PacketCoreControlPlanesDelete(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,946 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.LinkedResource
|
class LinkedResource(msrest.serialization.Model):
"""The definition of a linked resource.
:param id: The ARM id of the linked resource.
:type id: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(LinkedResource, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
|
class LinkedResource(msrest.serialization.Model):
'''The definition of a linked resource.
:param id: The ARM id of the linked resource.
:type id: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 6 | 0 | 6 | 0 | 1 | 0.4 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 17 | 3 | 10 | 7 | 5 | 4 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
8,947 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.LinkedResourceListResponse
|
class LinkedResourceListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.LinkedResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[LinkedResource]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(LinkedResourceListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
class LinkedResourceListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.LinkedResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 7 | 0 | 7 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 21 | 3 | 12 | 8 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,948 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.LogRules
|
class LogRules(msrest.serialization.Model):
"""Set of rules for sending logs for the Monitor resource.
:param send_aad_logs: Flag specifying if AAD logs should be sent for the Monitor resource.
:type send_aad_logs: bool
:param send_subscription_logs: Flag specifying if Azure subscription logs should be sent for
the Monitor resource.
:type send_subscription_logs: bool
:param send_resource_logs: Flag specifying if Azure resource logs should be sent for the
Monitor resource.
:type send_resource_logs: bool
:param filtering_tags: List of filtering tags to be used for capturing logs. This only takes
effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only
Exclude action is specified, the rules will apply to the list of all available resources. If
Include actions are specified, the rules will only include resources with the associated tags.
:type filtering_tags: list[~microsoft_datadog_client.models.FilteringTag]
"""
_attribute_map = {
'send_aad_logs': {'key': 'sendAadLogs', 'type': 'bool'},
'send_subscription_logs': {'key': 'sendSubscriptionLogs', 'type': 'bool'},
'send_resource_logs': {'key': 'sendResourceLogs', 'type': 'bool'},
'filtering_tags': {'key': 'filteringTags', 'type': '[FilteringTag]'},
}
def __init__(
self,
**kwargs
):
super(LogRules, self).__init__(**kwargs)
self.send_aad_logs = kwargs.get('send_aad_logs', None)
self.send_subscription_logs = kwargs.get('send_subscription_logs', None)
self.send_resource_logs = kwargs.get('send_resource_logs', None)
self.filtering_tags = kwargs.get('filtering_tags', None)
|
class LogRules(msrest.serialization.Model):
'''Set of rules for sending logs for the Monitor resource.
:param send_aad_logs: Flag specifying if AAD logs should be sent for the Monitor resource.
:type send_aad_logs: bool
:param send_subscription_logs: Flag specifying if Azure subscription logs should be sent for
the Monitor resource.
:type send_subscription_logs: bool
:param send_resource_logs: Flag specifying if Azure resource logs should be sent for the
Monitor resource.
:type send_resource_logs: bool
:param filtering_tags: List of filtering tags to be used for capturing logs. This only takes
effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only
Exclude action is specified, the rules will apply to the list of all available resources. If
Include actions are specified, the rules will only include resources with the associated tags.
:type filtering_tags: list[~microsoft_datadog_client.models.FilteringTag]
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 9 | 0 | 9 | 0 | 1 | 0.94 | 1 | 1 | 0 | 0 | 1 | 4 | 1 | 1 | 34 | 3 | 16 | 10 | 11 | 15 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
8,949 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MetricRules
|
class MetricRules(msrest.serialization.Model):
"""Set of rules for sending metrics for the Monitor resource.
:param filtering_tags: List of filtering tags to be used for capturing metrics. If empty, all
resources will be captured. If only Exclude action is specified, the rules will apply to the
list of all available resources. If Include actions are specified, the rules will only include
resources with the associated tags.
:type filtering_tags: list[~microsoft_datadog_client.models.FilteringTag]
"""
_attribute_map = {
'filtering_tags': {'key': 'filteringTags', 'type': '[FilteringTag]'},
}
def __init__(
self,
**kwargs
):
super(MetricRules, self).__init__(**kwargs)
self.filtering_tags = kwargs.get('filtering_tags', None)
|
class MetricRules(msrest.serialization.Model):
'''Set of rules for sending metrics for the Monitor resource.
:param filtering_tags: List of filtering tags to be used for capturing metrics. If empty, all
resources will be captured. If only Exclude action is specified, the rules will apply to the
list of all available resources. If Include actions are specified, the rules will only include
resources with the associated tags.
:type filtering_tags: list[~microsoft_datadog_client.models.FilteringTag]
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 6 | 0 | 6 | 0 | 1 | 0.7 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 20 | 3 | 10 | 7 | 5 | 7 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
8,950 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitorProperties
|
class MonitorProperties(msrest.serialization.Model):
"""Properties specific to the monitor resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param monitoring_status: Flag specifying if the resource monitoring is enabled or disabled.
Possible values include: "Enabled", "Disabled". Default value: "Enabled".
:type monitoring_status: str or ~microsoft_datadog_client.models.MonitoringStatus
:ivar marketplace_subscription_status: Flag specifying the Marketplace Subscription Status of
the resource. If payment is not made in time, the resource will go in Suspended state. Possible
values include: "Provisioning", "Active", "Suspended", "Unsubscribed".
:vartype marketplace_subscription_status: str or
~microsoft_datadog_client.models.MarketplaceSubscriptionStatus
:param datadog_organization_properties: Datadog organization properties.
:type datadog_organization_properties:
~microsoft_datadog_client.models.DatadogOrganizationProperties
:param user_info: User info.
:type user_info: ~microsoft_datadog_client.models.UserInfo
:ivar liftr_resource_category: Possible values include: "Unknown", "MonitorLogs".
:vartype liftr_resource_category: str or
~microsoft_datadog_client.models.LiftrResourceCategories
:ivar liftr_resource_preference: The priority of the resource.
:vartype liftr_resource_preference: int
"""
_validation = {
'provisioning_state': {'readonly': True},
'marketplace_subscription_status': {'readonly': True},
'liftr_resource_category': {'readonly': True},
'liftr_resource_preference': {'readonly': True},
}
_attribute_map = {
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'},
'marketplace_subscription_status': {'key': 'marketplaceSubscriptionStatus', 'type': 'str'},
'datadog_organization_properties': {'key': 'datadogOrganizationProperties', 'type': 'DatadogOrganizationProperties'},
'user_info': {'key': 'userInfo', 'type': 'UserInfo'},
'liftr_resource_category': {'key': 'liftrResourceCategory', 'type': 'str'},
'liftr_resource_preference': {'key': 'liftrResourcePreference', 'type': 'int'},
}
def __init__(
self,
**kwargs
):
super(MonitorProperties, self).__init__(**kwargs)
self.provisioning_state = None
self.monitoring_status = kwargs.get('monitoring_status', "Enabled")
self.marketplace_subscription_status = None
self.datadog_organization_properties = kwargs.get('datadog_organization_properties', None)
self.user_info = kwargs.get('user_info', None)
self.liftr_resource_category = None
self.liftr_resource_preference = None
|
class MonitorProperties(msrest.serialization.Model):
'''Properties specific to the monitor resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param monitoring_status: Flag specifying if the resource monitoring is enabled or disabled.
Possible values include: "Enabled", "Disabled". Default value: "Enabled".
:type monitoring_status: str or ~microsoft_datadog_client.models.MonitoringStatus
:ivar marketplace_subscription_status: Flag specifying the Marketplace Subscription Status of
the resource. If payment is not made in time, the resource will go in Suspended state. Possible
values include: "Provisioning", "Active", "Suspended", "Unsubscribed".
:vartype marketplace_subscription_status: str or
~microsoft_datadog_client.models.MarketplaceSubscriptionStatus
:param datadog_organization_properties: Datadog organization properties.
:type datadog_organization_properties:
~microsoft_datadog_client.models.DatadogOrganizationProperties
:param user_info: User info.
:type user_info: ~microsoft_datadog_client.models.UserInfo
:ivar liftr_resource_category: Possible values include: "Unknown", "MonitorLogs".
:vartype liftr_resource_category: str or
~microsoft_datadog_client.models.LiftrResourceCategories
:ivar liftr_resource_preference: The priority of the resource.
:vartype liftr_resource_preference: int
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.86 | 1 | 1 | 0 | 0 | 1 | 7 | 1 | 1 | 57 | 5 | 28 | 14 | 23 | 24 | 12 | 11 | 10 | 1 | 1 | 0 | 1 |
8,951 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models_py3.py
|
azext_datadog.vendored_sdks.datadog.models._models_py3.FilteringTag
|
class FilteringTag(msrest.serialization.Model):
"""The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.
:param name: The name (also known as the key) of the tag.
:type name: str
:param value: The value of the tag.
:type value: str
:param action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
Possible values include: "Include", "Exclude".
:type action: str or ~microsoft_datadog_client.models.TagAction
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}
def __init__(
self,
*,
name: Optional[str] = None,
value: Optional[str] = None,
action: Optional[Union[str, "TagAction"]] = None,
**kwargs
):
super(FilteringTag, self).__init__(**kwargs)
self.name = name
self.value = value
self.action = action
|
class FilteringTag(msrest.serialization.Model):
'''The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored.
:param name: The name (also known as the key) of the tag.
:type name: str
:param value: The value of the tag.
:type value: str
:param action: Valid actions for a filtering tag. Exclusion takes priority over inclusion.
Possible values include: "Include", "Exclude".
:type action: str or ~microsoft_datadog_client.models.TagAction
'''
def __init__(
self,
*,
name: Optional[str] = None,
value: Optional[str] = None,
action: Optional[Union[str, "TagAction"]] = None,
**kwargs
):
pass
| 2 | 1 | 12 | 0 | 12 | 0 | 1 | 0.5 | 1 | 2 | 0 | 0 | 1 | 3 | 1 | 1 | 30 | 3 | 18 | 13 | 9 | 9 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
8,952 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitorUpdateProperties
|
class MonitorUpdateProperties(msrest.serialization.Model):
"""The set of properties that can be update in a PATCH request to a monitor resource.
:param monitoring_status: Flag specifying if the resource monitoring is enabled or disabled.
Possible values include: "Enabled", "Disabled". Default value: "Enabled".
:type monitoring_status: str or ~microsoft_datadog_client.models.MonitoringStatus
"""
_attribute_map = {
'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(MonitorUpdateProperties, self).__init__(**kwargs)
self.monitoring_status = kwargs.get('monitoring_status', "Enabled")
|
class MonitorUpdateProperties(msrest.serialization.Model):
'''The set of properties that can be update in a PATCH request to a monitor resource.
:param monitoring_status: Flag specifying if the resource monitoring is enabled or disabled.
Possible values include: "Enabled", "Disabled". Default value: "Enabled".
:type monitoring_status: str or ~microsoft_datadog_client.models.MonitoringStatus
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 6 | 0 | 6 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 18 | 3 | 10 | 7 | 5 | 5 | 5 | 4 | 3 | 1 | 1 | 0 | 1 |
8,953 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitoredResourceListResponse
|
class MonitoredResourceListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.MonitoredResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[MonitoredResource]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(MonitoredResourceListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
class MonitoredResourceListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.MonitoredResource]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 7 | 0 | 7 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 21 | 3 | 12 | 8 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,954 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitoringTagRules
|
class MonitoringTagRules(msrest.serialization.Model):
"""Capture logs and metrics of Azure resources based on ARM tags.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: Name of the rule set.
:vartype name: str
:ivar id: The id of the rule set.
:vartype id: str
:ivar type: The type of the rule set.
:vartype type: str
:param properties: Definition of the properties for a TagRules resource.
:type properties: ~microsoft_datadog_client.models.MonitoringTagRulesProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
"""
_validation = {
'name': {'readonly': True},
'id': {'readonly': True},
'type': {'readonly': True},
'system_data': {'readonly': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'MonitoringTagRulesProperties'},
'system_data': {'key': 'systemData', 'type': 'SystemData'},
}
def __init__(
self,
**kwargs
):
super(MonitoringTagRules, self).__init__(**kwargs)
self.name = None
self.id = None
self.type = None
self.properties = kwargs.get('properties', None)
self.system_data = None
|
class MonitoringTagRules(msrest.serialization.Model):
'''Capture logs and metrics of Azure resources based on ARM tags.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: Name of the rule set.
:vartype name: str
:ivar id: The id of the rule set.
:vartype id: str
:ivar type: The type of the rule set.
:vartype type: str
:param properties: Definition of the properties for a TagRules resource.
:type properties: ~microsoft_datadog_client.models.MonitoringTagRulesProperties
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~microsoft_datadog_client.models.SystemData
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.54 | 1 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 42 | 5 | 24 | 12 | 19 | 13 | 10 | 9 | 8 | 1 | 1 | 0 | 1 |
8,955 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitoringTagRulesListResponse
|
class MonitoringTagRulesListResponse(msrest.serialization.Model):
"""Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.MonitoringTagRules]
:param next_link: Link to the next set of results, if any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[MonitoringTagRules]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(MonitoringTagRulesListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
class MonitoringTagRulesListResponse(msrest.serialization.Model):
'''Response of a list operation.
:param value: Results of a list operation.
:type value: list[~microsoft_datadog_client.models.MonitoringTagRules]
:param next_link: Link to the next set of results, if any.
:type next_link: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 7 | 0 | 7 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 21 | 3 | 12 | 8 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,956 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitoringTagRulesProperties
|
class MonitoringTagRulesProperties(msrest.serialization.Model):
"""Definition of the properties for a TagRules resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param log_rules: Set of rules for sending logs for the Monitor resource.
:type log_rules: ~microsoft_datadog_client.models.LogRules
:param metric_rules: Set of rules for sending metrics for the Monitor resource.
:type metric_rules: ~microsoft_datadog_client.models.MetricRules
"""
_validation = {
'provisioning_state': {'readonly': True},
}
_attribute_map = {
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'log_rules': {'key': 'logRules', 'type': 'LogRules'},
'metric_rules': {'key': 'metricRules', 'type': 'MetricRules'},
}
def __init__(
self,
**kwargs
):
super(MonitoringTagRulesProperties, self).__init__(**kwargs)
self.provisioning_state = None
self.log_rules = kwargs.get('log_rules', None)
self.metric_rules = kwargs.get('metric_rules', None)
|
class MonitoringTagRulesProperties(msrest.serialization.Model):
'''Definition of the properties for a TagRules resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provisioning_state: Possible values include: "Accepted", "Creating", "Updating",
"Deleting", "Succeeded", "Failed", "Canceled", "Deleted", "NotSpecified".
:vartype provisioning_state: str or ~microsoft_datadog_client.models.ProvisioningState
:param log_rules: Set of rules for sending logs for the Monitor resource.
:type log_rules: ~microsoft_datadog_client.models.LogRules
:param metric_rules: Set of rules for sending metrics for the Monitor resource.
:type metric_rules: ~microsoft_datadog_client.models.MetricRules
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.59 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 32 | 5 | 17 | 10 | 12 | 10 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
8,957 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.OperationDisplay
|
class OperationDisplay(msrest.serialization.Model):
"""The object that represents the operation.
:param provider: Service provider, i.e., Microsoft.Datadog.
:type provider: str
:param resource: Type on which the operation is performed, e.g., 'monitors'.
:type resource: str
:param operation: Operation type, e.g., read, write, delete, etc.
:type operation: str
:param description: Description of the operation, e.g., 'Write monitors'.
:type 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,
**kwargs
):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = kwargs.get('provider', None)
self.resource = kwargs.get('resource', None)
self.operation = kwargs.get('operation', None)
self.description = kwargs.get('description', None)
|
class OperationDisplay(msrest.serialization.Model):
'''The object that represents the operation.
:param provider: Service provider, i.e., Microsoft.Datadog.
:type provider: str
:param resource: Type on which the operation is performed, e.g., 'monitors'.
:type resource: str
:param operation: Operation type, e.g., read, write, delete, etc.
:type operation: str
:param description: Description of the operation, e.g., 'Write monitors'.
:type description: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 9 | 0 | 9 | 0 | 1 | 0.63 | 1 | 1 | 0 | 0 | 1 | 4 | 1 | 1 | 29 | 3 | 16 | 10 | 11 | 10 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
8,958 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.OperationListResult
|
class OperationListResult(msrest.serialization.Model):
"""Result of GET request to list the Microsoft.Datadog operations.
:param value: List of operations supported by the Microsoft.Datadog provider.
:type value: list[~microsoft_datadog_client.models.OperationResult]
:param next_link: URL to get the next set of operation list results if there are any.
:type next_link: str
"""
_attribute_map = {
'value': {'key': 'value', 'type': '[OperationResult]'},
'next_link': {'key': 'nextLink', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(OperationListResult, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
class OperationListResult(msrest.serialization.Model):
'''Result of GET request to list the Microsoft.Datadog operations.
:param value: List of operations supported by the Microsoft.Datadog provider.
:type value: list[~microsoft_datadog_client.models.OperationResult]
:param next_link: URL to get the next set of operation list results if there are any.
:type next_link: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 7 | 0 | 7 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 1 | 21 | 3 | 12 | 8 | 7 | 6 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,959 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.OperationResult
|
class OperationResult(msrest.serialization.Model):
"""A Microsoft.Datadog REST API operation.
:param name: Operation name, i.e., {provider}/{resource}/{operation}.
:type name: str
:param display: The object that represents the operation.
:type display: ~microsoft_datadog_client.models.OperationDisplay
:param is_data_action: Indicates whether the operation is a data action.
:type is_data_action: bool
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
'is_data_action': {'key': 'isDataAction', 'type': 'bool'},
}
def __init__(
self,
**kwargs
):
super(OperationResult, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
self.is_data_action = kwargs.get('is_data_action', None)
|
class OperationResult(msrest.serialization.Model):
'''A Microsoft.Datadog REST API operation.
:param name: Operation name, i.e., {provider}/{resource}/{operation}.
:type name: str
:param display: The object that represents the operation.
:type display: ~microsoft_datadog_client.models.OperationDisplay
:param is_data_action: Indicates whether the operation is a data action.
:type is_data_action: bool
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.57 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 25 | 3 | 14 | 9 | 9 | 8 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
8,960 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.ResourceSku
|
class ResourceSku(msrest.serialization.Model):
"""ResourceSku.
All required parameters must be populated in order to send to Azure.
:param name: Required. Name of the SKU.
:type name: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ResourceSku, self).__init__(**kwargs)
self.name = kwargs['name']
|
class ResourceSku(msrest.serialization.Model):
'''ResourceSku.
All required parameters must be populated in order to send to Azure.
:param name: Required. Name of the SKU.
:type name: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 6 | 0 | 6 | 0 | 1 | 0.38 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 23 | 5 | 13 | 8 | 8 | 5 | 6 | 5 | 4 | 1 | 1 | 0 | 1 |
8,961 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.MonitoredResource
|
class MonitoredResource(msrest.serialization.Model):
"""The properties of a resource currently being monitored by the Datadog monitor resource.
:param id: The ARM id of the resource.
:type id: str
:param sending_metrics: Flag indicating if resource is sending metrics to Datadog.
:type sending_metrics: bool
:param reason_for_metrics_status: Reason for why the resource is sending metrics (or why it is
not sending).
:type reason_for_metrics_status: str
:param sending_logs: Flag indicating if resource is sending logs to Datadog.
:type sending_logs: bool
:param reason_for_logs_status: Reason for why the resource is sending logs (or why it is not
sending).
:type reason_for_logs_status: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'sending_metrics': {'key': 'sendingMetrics', 'type': 'bool'},
'reason_for_metrics_status': {'key': 'reasonForMetricsStatus', 'type': 'str'},
'sending_logs': {'key': 'sendingLogs', 'type': 'bool'},
'reason_for_logs_status': {'key': 'reasonForLogsStatus', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(MonitoredResource, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.sending_metrics = kwargs.get('sending_metrics', None)
self.reason_for_metrics_status = kwargs.get('reason_for_metrics_status', None)
self.sending_logs = kwargs.get('sending_logs', None)
self.reason_for_logs_status = kwargs.get('reason_for_logs_status', None)
|
class MonitoredResource(msrest.serialization.Model):
'''The properties of a resource currently being monitored by the Datadog monitor resource.
:param id: The ARM id of the resource.
:type id: str
:param sending_metrics: Flag indicating if resource is sending metrics to Datadog.
:type sending_metrics: bool
:param reason_for_metrics_status: Reason for why the resource is sending metrics (or why it is
not sending).
:type reason_for_metrics_status: str
:param sending_logs: Flag indicating if resource is sending logs to Datadog.
:type sending_logs: bool
:param reason_for_logs_status: Reason for why the resource is sending logs (or why it is not
sending).
:type reason_for_logs_status: str
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 10 | 0 | 10 | 0 | 1 | 0.78 | 1 | 1 | 0 | 0 | 1 | 5 | 1 | 1 | 35 | 3 | 18 | 11 | 13 | 14 | 9 | 8 | 7 | 1 | 1 | 0 | 1 |
8,962 |
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/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._update.Update.SimPoliciesGet
|
class SimPoliciesGet(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.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**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(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
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-09-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()
_UpdateHelper._build_schema_sim_policy_read(cls._schema_on_200)
return cls._schema_on_200
|
class SimPoliciesGet(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 |
8,963 |
Azure/azure-cli-extensions
|
src/datafactory/azext_datafactory/vendored_sdks/datafactory/models/_data_factory_management_client_enums.py
|
azext_datafactory.vendored_sdks.datafactory.models._data_factory_management_client_enums.DatasetReferenceType
|
class DatasetReferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Dataset reference type."""
DATASET_REFERENCE = "DatasetReference"
|
class DatasetReferenceType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''Dataset reference type.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 4 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
8,964 |
Azure/azure-cli-extensions
|
src/datafactory/azext_datafactory/vendored_sdks/datafactory/models/_data_factory_management_client_enums.py
|
azext_datafactory.vendored_sdks.datafactory.models._data_factory_management_client_enums.DaysOfWeek
|
class DaysOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""DaysOfWeek."""
SUNDAY = "Sunday"
MONDAY = "Monday"
TUESDAY = "Tuesday"
WEDNESDAY = "Wednesday"
THURSDAY = "Thursday"
FRIDAY = "Friday"
SATURDAY = "Saturday"
|
class DaysOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta):
'''DaysOfWeek.'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 10 | 1 | 8 | 8 | 7 | 1 | 8 | 8 | 7 | 0 | 4 | 0 | 0 |
8,965 |
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/mesh/azext_mesh/aaz/latest/mesh/app/_delete.py
|
azext_mesh.aaz.latest.mesh.app._delete.Delete.ApplicationDelete
|
class ApplicationDelete(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 [202]:
return self.on_202(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.ServiceFabricMesh/applications/{applicationResourceName}",
**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(
"applicationResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-09-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_202(self, session):
pass
def on_204(self, session):
pass
|
class ApplicationDelete(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_202(self, session):
pass
def on_204(self, session):
pass
| 15 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 67 | 10 | 57 | 20 | 42 | 0 | 30 | 15 | 20 | 4 | 1 | 1 | 12 |
8,966 |
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/mdp/azext_mdp/tests/latest/test_mdp.py
|
azext_mdp.tests.latest.test_mdp.MdpScenario
|
class MdpScenario(ScenarioTest):
def __init__(self, *args, **kwargs):
super(MdpScenario, self).__init__(*args, **kwargs)
self.kwargs.update(
{
"subscriptionId": self.get_subscription_id(),
"location": "eastus",
}
)
@ResourceGroupPreparer(
name_prefix="clitest_mdp", key="rg", parameter_name="rg"
)
def test_mdp_scenario(self):
self.kwargs.update(
{
"poolName": self.create_random_name(prefix="cli", length=24),
"poolName2": self.create_random_name(prefix="cli", length=24),
"identityResourceId": "/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/ajaykn/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ajaykn-msi",
"devcenterProjectResourceId": "/subscriptions/21af6cf1-77ad-42cd-ad19-e193de033071/resourceGroups/ajaykn-wus/providers/Microsoft.DevCenter/projects/ajaykn-p1",
"azureDevOpsOrgUrl": "https://dev.azure.com/managed-org-demo",
"imageResourceId": "/Subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/Providers/Microsoft.Compute/Locations/eastus2/Publishers/canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts-gen2/versions/latest"
}
)
# List pools
self.cmd(
"az mdp pool list --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 0),
],
)
# Create new pool
self.cmd(
"az mdp pool create \
--name \"{poolName}\" \
--location \"{location}\" \
--resource-group \"{rg}\" \
--maximum-concurrency 3 \
--identity \"type=userAssigned\" \"user-assigned-identities={{'{identityResourceId}':{{}}}}\" \
--devcenter-project-resource-id \"{devcenterProjectResourceId}\" \
--agent-profile \"stateless={{}}\" \
--organization-profile \"azure-dev-ops={{organizations:[{{url:'{azureDevOpsOrgUrl}',parallelism:2}}],permissionProfile:{{kind:'CreatorOnly'}}}}\" \
--fabric-profile \"vmss={{sku:{{name:Standard_D2ads_v5}},storageProfile:{{osDiskStorageAccountType:Standard}},images:[{{resourceId:'{imageResourceId}',buffer:*}}],osProfile:{{secretsManagementSettings:{{observedCertificates:[],keyExportable:false}},logonType:Service}}}}\" \
",
checks=[
self.check("identity.type", "UserAssigned"),
self.check("name", "{poolName}"),
self.check("location", "{location}"),
self.check("resourceGroup", "{rg}"),
self.check("provisioningState", "Succeeded"),
self.check("maximumConcurrency", 3)
]
)
# List pools
self.cmd(
"az mdp pool list --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{poolName}")
],
)
# Show pool
self.cmd(
"az mdp pool show \
--name \"{poolName}\" \
--resource-group \"{rg}\" \
",
checks=[
self.check("identity.type", "UserAssigned"),
self.check("name", "{poolName}"),
self.check("location", "{location}"),
self.check("resourceGroup", "{rg}"),
self.check("provisioningState", "Succeeded"),
self.check("agentProfile.kind", "Stateless"),
self.check("maximumConcurrency", 3)
]
)
# Create or update pool
self.cmd(
"az mdp pool create \
--name \"{poolName}\" \
--location \"{location}\" \
--resource-group \"{rg}\" \
--tags CostCode=123 \
--maximum-concurrency 1 \
--identity \"type=userAssigned\" \"user-assigned-identities={{'{identityResourceId}':{{}}}}\" \
--devcenter-project-resource-id \"{devcenterProjectResourceId}\" \
--agent-profile \"stateless={{}}\" \
--organization-profile \"azure-dev-ops={{organizations:[{{url:'{azureDevOpsOrgUrl}',parallelism:2}}],permissionProfile:{{kind:'CreatorOnly'}}}}\" \
--fabric-profile \"vmss={{sku:{{name:Standard_D2ads_v5}},storageProfile:{{osDiskStorageAccountType:Standard}},images:[{{resourceId:'{imageResourceId}',buffer:*}}],osProfile:{{secretsManagementSettings:{{observedCertificates:[],keyExportable:false}},logonType:Service}}}}\" \
",
checks=[
self.check("identity.type", "UserAssigned"),
self.check("name", "{poolName}"),
self.check("location", "{location}"),
self.check("resourceGroup", "{rg}"),
self.check("provisioningState", "Succeeded"),
self.check("maximumConcurrency", 1),
self.check("tags.CostCode", "123")
]
)
# List pools
self.cmd(
"az mdp pool list --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{poolName}")
],
)
# Update the pool
self.cmd(
"az mdp pool update \
--name \"{poolName}\" \
--resource-group \"{rg}\" \
--tags CostCode=234 \
--agent-profile \"{{Stateless:{{}},resourcePredictionsProfile:{{Manual:{{}}}},resourcePredictions:{{timezone:'UTC',daysData:[{{}},{{}},{{}},{{'09:00:00':2,'11:00:00':0}},{{}},{{}},{{}}]}}}}\" \
",
checks=[
self.check("name", "{poolName}"),
self.check("resourceGroup", "{rg}"),
self.check("tags.CostCode", "234"),
self.check("agentProfile.resourcePredictions.timeZone", "UTC"),
self.check(
"length(agentProfile.resourcePredictions.daysData)", 7),
self.check(
"length(agentProfile.resourcePredictions.daysData[3])", 2),
],
)
# Create another pool
self.cmd(
"az mdp pool create \
--name \"{poolName2}\" \
--location \"{location}\" \
--resource-group \"{rg}\" \
--maximum-concurrency 1 \
--identity \"type=userAssigned\" \"user-assigned-identities={{'{identityResourceId}':{{}}}}\" \
--devcenter-project-resource-id \"{devcenterProjectResourceId}\" \
--agent-profile \"stateless={{}}\" \
--organization-profile \"azure-dev-ops={{organizations:[{{url:'{azureDevOpsOrgUrl}',parallelism:2}}],permissionProfile:{{kind:'CreatorOnly'}}}}\" \
--fabric-profile \"vmss={{sku:{{name:Standard_D2ads_v5}},storageProfile:{{osDiskStorageAccountType:Standard}},images:[{{resourceId:'{imageResourceId}',buffer:*}}],osProfile:{{secretsManagementSettings:{{observedCertificates:[],keyExportable:false}},logonType:Service}}}}\" \
",
checks=[
self.check("identity.type", "UserAssigned"),
self.check("name", "{poolName2}"),
self.check("location", "{location}"),
self.check("resourceGroup", "{rg}"),
self.check("provisioningState", "Succeeded"),
self.check("maximumConcurrency", 1)
]
)
# List pools
self.cmd(
"az mdp pool list --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 2),
],
)
# Delete first pool
self.cmd(
"az mdp pool delete --yes \
--name \"{poolName}\" \
--resource-group \"{rg}\" "
)
# List pools
self.cmd(
"az mdp pool list --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 1),
self.check("[0].name", "{poolName2}")
],
)
# List agents of second pool
self.cmd(
"az mdp pool agent list --pool-name \"{poolName2}\" --resource-group \"{rg}\" ",
checks=[
self.check("length(@)", 0),
],
)
@ResourceGroupPreparer(
name_prefix="clitest_mdp", key="rg", parameter_name="rg"
)
def test_mdp_create_error_scenario(self):
self.kwargs.update(
{
"poolName": self.create_random_name(prefix="cli", length=24),
"identityName": self.create_random_name(prefix="testid_", length=24),
}
)
with self.assertRaises(HttpResponseError) as raises:
self.cmd(
"az mdp pool create "
'--name "{poolName}" '
'--location "{location}" '
'--resource-group "{rg}"',
).get_output_in_json()
assert 'Bad Request' in str(raises.exception.reason)
assert raises.exception.status_code == 400
assert 'ResourceCreationValidateFailed' in str(raises.exception)
@AllowLargeResponse(size_kb=9999)
def test_mdp_sku_scenario(self):
# List skus
skus = self.cmd(
"az mdp sku list --location westus").get_output_in_json()
assert len(skus) > 0
@AllowLargeResponse(size_kb=9999)
def test_mdp_usage_scenario(self):
# List skus
usages = self.cmd(
"az mdp usage list --location westus").get_output_in_json()
assert len(usages) > 0
|
class MdpScenario(ScenarioTest):
def __init__(self, *args, **kwargs):
pass
@ResourceGroupPreparer(
name_prefix="clitest_mdp", key="rg", parameter_name="rg"
)
def test_mdp_scenario(self):
pass
@ResourceGroupPreparer(
name_prefix="clitest_mdp", key="rg", parameter_name="rg"
)
def test_mdp_create_error_scenario(self):
pass
@AllowLargeResponse(size_kb=9999)
def test_mdp_sku_scenario(self):
pass
@AllowLargeResponse(size_kb=9999)
def test_mdp_usage_scenario(self):
pass
| 10 | 0 | 42 | 3 | 36 | 3 | 1 | 0.07 | 1 | 2 | 0 | 0 | 5 | 0 | 5 | 5 | 224 | 19 | 191 | 17 | 177 | 14 | 31 | 8 | 25 | 1 | 1 | 1 | 5 |
8,967 |
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/mdp/azext_mdp/aaz/latest/mdp/usage/_list.py
|
azext_mdp.aaz.latest.mdp.usage._list.List.SubscriptionUsagesUsages
|
class SubscriptionUsagesUsages(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.DevOpsInfrastructure/locations/{location}/usages",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-04-04-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",
)
_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.current_value = AAZIntType(
serialized_name="currentValue",
flags={"required": True},
)
_element.id = AAZStrType(
flags={"required": True},
)
_element.limit = AAZIntType(
flags={"required": True},
)
_element.name = AAZObjectType()
_element.unit = AAZStrType(
flags={"required": True},
)
name = cls._schema_on_200.value.Element.name
name.localized_value = AAZStrType(
serialized_name="localizedValue",
)
name.value = AAZStrType()
return cls._schema_on_200
|
class SubscriptionUsagesUsages(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 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 110 | 17 | 93 | 29 | 76 | 0 | 46 | 22 | 36 | 2 | 1 | 1 | 11 |
8,968 |
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/mdp/azext_mdp/aaz/latest/mdp/sku/_list.py
|
azext_mdp.aaz.latest.mdp.sku._list.List.SkuListByLocation
|
class SkuListByLocation(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.DevOpsInfrastructure/locations/{locationName}/skus",
**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(
"locationName", self.ctx.args.location,
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-10-19",
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(
flags={"required": True},
)
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.capabilities = AAZListType(
flags={"required": True},
)
properties.family = AAZStrType(
flags={"required": True},
)
properties.location_info = AAZListType(
serialized_name="locationInfo",
flags={"required": True},
)
properties.locations = AAZListType(
flags={"required": True},
)
properties.resource_type = AAZStrType(
serialized_name="resourceType",
flags={"required": True},
)
properties.restrictions = AAZListType(
flags={"required": True},
)
properties.size = AAZStrType(
flags={"required": True},
)
properties.tier = AAZStrType(
flags={"required": True},
)
capabilities = cls._schema_on_200.value.Element.properties.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_resource_sku_capabilities_read(
capabilities.Element)
location_info = cls._schema_on_200.value.Element.properties.location_info
location_info.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.location_info.Element
_element.location = AAZStrType(
flags={"required": True},
)
_element.zone_details = AAZListType(
serialized_name="zoneDetails",
flags={"required": True},
)
_element.zones = AAZListType(
flags={"required": True},
)
zone_details = cls._schema_on_200.value.Element.properties.location_info.Element.zone_details
zone_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.location_info.Element.zone_details.Element
_element.capabilities = AAZListType(
flags={"required": True},
)
_element.name = AAZListType(
flags={"required": True},
)
capabilities = cls._schema_on_200.value.Element.properties.location_info.Element.zone_details.Element.capabilities
capabilities.Element = AAZObjectType()
_ListHelper._build_schema_resource_sku_capabilities_read(
capabilities.Element)
name = cls._schema_on_200.value.Element.properties.location_info.Element.zone_details.Element.name
name.Element = AAZStrType()
zones = cls._schema_on_200.value.Element.properties.location_info.Element.zones
zones.Element = AAZStrType()
locations = cls._schema_on_200.value.Element.properties.locations
locations.Element = AAZStrType()
restrictions = cls._schema_on_200.value.Element.properties.restrictions
restrictions.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.restrictions.Element
_element.reason_code = AAZStrType(
serialized_name="reasonCode",
)
_element.restriction_info = AAZObjectType(
serialized_name="restrictionInfo",
flags={"required": True},
)
_element.type = AAZStrType()
_element.values = AAZListType(
flags={"required": True},
)
restriction_info = cls._schema_on_200.value.Element.properties.restrictions.Element.restriction_info
restriction_info.locations = AAZListType()
restriction_info.zones = AAZListType()
locations = cls._schema_on_200.value.Element.properties.restrictions.Element.restriction_info.locations
locations.Element = AAZStrType()
zones = cls._schema_on_200.value.Element.properties.restrictions.Element.restriction_info.zones
zones.Element = AAZStrType()
values = cls._schema_on_200.value.Element.properties.restrictions.Element.values
values.Element = AAZStrType()
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 SkuListByLocation(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 | 23 | 3 | 20 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 226 | 33 | 193 | 39 | 176 | 0 | 98 | 32 | 88 | 2 | 1 | 1 | 11 |
8,969 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/agent/_list.py
|
azext_mdp.aaz.latest.mdp.pool.agent._list.List.ResourceDetailsListByPool
|
class ResourceDetailsListByPool(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.DevOpsInfrastructure/pools/{poolName}/resources",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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(
flags={"required": True},
)
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.image = AAZStrType(
flags={"required": True},
)
properties.image_version = AAZStrType(
serialized_name="imageVersion",
flags={"required": True},
)
properties.status = AAZStrType(
flags={"required": 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 ResourceDetailsListByPool(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 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 142 | 18 | 124 | 30 | 107 | 0 | 54 | 23 | 44 | 2 | 1 | 1 | 11 |
8,970 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_wait.py
|
azext_mdp.aaz.latest.mdp.pool._wait.Wait.PoolsGet
|
class PoolsGet(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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": 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.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType(
nullable=True,
)
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.agent_profile = AAZObjectType(
serialized_name="agentProfile",
flags={"required": True},
)
properties.dev_center_project_resource_id = AAZStrType(
serialized_name="devCenterProjectResourceId",
flags={"required": True},
)
properties.fabric_profile = AAZObjectType(
serialized_name="fabricProfile",
flags={"required": True},
)
properties.maximum_concurrency = AAZIntType(
serialized_name="maximumConcurrency",
flags={"required": True},
)
properties.organization_profile = AAZObjectType(
serialized_name="organizationProfile",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
agent_profile = cls._schema_on_200.properties.agent_profile
agent_profile.kind = AAZStrType(
flags={"required": True},
)
agent_profile.resource_predictions = AAZObjectType(
serialized_name="resourcePredictions",
)
agent_profile.resource_predictions_profile = AAZObjectType(
serialized_name="resourcePredictionsProfile",
)
resource_predictions_profile = cls._schema_on_200.properties.agent_profile.resource_predictions_profile
resource_predictions_profile.kind = AAZStrType(
flags={"required": True},
)
disc_automatic = cls._schema_on_200.properties.agent_profile.resource_predictions_profile.discriminate_by(
"kind", "Automatic")
disc_automatic.prediction_preference = AAZStrType(
serialized_name="predictionPreference",
)
disc_stateful = cls._schema_on_200.properties.agent_profile.discriminate_by(
"kind", "Stateful")
disc_stateful.grace_period_time_span = AAZStrType(
serialized_name="gracePeriodTimeSpan",
)
disc_stateful.max_agent_lifetime = AAZStrType(
serialized_name="maxAgentLifetime",
)
fabric_profile = cls._schema_on_200.properties.fabric_profile
fabric_profile.kind = AAZStrType(
flags={"required": True},
)
disc_vmss = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss")
disc_vmss.images = AAZListType(
flags={"required": True},
)
disc_vmss.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
disc_vmss.os_profile = AAZObjectType(
serialized_name="osProfile",
)
disc_vmss.sku = AAZObjectType(
flags={"required": True},
)
disc_vmss.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)
images = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images
images.Element = AAZObjectType()
_element = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element
_element.aliases = AAZListType()
_element.buffer = AAZStrType()
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.well_known_image_name = AAZStrType(
serialized_name="wellKnownImageName",
)
aliases = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element.aliases
aliases.Element = AAZStrType()
network_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").network_profile
network_profile.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
os_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile
os_profile.logon_type = AAZStrType(
serialized_name="logonType",
)
os_profile.secrets_management_settings = AAZObjectType(
serialized_name="secretsManagementSettings",
)
secrets_management_settings = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings
secrets_management_settings.certificate_store_location = AAZStrType(
serialized_name="certificateStoreLocation",
)
secrets_management_settings.key_exportable = AAZBoolType(
serialized_name="keyExportable",
flags={"required": True},
)
secrets_management_settings.observed_certificates = AAZListType(
serialized_name="observedCertificates",
flags={"required": True},
)
observed_certificates = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings.observed_certificates
observed_certificates.Element = AAZStrType()
sku = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").sku
sku.name = AAZStrType(
flags={"required": True},
)
storage_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
storage_profile.os_disk_storage_account_type = AAZStrType(
serialized_name="osDiskStorageAccountType",
)
data_disks = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks
data_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks.Element
_element.caching = AAZStrType()
_element.disk_size_gi_b = AAZIntType(
serialized_name="diskSizeGiB",
)
_element.drive_letter = AAZStrType(
serialized_name="driveLetter",
)
_element.storage_account_type = AAZStrType(
serialized_name="storageAccountType",
)
organization_profile = cls._schema_on_200.properties.organization_profile
organization_profile.kind = AAZStrType(
flags={"required": True},
)
disc_azure_dev_ops = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps")
disc_azure_dev_ops.organizations = AAZListType(
flags={"required": True},
)
disc_azure_dev_ops.permission_profile = AAZObjectType(
serialized_name="permissionProfile",
)
organizations = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element
_element.parallelism = AAZIntType()
_element.projects = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
projects = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element.projects
projects.Element = AAZStrType()
permission_profile = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile
permission_profile.groups = AAZListType()
permission_profile.kind = AAZStrType(
flags={"required": True},
)
permission_profile.users = AAZListType()
groups = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.groups
groups.Element = AAZStrType()
users = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.users
users.Element = AAZStrType()
disc_git_hub = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub")
disc_git_hub.organizations = AAZListType(
flags={"required": True},
)
organizations = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element
_element.repositories = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
repositories = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element.repositories
repositories.Element = AAZStrType()
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",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PoolsGet(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 | 4 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 364 | 49 | 315 | 56 | 298 | 0 | 148 | 49 | 138 | 2 | 1 | 1 | 11 |
8,971 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_update.py
|
azext_mdp.aaz.latest.mdp.pool._update.Update.PoolsGet
|
class PoolsGet(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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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_pool_read(cls._schema_on_200)
return cls._schema_on_200
|
class PoolsGet(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 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,972 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_update.py
|
azext_mdp.aaz.latest.mdp.pool._update.Update.PoolsCreateOrUpdate
|
class PoolsCreateOrUpdate(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 [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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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_pool_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class PoolsCreateOrUpdate(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 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,973 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_update.py
|
azext_mdp.aaz.latest.mdp.pool._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("identity", AAZObjectType, ".identity")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(
AAZObjectType, ".", typ_kwargs={"nullable": True})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("agentProfile", AAZObjectType, ".agent_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("devCenterProjectResourceId", AAZStrType,
".devcenter_project_resource_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("fabricProfile", AAZObjectType, ".fabric_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("maximumConcurrency", AAZIntType, ".maximum_concurrency", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("organizationProfile", AAZObjectType, ".organization_profile", typ_kwargs={
"flags": {"required": True}})
agent_profile = _builder.get(".properties.agentProfile")
if agent_profile is not None:
agent_profile.set_const("kind", "Stateful", AAZStrType, ".stateful", typ_kwargs={
"flags": {"required": True}})
agent_profile.set_const("kind", "Stateless", AAZStrType, ".stateless", typ_kwargs={
"flags": {"required": True}})
agent_profile.set_prop(
"resourcePredictions", AAZObjectType, ".resource_predictions")
agent_profile.set_prop(
"resourcePredictionsProfile", AAZObjectType, ".resource_predictions_profile")
agent_profile.discriminate_by("kind", "Stateful")
agent_profile.discriminate_by("kind", "Stateless")
resource_predictions_profile = _builder.get(
".properties.agentProfile.resourcePredictionsProfile")
if resource_predictions_profile is not None:
resource_predictions_profile.set_const(
"kind", "Automatic", AAZStrType, ".automatic", typ_kwargs={"flags": {"required": True}})
resource_predictions_profile.set_const(
"kind", "Manual", AAZStrType, ".manual", typ_kwargs={"flags": {"required": True}})
resource_predictions_profile.discriminate_by(
"kind", "Automatic")
resource_predictions_profile.discriminate_by("kind", "Manual")
disc_automatic = _builder.get(
".properties.agentProfile.resourcePredictionsProfile{kind:Automatic}")
if disc_automatic is not None:
disc_automatic.set_prop(
"predictionPreference", AAZStrType, ".automatic.prediction_preference")
disc_stateful = _builder.get(
".properties.agentProfile{kind:Stateful}")
if disc_stateful is not None:
disc_stateful.set_prop(
"gracePeriodTimeSpan", AAZStrType, ".stateful.grace_period_time_span")
disc_stateful.set_prop(
"maxAgentLifetime", AAZStrType, ".stateful.max_agent_lifetime")
resource_predictions = _builder.get(
".properties.agentProfile.resourcePredictions")
if resource_predictions is not None:
resource_predictions.set_prop(
"timeZone", AAZStrType, ".timezone")
resource_predictions.set_prop(
"daysData", AAZListType, ".days_data")
days_data = _builder.get(
".properties.agentProfile.resourcePredictions.daysData")
if days_data is not None:
days_data.set_elements(AAZDictType, ".")
_elements = _builder.get(
".properties.agentProfile.resourcePredictions.daysData[]")
if _elements is not None:
_elements.set_elements(AAZIntType, ".")
fabric_profile = _builder.get(".properties.fabricProfile")
if fabric_profile is not None:
fabric_profile.set_const("kind", "Vmss", AAZStrType, ".vmss", typ_kwargs={
"flags": {"required": True}})
fabric_profile.discriminate_by("kind", "Vmss")
disc_vmss = _builder.get(".properties.fabricProfile{kind:Vmss}")
if disc_vmss is not None:
disc_vmss.set_prop("images", AAZListType, ".vmss.images", typ_kwargs={
"flags": {"required": True}})
disc_vmss.set_prop(
"networkProfile", AAZObjectType, ".vmss.network_profile")
disc_vmss.set_prop(
"osProfile", AAZObjectType, ".vmss.os_profile")
disc_vmss.set_prop("sku", AAZObjectType, ".vmss.sku", typ_kwargs={
"flags": {"required": True}})
disc_vmss.set_prop(
"storageProfile", AAZObjectType, ".vmss.storage_profile")
images = _builder.get(
".properties.fabricProfile{kind:Vmss}.images")
if images is not None:
images.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.fabricProfile{kind:Vmss}.images[]")
if _elements is not None:
_elements.set_prop("aliases", AAZListType, ".aliases")
_elements.set_prop("buffer", AAZStrType, ".buffer")
_elements.set_prop("resourceId", AAZStrType, ".resource_id")
_elements.set_prop("wellKnownImageName",
AAZStrType, ".well_known_image_name")
aliases = _builder.get(
".properties.fabricProfile{kind:Vmss}.images[].aliases")
if aliases is not None:
aliases.set_elements(AAZStrType, ".")
network_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.networkProfile")
if network_profile is not None:
network_profile.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={
"flags": {"required": True}})
os_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile")
if os_profile is not None:
os_profile.set_prop("logonType", AAZStrType, ".logon_type")
os_profile.set_prop("secretsManagementSettings",
AAZObjectType, ".secrets_management_settings")
secrets_management_settings = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile.secretsManagementSettings")
if secrets_management_settings is not None:
secrets_management_settings.set_prop(
"certificateStoreLocation", AAZStrType, ".certificate_store_location")
secrets_management_settings.set_prop(
"keyExportable", AAZBoolType, ".key_exportable", typ_kwargs={"flags": {"required": True}})
secrets_management_settings.set_prop(
"observedCertificates", AAZListType, ".observed_certificates", typ_kwargs={"flags": {"required": True}})
observed_certificates = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile.secretsManagementSettings.observedCertificates")
if observed_certificates is not None:
observed_certificates.set_elements(AAZStrType, ".")
sku = _builder.get(".properties.fabricProfile{kind:Vmss}.sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
storage_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile")
if storage_profile is not None:
storage_profile.set_prop(
"dataDisks", AAZListType, ".data_disks")
storage_profile.set_prop(
"osDiskStorageAccountType", AAZStrType, ".os_disk_storage_account_type")
data_disks = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile.dataDisks")
if data_disks is not None:
data_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile.dataDisks[]")
if _elements is not None:
_elements.set_prop("caching", AAZStrType, ".caching")
_elements.set_prop(
"diskSizeGiB", AAZIntType, ".disk_size_gi_b")
_elements.set_prop("driveLetter", AAZStrType, ".drive_letter")
_elements.set_prop("storageAccountType",
AAZStrType, ".storage_account_type")
organization_profile = _builder.get(
".properties.organizationProfile")
if organization_profile is not None:
organization_profile.set_const("kind", "AzureDevOps", AAZStrType, ".azure_dev_ops", typ_kwargs={
"flags": {"required": True}})
organization_profile.set_const("kind", "GitHub", AAZStrType, ".git_hub", typ_kwargs={
"flags": {"required": True}})
organization_profile.discriminate_by("kind", "AzureDevOps")
organization_profile.discriminate_by("kind", "GitHub")
disc_azure_dev_ops = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}")
if disc_azure_dev_ops is not None:
disc_azure_dev_ops.set_prop("organizations", AAZListType, ".azure_dev_ops.organizations", typ_kwargs={
"flags": {"required": True}})
disc_azure_dev_ops.set_prop(
"permissionProfile", AAZObjectType, ".azure_dev_ops.permission_profile")
organizations = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations")
if organizations is not None:
organizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations[]")
if _elements is not None:
_elements.set_prop("parallelism", AAZIntType, ".parallelism")
_elements.set_prop("projects", AAZListType, ".projects")
_elements.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
projects = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations[].projects")
if projects is not None:
projects.set_elements(AAZStrType, ".")
permission_profile = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile")
if permission_profile is not None:
permission_profile.set_prop("groups", AAZListType, ".groups")
permission_profile.set_prop("kind", AAZStrType, ".kind", typ_kwargs={
"flags": {"required": True}})
permission_profile.set_prop("users", AAZListType, ".users")
groups = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile.groups")
if groups is not None:
groups.set_elements(AAZStrType, ".")
users = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile.users")
if users is not None:
users.set_elements(AAZStrType, ".")
disc_git_hub = _builder.get(
".properties.organizationProfile{kind:GitHub}")
if disc_git_hub is not None:
disc_git_hub.set_prop("organizations", AAZListType, ".git_hub.organizations", typ_kwargs={
"flags": {"required": True}})
organizations = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations")
if organizations is not None:
organizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations[]")
if _elements is not None:
_elements.set_prop(
"repositories", AAZListType, ".repositories")
_elements.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
repositories = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations[].repositories")
if repositories is not None:
repositories.set_elements(AAZStrType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 98 | 19 | 80 | 0 | 19 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 199 | 39 | 160 | 35 | 157 | 0 | 156 | 35 | 153 | 37 | 1 | 1 | 38 |
8,974 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_show.py
|
azext_mdp.aaz.latest.mdp.pool._show.Show.PoolsGet
|
class PoolsGet(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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": 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.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType(
nullable=True,
)
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.agent_profile = AAZObjectType(
serialized_name="agentProfile",
flags={"required": True},
)
properties.dev_center_project_resource_id = AAZStrType(
serialized_name="devCenterProjectResourceId",
flags={"required": True},
)
properties.fabric_profile = AAZObjectType(
serialized_name="fabricProfile",
flags={"required": True},
)
properties.maximum_concurrency = AAZIntType(
serialized_name="maximumConcurrency",
flags={"required": True},
)
properties.organization_profile = AAZObjectType(
serialized_name="organizationProfile",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
agent_profile = cls._schema_on_200.properties.agent_profile
agent_profile.kind = AAZStrType(
flags={"required": True},
)
agent_profile.resource_predictions = AAZObjectType(
serialized_name="resourcePredictions",
)
agent_profile.resource_predictions_profile = AAZObjectType(
serialized_name="resourcePredictionsProfile",
)
resource_predictions_profile = cls._schema_on_200.properties.agent_profile.resource_predictions_profile
resource_predictions_profile.kind = AAZStrType(
flags={"required": True},
)
disc_automatic = cls._schema_on_200.properties.agent_profile.resource_predictions_profile.discriminate_by(
"kind", "Automatic")
disc_automatic.prediction_preference = AAZStrType(
serialized_name="predictionPreference",
)
disc_stateful = cls._schema_on_200.properties.agent_profile.discriminate_by(
"kind", "Stateful")
disc_stateful.grace_period_time_span = AAZStrType(
serialized_name="gracePeriodTimeSpan",
)
disc_stateful.max_agent_lifetime = AAZStrType(
serialized_name="maxAgentLifetime",
)
resource_predictions = cls._schema_on_200.properties.agent_profile.resource_predictions
resource_predictions.timezone = AAZStrType(
serialized_name="timeZone",
)
resource_predictions.days_data = AAZListType(
serialized_name="daysData",
)
days_data = cls._schema_on_200.properties.agent_profile.resource_predictions.days_data
days_data.Element = AAZDictType()
_element = cls._schema_on_200.properties.agent_profile.resource_predictions.days_data.Element
_element.Element = AAZIntType()
fabric_profile = cls._schema_on_200.properties.fabric_profile
fabric_profile.kind = AAZStrType(
flags={"required": True},
)
disc_vmss = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss")
disc_vmss.images = AAZListType(
flags={"required": True},
)
disc_vmss.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
disc_vmss.os_profile = AAZObjectType(
serialized_name="osProfile",
)
disc_vmss.sku = AAZObjectType(
flags={"required": True},
)
disc_vmss.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)
images = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images
images.Element = AAZObjectType()
_element = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element
_element.aliases = AAZListType()
_element.buffer = AAZStrType()
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.well_known_image_name = AAZStrType(
serialized_name="wellKnownImageName",
)
aliases = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element.aliases
aliases.Element = AAZStrType()
network_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").network_profile
network_profile.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
os_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile
os_profile.logon_type = AAZStrType(
serialized_name="logonType",
)
os_profile.secrets_management_settings = AAZObjectType(
serialized_name="secretsManagementSettings",
)
secrets_management_settings = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings
secrets_management_settings.certificate_store_location = AAZStrType(
serialized_name="certificateStoreLocation",
)
secrets_management_settings.key_exportable = AAZBoolType(
serialized_name="keyExportable",
flags={"required": True},
)
secrets_management_settings.observed_certificates = AAZListType(
serialized_name="observedCertificates",
flags={"required": True},
)
observed_certificates = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings.observed_certificates
observed_certificates.Element = AAZStrType()
sku = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").sku
sku.name = AAZStrType(
flags={"required": True},
)
storage_profile = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
storage_profile.os_disk_storage_account_type = AAZStrType(
serialized_name="osDiskStorageAccountType",
)
data_disks = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks
data_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks.Element
_element.caching = AAZStrType()
_element.disk_size_gi_b = AAZIntType(
serialized_name="diskSizeGiB",
)
_element.drive_letter = AAZStrType(
serialized_name="driveLetter",
)
_element.storage_account_type = AAZStrType(
serialized_name="storageAccountType",
)
organization_profile = cls._schema_on_200.properties.organization_profile
organization_profile.kind = AAZStrType(
flags={"required": True},
)
disc_azure_dev_ops = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps")
disc_azure_dev_ops.organizations = AAZListType(
flags={"required": True},
)
disc_azure_dev_ops.permission_profile = AAZObjectType(
serialized_name="permissionProfile",
)
organizations = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element
_element.parallelism = AAZIntType()
_element.projects = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
projects = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element.projects
projects.Element = AAZStrType()
permission_profile = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile
permission_profile.groups = AAZListType()
permission_profile.kind = AAZStrType(
flags={"required": True},
)
permission_profile.users = AAZListType()
groups = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.groups
groups.Element = AAZStrType()
users = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.users
users.Element = AAZStrType()
disc_git_hub = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub")
disc_git_hub.organizations = AAZListType(
flags={"required": True},
)
organizations = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element
_element.repositories = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
repositories = cls._schema_on_200.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element.repositories
repositories.Element = AAZStrType()
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",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PoolsGet(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 | 40 | 5 | 35 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 379 | 53 | 326 | 58 | 309 | 0 | 155 | 51 | 145 | 2 | 1 | 1 | 11 |
8,975 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_list.py
|
azext_mdp.aaz.latest.mdp.pool._list.List.PoolsListBySubscription
|
class PoolsListBySubscription(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.DevOpsInfrastructure/pools",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-10-19",
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(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": 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.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType(
nullable=True,
)
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.agent_profile = AAZObjectType(
serialized_name="agentProfile",
flags={"required": True},
)
properties.dev_center_project_resource_id = AAZStrType(
serialized_name="devCenterProjectResourceId",
flags={"required": True},
)
properties.fabric_profile = AAZObjectType(
serialized_name="fabricProfile",
flags={"required": True},
)
properties.maximum_concurrency = AAZIntType(
serialized_name="maximumConcurrency",
flags={"required": True},
)
properties.organization_profile = AAZObjectType(
serialized_name="organizationProfile",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
agent_profile = cls._schema_on_200.value.Element.properties.agent_profile
agent_profile.kind = AAZStrType(
flags={"required": True},
)
agent_profile.resource_predictions = AAZObjectType(
serialized_name="resourcePredictions",
)
agent_profile.resource_predictions_profile = AAZObjectType(
serialized_name="resourcePredictionsProfile",
)
resource_predictions_profile = cls._schema_on_200.value.Element.properties.agent_profile.resource_predictions_profile
resource_predictions_profile.kind = AAZStrType(
flags={"required": True},
)
disc_automatic = cls._schema_on_200.value.Element.properties.agent_profile.resource_predictions_profile.discriminate_by(
"kind", "Automatic")
disc_automatic.prediction_preference = AAZStrType(
serialized_name="predictionPreference",
)
disc_stateful = cls._schema_on_200.value.Element.properties.agent_profile.discriminate_by(
"kind", "Stateful")
disc_stateful.grace_period_time_span = AAZStrType(
serialized_name="gracePeriodTimeSpan",
)
disc_stateful.max_agent_lifetime = AAZStrType(
serialized_name="maxAgentLifetime",
)
fabric_profile = cls._schema_on_200.value.Element.properties.fabric_profile
fabric_profile.kind = AAZStrType(
flags={"required": True},
)
disc_vmss = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss")
disc_vmss.images = AAZListType(
flags={"required": True},
)
disc_vmss.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
disc_vmss.os_profile = AAZObjectType(
serialized_name="osProfile",
)
disc_vmss.sku = AAZObjectType(
flags={"required": True},
)
disc_vmss.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)
images = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images
images.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element
_element.aliases = AAZListType()
_element.buffer = AAZStrType()
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.well_known_image_name = AAZStrType(
serialized_name="wellKnownImageName",
)
aliases = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element.aliases
aliases.Element = AAZStrType()
network_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").network_profile
network_profile.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
os_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile
os_profile.logon_type = AAZStrType(
serialized_name="logonType",
)
os_profile.secrets_management_settings = AAZObjectType(
serialized_name="secretsManagementSettings",
)
secrets_management_settings = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings
secrets_management_settings.certificate_store_location = AAZStrType(
serialized_name="certificateStoreLocation",
)
secrets_management_settings.key_exportable = AAZBoolType(
serialized_name="keyExportable",
flags={"required": True},
)
secrets_management_settings.observed_certificates = AAZListType(
serialized_name="observedCertificates",
flags={"required": True},
)
observed_certificates = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings.observed_certificates
observed_certificates.Element = AAZStrType()
sku = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").sku
sku.name = AAZStrType(
flags={"required": True},
)
storage_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
storage_profile.os_disk_storage_account_type = AAZStrType(
serialized_name="osDiskStorageAccountType",
)
data_disks = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks
data_disks.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks.Element
_element.caching = AAZStrType()
_element.disk_size_gi_b = AAZIntType(
serialized_name="diskSizeGiB",
)
_element.drive_letter = AAZStrType(
serialized_name="driveLetter",
)
_element.storage_account_type = AAZStrType(
serialized_name="storageAccountType",
)
organization_profile = cls._schema_on_200.value.Element.properties.organization_profile
organization_profile.kind = AAZStrType(
flags={"required": True},
)
disc_azure_dev_ops = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps")
disc_azure_dev_ops.organizations = AAZListType(
flags={"required": True},
)
disc_azure_dev_ops.permission_profile = AAZObjectType(
serialized_name="permissionProfile",
)
organizations = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element
_element.parallelism = AAZIntType()
_element.projects = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
projects = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element.projects
projects.Element = AAZStrType()
permission_profile = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile
permission_profile.groups = AAZListType()
permission_profile.kind = AAZStrType(
flags={"required": True},
)
permission_profile.users = AAZListType()
groups = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.groups
groups.Element = AAZStrType()
users = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.users
users.Element = AAZStrType()
disc_git_hub = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub")
disc_git_hub.organizations = AAZListType(
flags={"required": True},
)
organizations = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element
_element.repositories = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
repositories = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element.repositories
repositories.Element = AAZStrType()
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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PoolsListBySubscription(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 | 39 | 5 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 367 | 51 | 316 | 57 | 299 | 0 | 153 | 50 | 143 | 2 | 1 | 1 | 11 |
8,976 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_list.py
|
azext_mdp.aaz.latest.mdp.pool._list.List.PoolsListByResourceGroup
|
class PoolsListByResourceGroup(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.DevOpsInfrastructure/pools",
**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(
"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-10-19",
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(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": 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.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType(
nullable=True,
)
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.agent_profile = AAZObjectType(
serialized_name="agentProfile",
flags={"required": True},
)
properties.dev_center_project_resource_id = AAZStrType(
serialized_name="devCenterProjectResourceId",
flags={"required": True},
)
properties.fabric_profile = AAZObjectType(
serialized_name="fabricProfile",
flags={"required": True},
)
properties.maximum_concurrency = AAZIntType(
serialized_name="maximumConcurrency",
flags={"required": True},
)
properties.organization_profile = AAZObjectType(
serialized_name="organizationProfile",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
agent_profile = cls._schema_on_200.value.Element.properties.agent_profile
agent_profile.kind = AAZStrType(
flags={"required": True},
)
agent_profile.resource_predictions = AAZObjectType(
serialized_name="resourcePredictions",
)
agent_profile.resource_predictions_profile = AAZObjectType(
serialized_name="resourcePredictionsProfile",
)
resource_predictions_profile = cls._schema_on_200.value.Element.properties.agent_profile.resource_predictions_profile
resource_predictions_profile.kind = AAZStrType(
flags={"required": True},
)
disc_automatic = cls._schema_on_200.value.Element.properties.agent_profile.resource_predictions_profile.discriminate_by(
"kind", "Automatic")
disc_automatic.prediction_preference = AAZStrType(
serialized_name="predictionPreference",
)
disc_stateful = cls._schema_on_200.value.Element.properties.agent_profile.discriminate_by(
"kind", "Stateful")
disc_stateful.grace_period_time_span = AAZStrType(
serialized_name="gracePeriodTimeSpan",
)
disc_stateful.max_agent_lifetime = AAZStrType(
serialized_name="maxAgentLifetime",
)
fabric_profile = cls._schema_on_200.value.Element.properties.fabric_profile
fabric_profile.kind = AAZStrType(
flags={"required": True},
)
disc_vmss = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss")
disc_vmss.images = AAZListType(
flags={"required": True},
)
disc_vmss.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
disc_vmss.os_profile = AAZObjectType(
serialized_name="osProfile",
)
disc_vmss.sku = AAZObjectType(
flags={"required": True},
)
disc_vmss.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)
images = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images
images.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element
_element.aliases = AAZListType()
_element.buffer = AAZStrType()
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.well_known_image_name = AAZStrType(
serialized_name="wellKnownImageName",
)
aliases = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element.aliases
aliases.Element = AAZStrType()
network_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").network_profile
network_profile.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
os_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile
os_profile.logon_type = AAZStrType(
serialized_name="logonType",
)
os_profile.secrets_management_settings = AAZObjectType(
serialized_name="secretsManagementSettings",
)
secrets_management_settings = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings
secrets_management_settings.certificate_store_location = AAZStrType(
serialized_name="certificateStoreLocation",
)
secrets_management_settings.key_exportable = AAZBoolType(
serialized_name="keyExportable",
flags={"required": True},
)
secrets_management_settings.observed_certificates = AAZListType(
serialized_name="observedCertificates",
flags={"required": True},
)
observed_certificates = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings.observed_certificates
observed_certificates.Element = AAZStrType()
sku = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").sku
sku.name = AAZStrType(
flags={"required": True},
)
storage_profile = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
storage_profile.os_disk_storage_account_type = AAZStrType(
serialized_name="osDiskStorageAccountType",
)
data_disks = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks
data_disks.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks.Element
_element.caching = AAZStrType()
_element.disk_size_gi_b = AAZIntType(
serialized_name="diskSizeGiB",
)
_element.drive_letter = AAZStrType(
serialized_name="driveLetter",
)
_element.storage_account_type = AAZStrType(
serialized_name="storageAccountType",
)
organization_profile = cls._schema_on_200.value.Element.properties.organization_profile
organization_profile.kind = AAZStrType(
flags={"required": True},
)
disc_azure_dev_ops = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps")
disc_azure_dev_ops.organizations = AAZListType(
flags={"required": True},
)
disc_azure_dev_ops.permission_profile = AAZObjectType(
serialized_name="permissionProfile",
)
organizations = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element
_element.parallelism = AAZIntType()
_element.projects = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
projects = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element.projects
projects.Element = AAZStrType()
permission_profile = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile
permission_profile.groups = AAZListType()
permission_profile.kind = AAZStrType(
flags={"required": True},
)
permission_profile.users = AAZListType()
groups = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.groups
groups.Element = AAZStrType()
users = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.users
users.Element = AAZStrType()
disc_git_hub = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub")
disc_git_hub.organizations = AAZListType(
flags={"required": True},
)
organizations = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element
_element.repositories = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
repositories = cls._schema_on_200.value.Element.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element.repositories
repositories.Element = AAZStrType()
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",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class PoolsListByResourceGroup(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 | 39 | 5 | 34 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 371 | 51 | 320 | 57 | 303 | 0 | 153 | 50 | 143 | 2 | 1 | 1 | 11 |
8,977 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_delete.py
|
azext_mdp.aaz.latest.mdp.pool._delete.Delete.PoolsDelete
|
class PoolsDelete(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": "location"},
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": "location"},
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": "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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class PoolsDelete(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
8,978 |
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/mdp/azext_mdp/aaz/latest/mdp/pool/_create.py
|
azext_mdp.aaz.latest.mdp.pool._create.Create.PoolsCreateOrUpdate
|
class PoolsCreateOrUpdate(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 [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.DevOpsInfrastructure/pools/{poolName}",
**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(
"poolName", self.ctx.args.pool_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-10-19",
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("identity", AAZObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(
AAZObjectType, ".", typ_kwargs={"nullable": True})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("agentProfile", AAZObjectType, ".agent_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("devCenterProjectResourceId", AAZStrType,
".devcenter_project_resource_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("fabricProfile", AAZObjectType, ".fabric_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("maximumConcurrency", AAZIntType, ".maximum_concurrency", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("organizationProfile", AAZObjectType, ".organization_profile", typ_kwargs={
"flags": {"required": True}})
agent_profile = _builder.get(".properties.agentProfile")
if agent_profile is not None:
agent_profile.set_const("kind", "Stateful", AAZStrType, ".stateful", typ_kwargs={
"flags": {"required": True}})
agent_profile.set_const("kind", "Stateless", AAZStrType, ".stateless", typ_kwargs={
"flags": {"required": True}})
agent_profile.set_prop(
"resourcePredictions", AAZObjectType, ".resource_predictions")
agent_profile.set_prop(
"resourcePredictionsProfile", AAZObjectType, ".resource_predictions_profile")
agent_profile.discriminate_by("kind", "Stateful")
agent_profile.discriminate_by("kind", "Stateless")
resource_predictions_profile = _builder.get(
".properties.agentProfile.resourcePredictionsProfile")
if resource_predictions_profile is not None:
resource_predictions_profile.set_const(
"kind", "Automatic", AAZStrType, ".automatic", typ_kwargs={"flags": {"required": True}})
resource_predictions_profile.set_const(
"kind", "Manual", AAZStrType, ".manual", typ_kwargs={"flags": {"required": True}})
resource_predictions_profile.discriminate_by(
"kind", "Automatic")
resource_predictions_profile.discriminate_by("kind", "Manual")
resource_predictions = _builder.get(
".properties.agentProfile.resourcePredictions")
if resource_predictions is not None:
resource_predictions.set_prop(
"timeZone", AAZStrType, ".timezone")
resource_predictions.set_prop(
"daysData", AAZListType, ".days_data")
days_data = _builder.get(
".properties.agentProfile.resourcePredictions.daysData")
if days_data is not None:
days_data.set_elements(AAZDictType, ".")
_elements = _builder.get(
".properties.agentProfile.resourcePredictions.daysData[]")
if _elements is not None:
_elements.set_elements(AAZIntType, ".")
disc_automatic = _builder.get(
".properties.agentProfile.resourcePredictionsProfile{kind:Automatic}")
if disc_automatic is not None:
disc_automatic.set_prop(
"predictionPreference", AAZStrType, ".automatic.prediction_preference")
disc_stateful = _builder.get(
".properties.agentProfile{kind:Stateful}")
if disc_stateful is not None:
disc_stateful.set_prop(
"gracePeriodTimeSpan", AAZStrType, ".stateful.grace_period_time_span")
disc_stateful.set_prop(
"maxAgentLifetime", AAZStrType, ".stateful.max_agent_lifetime")
fabric_profile = _builder.get(".properties.fabricProfile")
if fabric_profile is not None:
fabric_profile.set_const("kind", "Vmss", AAZStrType, ".vmss", typ_kwargs={
"flags": {"required": True}})
fabric_profile.discriminate_by("kind", "Vmss")
disc_vmss = _builder.get(".properties.fabricProfile{kind:Vmss}")
if disc_vmss is not None:
disc_vmss.set_prop("images", AAZListType, ".vmss.images", typ_kwargs={
"flags": {"required": True}})
disc_vmss.set_prop(
"networkProfile", AAZObjectType, ".vmss.network_profile")
disc_vmss.set_prop(
"osProfile", AAZObjectType, ".vmss.os_profile")
disc_vmss.set_prop("sku", AAZObjectType, ".vmss.sku", typ_kwargs={
"flags": {"required": True}})
disc_vmss.set_prop(
"storageProfile", AAZObjectType, ".vmss.storage_profile")
images = _builder.get(
".properties.fabricProfile{kind:Vmss}.images")
if images is not None:
images.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.fabricProfile{kind:Vmss}.images[]")
if _elements is not None:
_elements.set_prop("aliases", AAZListType, ".aliases")
_elements.set_prop("buffer", AAZStrType, ".buffer")
_elements.set_prop("resourceId", AAZStrType, ".resource_id")
_elements.set_prop("wellKnownImageName",
AAZStrType, ".well_known_image_name")
aliases = _builder.get(
".properties.fabricProfile{kind:Vmss}.images[].aliases")
if aliases is not None:
aliases.set_elements(AAZStrType, ".")
network_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.networkProfile")
if network_profile is not None:
network_profile.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={
"flags": {"required": True}})
os_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile")
if os_profile is not None:
os_profile.set_prop("logonType", AAZStrType, ".logon_type")
os_profile.set_prop("secretsManagementSettings",
AAZObjectType, ".secrets_management_settings")
secrets_management_settings = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile.secretsManagementSettings")
if secrets_management_settings is not None:
secrets_management_settings.set_prop(
"certificateStoreLocation", AAZStrType, ".certificate_store_location")
secrets_management_settings.set_prop(
"keyExportable", AAZBoolType, ".key_exportable", typ_kwargs={"flags": {"required": True}})
secrets_management_settings.set_prop(
"observedCertificates", AAZListType, ".observed_certificates", typ_kwargs={"flags": {"required": True}})
observed_certificates = _builder.get(
".properties.fabricProfile{kind:Vmss}.osProfile.secretsManagementSettings.observedCertificates")
if observed_certificates is not None:
observed_certificates.set_elements(AAZStrType, ".")
sku = _builder.get(".properties.fabricProfile{kind:Vmss}.sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
storage_profile = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile")
if storage_profile is not None:
storage_profile.set_prop(
"dataDisks", AAZListType, ".data_disks")
storage_profile.set_prop(
"osDiskStorageAccountType", AAZStrType, ".os_disk_storage_account_type")
data_disks = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile.dataDisks")
if data_disks is not None:
data_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.fabricProfile{kind:Vmss}.storageProfile.dataDisks[]")
if _elements is not None:
_elements.set_prop("caching", AAZStrType, ".caching")
_elements.set_prop(
"diskSizeGiB", AAZIntType, ".disk_size_gi_b")
_elements.set_prop("driveLetter", AAZStrType, ".drive_letter")
_elements.set_prop("storageAccountType",
AAZStrType, ".storage_account_type")
organization_profile = _builder.get(
".properties.organizationProfile")
if organization_profile is not None:
organization_profile.set_const("kind", "AzureDevOps", AAZStrType, ".azure_dev_ops", typ_kwargs={
"flags": {"required": True}})
organization_profile.discriminate_by("kind", "AzureDevOps")
organization_profile.discriminate_by("kind", "GitHub")
disc_azure_dev_ops = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}")
if disc_azure_dev_ops is not None:
disc_azure_dev_ops.set_prop("organizations", AAZListType, ".azure_dev_ops.organizations", typ_kwargs={
"flags": {"required": True}})
disc_azure_dev_ops.set_prop(
"permissionProfile", AAZObjectType, ".azure_dev_ops.permission_profile")
organizations = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations")
if organizations is not None:
organizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations[]")
if _elements is not None:
_elements.set_prop("parallelism", AAZIntType, ".parallelism")
_elements.set_prop("projects", AAZListType, ".projects")
_elements.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
projects = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.organizations[].projects")
if projects is not None:
projects.set_elements(AAZStrType, ".")
permission_profile = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile")
if permission_profile is not None:
permission_profile.set_prop("groups", AAZListType, ".groups")
permission_profile.set_prop("kind", AAZStrType, ".kind", typ_kwargs={
"flags": {"required": True}})
permission_profile.set_prop("users", AAZListType, ".users")
groups = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile.groups")
if groups is not None:
groups.set_elements(AAZStrType, ".")
users = _builder.get(
".properties.organizationProfile{kind:AzureDevOps}.permissionProfile.users")
if users is not None:
users.set_elements(AAZStrType, ".")
disc_git_hub = _builder.get(
".properties.organizationProfile{kind:GitHub}")
if disc_git_hub is not None:
disc_git_hub.set_prop("organizations", AAZListType, ".git_hub.organizations", typ_kwargs={
"flags": {"required": True}})
organizations = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations")
if organizations is not None:
organizations.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations[]")
if _elements is not None:
_elements.set_prop(
"repositories", AAZListType, ".repositories")
_elements.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
repositories = _builder.get(
".properties.organizationProfile{kind:GitHub}.organizations[].repositories")
if repositories is not None:
repositories.set_elements(AAZStrType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
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.identity = AAZObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": 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.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200_201.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType(
nullable=True,
)
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.agent_profile = AAZObjectType(
serialized_name="agentProfile",
flags={"required": True},
)
properties.dev_center_project_resource_id = AAZStrType(
serialized_name="devCenterProjectResourceId",
flags={"required": True},
)
properties.fabric_profile = AAZObjectType(
serialized_name="fabricProfile",
flags={"required": True},
)
properties.maximum_concurrency = AAZIntType(
serialized_name="maximumConcurrency",
flags={"required": True},
)
properties.organization_profile = AAZObjectType(
serialized_name="organizationProfile",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
agent_profile = cls._schema_on_200_201.properties.agent_profile
agent_profile.kind = AAZStrType(
flags={"required": True},
)
agent_profile.resource_predictions = AAZObjectType(
serialized_name="resourcePredictions",
)
agent_profile.resource_predictions_profile = AAZObjectType(
serialized_name="resourcePredictionsProfile",
)
resource_predictions_profile = cls._schema_on_200_201.properties.agent_profile.resource_predictions_profile
resource_predictions_profile.kind = AAZStrType(
flags={"required": True},
)
disc_automatic = cls._schema_on_200_201.properties.agent_profile.resource_predictions_profile.discriminate_by(
"kind", "Automatic")
disc_automatic.prediction_preference = AAZStrType(
serialized_name="predictionPreference",
)
disc_stateful = cls._schema_on_200_201.properties.agent_profile.discriminate_by(
"kind", "Stateful")
disc_stateful.grace_period_time_span = AAZStrType(
serialized_name="gracePeriodTimeSpan",
)
disc_stateful.max_agent_lifetime = AAZStrType(
serialized_name="maxAgentLifetime",
)
resource_predictions = cls._schema_on_200_201.properties.agent_profile.resource_predictions
resource_predictions.timezone = AAZStrType(
serialized_name="timeZone",
)
resource_predictions.days_data = AAZListType(
serialized_name="daysData",
)
days_data = cls._schema_on_200_201.properties.agent_profile.resource_predictions.days_data
days_data.Element = AAZDictType()
_element = cls._schema_on_200_201.properties.agent_profile.resource_predictions.days_data.Element
_element.Element = AAZIntType()
fabric_profile = cls._schema_on_200_201.properties.fabric_profile
fabric_profile.kind = AAZStrType(
flags={"required": True},
)
disc_vmss = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss")
disc_vmss.images = AAZListType(
flags={"required": True},
)
disc_vmss.network_profile = AAZObjectType(
serialized_name="networkProfile",
)
disc_vmss.os_profile = AAZObjectType(
serialized_name="osProfile",
)
disc_vmss.sku = AAZObjectType(
flags={"required": True},
)
disc_vmss.storage_profile = AAZObjectType(
serialized_name="storageProfile",
)
images = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images
images.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element
_element.aliases = AAZListType()
_element.buffer = AAZStrType()
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.well_known_image_name = AAZStrType(
serialized_name="wellKnownImageName",
)
aliases = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").images.Element.aliases
aliases.Element = AAZStrType()
network_profile = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").network_profile
network_profile.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
os_profile = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile
os_profile.logon_type = AAZStrType(
serialized_name="logonType",
)
os_profile.secrets_management_settings = AAZObjectType(
serialized_name="secretsManagementSettings",
)
secrets_management_settings = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings
secrets_management_settings.certificate_store_location = AAZStrType(
serialized_name="certificateStoreLocation",
)
secrets_management_settings.key_exportable = AAZBoolType(
serialized_name="keyExportable",
flags={"required": True},
)
secrets_management_settings.observed_certificates = AAZListType(
serialized_name="observedCertificates",
flags={"required": True},
)
observed_certificates = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").os_profile.secrets_management_settings.observed_certificates
observed_certificates.Element = AAZStrType()
sku = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").sku
sku.name = AAZStrType(
flags={"required": True},
)
storage_profile = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile
storage_profile.data_disks = AAZListType(
serialized_name="dataDisks",
)
storage_profile.os_disk_storage_account_type = AAZStrType(
serialized_name="osDiskStorageAccountType",
)
data_disks = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks
data_disks.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.fabric_profile.discriminate_by(
"kind", "Vmss").storage_profile.data_disks.Element
_element.caching = AAZStrType()
_element.disk_size_gi_b = AAZIntType(
serialized_name="diskSizeGiB",
)
_element.drive_letter = AAZStrType(
serialized_name="driveLetter",
)
_element.storage_account_type = AAZStrType(
serialized_name="storageAccountType",
)
organization_profile = cls._schema_on_200_201.properties.organization_profile
organization_profile.kind = AAZStrType(
flags={"required": True},
)
disc_azure_dev_ops = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps")
disc_azure_dev_ops.organizations = AAZListType(
flags={"required": True},
)
disc_azure_dev_ops.permission_profile = AAZObjectType(
serialized_name="permissionProfile",
)
organizations = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element
_element.parallelism = AAZIntType()
_element.projects = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
projects = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").organizations.Element.projects
projects.Element = AAZStrType()
permission_profile = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile
permission_profile.groups = AAZListType()
permission_profile.kind = AAZStrType(
flags={"required": True},
)
permission_profile.users = AAZListType()
groups = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.groups
groups.Element = AAZStrType()
users = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "AzureDevOps").permission_profile.users
users.Element = AAZStrType()
disc_git_hub = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "GitHub")
disc_git_hub.organizations = AAZListType(
flags={"required": True},
)
organizations = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations
organizations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element
_element.repositories = AAZListType()
_element.url = AAZStrType(
flags={"required": True},
)
repositories = cls._schema_on_200_201.properties.organization_profile.discriminate_by(
"kind", "GitHub").organizations.Element.repositories
repositories.Element = AAZStrType()
system_data = cls._schema_on_200_201.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",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class PoolsCreateOrUpdate(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 | 57 | 8 | 49 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 594 | 91 | 503 | 93 | 484 | 0 | 310 | 84 | 299 | 37 | 1 | 1 | 49 |
8,979 |
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/mcc/azext_mcc/tests/latest/test_mcc.py
|
azext_mcc.tests.latest.test_mcc.MccScenario
|
class MccScenario(ScenarioTest):
@ResourceGroupPreparer(parameter_name='group_name', parameter_name_for_location='group_location')
def test_mcc(self, group_name, group_location):
self.kwargs.update({
'loc': group_location,
'name': self.create_random_name(prefix='cli', length=24),
'mcc_resource_name': self.create_random_name(prefix='mcc_cli_ci_tst_cst', length=30),
'cache_node_name': self.create_random_name(prefix='mcc_cli_ci_tst_node', length=30),
'host_os': 'Windows',
'cache_drive': '\"[{physical-path:/var/mcc,size-in-gb:50}]\"',
'proxy': 'enabled',
'proxy_host': '\"abc.xyz\"',
'proxy_port': '80',
'auto_update_day': '7',
'auto_update_time': '05:35',
'auto_update_week': '2',
'auto_update_ring': 'Slow'
})
# Create an MCC resource
self.cmd('az mcc ent resource create '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name} '
'-l {loc}',
checks=[
self.check('operationStatus', 'Succeeded'),
self.check('mccResourceName', '{mcc_resource_name}'),
self.check('location', '{loc}')
])
# List MCC resources
customer_list = self.cmd('az mcc ent resource list '
'-g {rg}').get_output_in_json()
assert len(customer_list) > 0
# Create MCC node
self.cmd('az mcc ent node create '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name} '
'--cache-node-name {cache_node_name} '
'--host-os {host_os}',
checks=[
self.check('cacheNodeName', '{cache_node_name}'),
self.check('operationStatus', 'Succeeded'),
self.check('hostOs', '{host_os}')
])
# List MCC nodes
node_list = self.cmd('az mcc ent node list '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name}').get_output_in_json()
assert len(node_list) > 0
# Update MCC node
self.cmd('az mcc ent node update '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name} '
'--cache-node-name {cache_node_name} '
'--cache-drive {cache_drive} '
'--proxy {proxy} '
'--proxy-host {proxy_host} '
'--proxy-port {proxy_port} '
'--auto-update-day {auto_update_day} '
'--auto-update-time {auto_update_time} '
'--auto-update-week {auto_update_week} '
'--auto-update-ring {auto_update_ring}',
checks=[
self.check('operationStatus', 'Succeeded'),
self.check('autoUpdateDay', '{auto_update_day}'),
self.check('autoUpdateRing', '{auto_update_ring}'),
self.check('autoUpdateTime', '{auto_update_time}'),
self.check('autoUpdateWeek', '{auto_update_week}'),
self.check(
'driveConfiguration[0].physicalPath', '/var/mcc'),
self.check('driveConfiguration[0].sizeInGb', '50'),
self.check('proxyConfiguration.proxyHostName', 'abc.xyz'),
self.check('proxyConfiguration.proxyPort',
'{proxy_port}'),
])
# Show MCC resource
self.cmd('az mcc ent node show -g {rg} '
'--mcc-resource-name {mcc_resource_name} '
' --cache-node-name {cache_node_name}')
# Delete MCC node
self.cmd('az mcc ent node delete '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name} '
'--cache-node-name {cache_node_name} '
'-y')
# Delete MCC resource
self.cmd('az mcc ent resource delete '
'-g {rg} '
'--mcc-resource-name {mcc_resource_name} '
'-y')
|
class MccScenario(ScenarioTest):
@ResourceGroupPreparer(parameter_name='group_name', parameter_name_for_location='group_location')
def test_mcc(self, group_name, group_location):
pass
| 3 | 0 | 93 | 8 | 77 | 8 | 1 | 0.1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 95 | 8 | 79 | 5 | 76 | 8 | 13 | 4 | 11 | 1 | 1 | 0 | 1 |
8,980 |
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/mcc/azext_mcc/aaz/latest/mcc/isp/resource/_update.py
|
azext_mcc.aaz.latest.mcc.isp.resource._update.Update.IspCustomersGet
|
class IspCustomersGet(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.ConnectedCache/ispCustomers/{customerResourceName}",
**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(
"customerResourceName", self.ctx.args.mcc_resource_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-05-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_isp_customer_resource_read(
cls._schema_on_200)
return cls._schema_on_200
|
class IspCustomersGet(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 | 82 | 13 | 69 | 25 | 52 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
8,981 |
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/mcc/azext_mcc/aaz/latest/mcc/isp/resource/_update.py
|
azext_mcc.aaz.latest.mcc.isp.resource._update.Update.IspCustomersCreateOrUpdate
|
class IspCustomersCreateOrUpdate(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 [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.ConnectedCache/ispCustomers/{customerResourceName}",
**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(
"customerResourceName", self.ctx.args.mcc_resource_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-05-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_isp_customer_resource_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class IspCustomersCreateOrUpdate(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 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 110 | 15 | 95 | 29 | 76 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
8,982 |
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/mesh/azext_mesh/aaz/latest/mesh/app/_list.py
|
azext_mesh.aaz.latest.mesh.app._list.List.ApplicationListByResourceGroup
|
class ApplicationListByResourceGroup(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.ServiceFabricMesh/applications",
**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(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.debug_params = AAZStrType(
serialized_name="debugParams",
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.service_names = AAZListType(
serialized_name="serviceNames",
flags={"read_only": True},
)
properties.services = AAZListType()
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
diagnostics = cls._schema_on_200.value.Element.properties.diagnostics
diagnostics.default_sink_refs = AAZListType(
serialized_name="defaultSinkRefs",
)
diagnostics.enabled = AAZBoolType()
diagnostics.sinks = AAZListType()
default_sink_refs = cls._schema_on_200.value.Element.properties.diagnostics.default_sink_refs
default_sink_refs.Element = AAZStrType()
sinks = cls._schema_on_200.value.Element.properties.diagnostics.sinks
sinks.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.diagnostics.sinks.Element
_element.description = AAZStrType()
_element.kind = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType()
disc_azure_internal_monitoring_pipeline = cls._schema_on_200.value.Element.properties.diagnostics.sinks.Element.discriminate_by(
"kind", "AzureInternalMonitoringPipeline")
disc_azure_internal_monitoring_pipeline.account_name = AAZStrType(
serialized_name="accountName",
)
disc_azure_internal_monitoring_pipeline.auto_key_config_url = AAZStrType(
serialized_name="autoKeyConfigUrl",
)
disc_azure_internal_monitoring_pipeline.fluentd_config_url = AAZStrType(
serialized_name="fluentdConfigUrl",
)
disc_azure_internal_monitoring_pipeline.ma_config_url = AAZStrType(
serialized_name="maConfigUrl",
)
disc_azure_internal_monitoring_pipeline.namespace = AAZStrType()
service_names = cls._schema_on_200.value.Element.properties.service_names
service_names.Element = AAZStrType()
services = cls._schema_on_200.value.Element.properties.services
services.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType()
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties.services.Element.properties
properties.auto_scaling_policies = AAZListType(
serialized_name="autoScalingPolicies",
)
properties.code_packages = AAZListType(
serialized_name="codePackages",
flags={"required": True},
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
properties.diagnostics)
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.network_refs = AAZListType(
serialized_name="networkRefs",
)
properties.os_type = AAZStrType(
serialized_name="osType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.replica_count = AAZIntType(
serialized_name="replicaCount",
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
auto_scaling_policies = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies
auto_scaling_policies.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element
_element.mechanism = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.trigger = AAZObjectType(
flags={"required": True},
)
mechanism = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.mechanism
mechanism.kind = AAZStrType(
flags={"required": True},
)
disc_add_remove_replica = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.mechanism.discriminate_by(
"kind", "AddRemoveReplica")
disc_add_remove_replica.max_count = AAZIntType(
serialized_name="maxCount",
flags={"required": True},
)
disc_add_remove_replica.min_count = AAZIntType(
serialized_name="minCount",
flags={"required": True},
)
disc_add_remove_replica.scale_increment = AAZIntType(
serialized_name="scaleIncrement",
flags={"required": True},
)
trigger = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger
trigger.kind = AAZStrType(
flags={"required": True},
)
disc_average_load = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad")
disc_average_load.lower_load_threshold = AAZFloatType(
serialized_name="lowerLoadThreshold",
flags={"required": True},
)
disc_average_load.metric = AAZObjectType(
flags={"required": True},
)
disc_average_load.scale_interval_in_seconds = AAZIntType(
serialized_name="scaleIntervalInSeconds",
flags={"required": True},
)
disc_average_load.upper_load_threshold = AAZFloatType(
serialized_name="upperLoadThreshold",
flags={"required": True},
)
metric = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric
metric.kind = AAZStrType(
flags={"required": True},
)
disc_resource = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric.discriminate_by("kind", "Resource")
disc_resource.name = AAZStrType(
flags={"required": True},
)
code_packages = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages
code_packages.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element
_element.commands = AAZListType()
_element.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.endpoints = AAZListType()
_element.entrypoint = AAZStrType()
_element.environment_variables = AAZListType(
serialized_name="environmentVariables",
)
_element.image = AAZStrType(
flags={"required": True},
)
_element.image_registry_credential = AAZObjectType(
serialized_name="imageRegistryCredential",
)
_element.instance_view = AAZObjectType(
serialized_name="instanceView",
)
_element.labels = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.reliable_collections_refs = AAZListType(
serialized_name="reliableCollectionsRefs",
)
_element.resources = AAZObjectType(
flags={"required": True},
)
_element.settings = AAZListType()
_element.volume_refs = AAZListType(
serialized_name="volumeRefs",
)
_element.volumes = AAZListType()
commands = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.commands
commands.Element = AAZStrType()
endpoints = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.endpoints.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType()
environment_variables = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.environment_variables
environment_variables.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.environment_variables.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
image_registry_credential = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.image_registry_credential
image_registry_credential.password = AAZStrType()
image_registry_credential.server = AAZStrType(
flags={"required": True},
)
image_registry_credential.username = AAZStrType(
flags={"required": True},
)
instance_view = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view
instance_view.current_state = AAZObjectType(
serialized_name="currentState",
)
_ListHelper._build_schema_container_state_read(
instance_view.current_state)
instance_view.events = AAZListType()
instance_view.previous_state = AAZObjectType(
serialized_name="previousState",
)
_ListHelper._build_schema_container_state_read(
instance_view.previous_state)
instance_view.restart_count = AAZIntType(
serialized_name="restartCount",
)
events = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view.events
events.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view.events.Element
_element.count = AAZIntType()
_element.first_timestamp = AAZStrType(
serialized_name="firstTimestamp",
)
_element.last_timestamp = AAZStrType(
serialized_name="lastTimestamp",
)
_element.message = AAZStrType()
_element.name = AAZStrType()
_element.type = AAZStrType()
labels = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.labels.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
reliable_collections_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.reliable_collections_refs
reliable_collections_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.reliable_collections_refs.Element
_element.do_not_persist_state = AAZBoolType(
serialized_name="doNotPersistState",
)
_element.name = AAZStrType(
flags={"required": True},
)
resources = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources
resources.limits = AAZObjectType()
resources.requests = AAZObjectType(
flags={"required": True},
)
limits = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources.limits
limits.cpu = AAZFloatType()
limits.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
)
requests = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources.requests
requests.cpu = AAZFloatType(
flags={"required": True},
)
requests.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
flags={"required": True},
)
settings = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.settings
settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.settings.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
volume_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volume_refs
volume_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volume_refs.Element
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
volumes = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes
volumes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element
_element.creation_parameters = AAZObjectType(
serialized_name="creationParameters",
flags={"required": True},
)
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
creation_parameters = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element.creation_parameters
creation_parameters.description = AAZStrType()
creation_parameters.kind = AAZStrType(
flags={"required": True},
)
disc_service_fabric_volume_disk = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element.creation_parameters.discriminate_by(
"kind", "ServiceFabricVolumeDisk")
disc_service_fabric_volume_disk.size_disk = AAZStrType(
serialized_name="sizeDisk",
flags={"required": True},
)
network_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs
network_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element
_element.endpoint_refs = AAZListType(
serialized_name="endpointRefs",
)
_element.name = AAZStrType()
endpoint_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element.endpoint_refs
endpoint_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element.endpoint_refs.Element
_element.name = AAZStrType()
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class ApplicationListByResourceGroup(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 | 53 | 6 | 47 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 496 | 65 | 431 | 62 | 414 | 0 | 223 | 55 | 213 | 2 | 1 | 1 | 11 |
8,983 |
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/mcc/azext_mcc/aaz/latest/mcc/isp/resource/_update.py
|
azext_mcc.aaz.latest.mcc.isp.resource._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)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("additionalCustomerProperties",
AAZObjectType, ".additional_customer_properties")
properties.set_prop("customer", AAZObjectType, ".customer")
additional_customer_properties = _builder.get(
".properties.additionalCustomerProperties")
if additional_customer_properties is not None:
additional_customer_properties.set_prop(
"customerAsn", AAZStrType, ".customer_asn")
additional_customer_properties.set_prop(
"customerEmail", AAZStrType, ".customer_email")
additional_customer_properties.set_prop(
"customerEntitlementExpiration", AAZStrType, ".customer_entitlement_expiration")
additional_customer_properties.set_prop(
"customerEntitlementSkuGuid", AAZStrType, ".customer_entitlement_sku_guid")
additional_customer_properties.set_prop(
"customerEntitlementSkuId", AAZStrType, ".customer_entitlement_sku_id")
additional_customer_properties.set_prop(
"customerEntitlementSkuName", AAZStrType, ".customer_entitlement_sku_name")
additional_customer_properties.set_prop(
"customerTransitAsn", AAZStrType, ".customer_transit_asn")
additional_customer_properties.set_prop(
"customerTransitState", AAZStrType, ".customer_transit_state")
additional_customer_properties.set_prop(
"optionalProperty1", AAZStrType, ".optional_property1")
additional_customer_properties.set_prop(
"optionalProperty2", AAZStrType, ".optional_property2")
additional_customer_properties.set_prop(
"optionalProperty3", AAZStrType, ".optional_property3")
additional_customer_properties.set_prop(
"optionalProperty4", AAZStrType, ".optional_property4")
additional_customer_properties.set_prop(
"optionalProperty5", AAZStrType, ".optional_property5")
customer = _builder.get(".properties.customer")
if customer is not None:
customer.set_prop("clientTenantId",
AAZStrType, ".client_tenant_id")
customer.set_prop("contactEmail", AAZStrType, ".contact_email")
customer.set_prop("contactName", AAZStrType, ".contact_name")
customer.set_prop("contactPhone", AAZStrType, ".contact_phone")
customer.set_prop("customerName", AAZStrType, ".customer_name")
customer.set_prop("fullyQualifiedResourceId",
AAZStrType, ".fully_qualified_resource_id")
customer.set_prop("isEnterpriseManaged",
AAZBoolType, ".is_enterprise_managed")
customer.set_prop("isEntitled", AAZBoolType, ".is_entitled")
customer.set_prop("releaseVersion",
AAZIntType, ".release_version")
customer.set_prop("resendSignupCode",
AAZBoolType, ".resend_signup_code")
customer.set_prop(
"shouldMigrate", AAZBoolType, ".should_migrate")
customer.set_prop("verifySignupCode",
AAZBoolType, ".verify_signup_code")
customer.set_prop("verifySignupPhrase", AAZStrType, ".verify_signup_phrase", typ_kwargs={
"flags": {"secret": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return _instance_value
|
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
| 3 | 0 | 27 | 3 | 24 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 56 | 7 | 49 | 8 | 46 | 0 | 45 | 8 | 42 | 5 | 1 | 1 | 6 |
8,984 |
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/mesh/azext_mesh/aaz/latest/mesh/app/_list.py
|
azext_mesh.aaz.latest.mesh.app._list.List.ApplicationListBySubscription
|
class ApplicationListBySubscription(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.ServiceFabricMesh/applications",
**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.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.debug_params = AAZStrType(
serialized_name="debugParams",
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.service_names = AAZListType(
serialized_name="serviceNames",
flags={"read_only": True},
)
properties.services = AAZListType()
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
diagnostics = cls._schema_on_200.value.Element.properties.diagnostics
diagnostics.default_sink_refs = AAZListType(
serialized_name="defaultSinkRefs",
)
diagnostics.enabled = AAZBoolType()
diagnostics.sinks = AAZListType()
default_sink_refs = cls._schema_on_200.value.Element.properties.diagnostics.default_sink_refs
default_sink_refs.Element = AAZStrType()
sinks = cls._schema_on_200.value.Element.properties.diagnostics.sinks
sinks.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.diagnostics.sinks.Element
_element.description = AAZStrType()
_element.kind = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType()
disc_azure_internal_monitoring_pipeline = cls._schema_on_200.value.Element.properties.diagnostics.sinks.Element.discriminate_by(
"kind", "AzureInternalMonitoringPipeline")
disc_azure_internal_monitoring_pipeline.account_name = AAZStrType(
serialized_name="accountName",
)
disc_azure_internal_monitoring_pipeline.auto_key_config_url = AAZStrType(
serialized_name="autoKeyConfigUrl",
)
disc_azure_internal_monitoring_pipeline.fluentd_config_url = AAZStrType(
serialized_name="fluentdConfigUrl",
)
disc_azure_internal_monitoring_pipeline.ma_config_url = AAZStrType(
serialized_name="maConfigUrl",
)
disc_azure_internal_monitoring_pipeline.namespace = AAZStrType()
service_names = cls._schema_on_200.value.Element.properties.service_names
service_names.Element = AAZStrType()
services = cls._schema_on_200.value.Element.properties.services
services.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType()
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties.services.Element.properties
properties.auto_scaling_policies = AAZListType(
serialized_name="autoScalingPolicies",
)
properties.code_packages = AAZListType(
serialized_name="codePackages",
flags={"required": True},
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
properties.diagnostics)
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.network_refs = AAZListType(
serialized_name="networkRefs",
)
properties.os_type = AAZStrType(
serialized_name="osType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.replica_count = AAZIntType(
serialized_name="replicaCount",
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
auto_scaling_policies = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies
auto_scaling_policies.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element
_element.mechanism = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.trigger = AAZObjectType(
flags={"required": True},
)
mechanism = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.mechanism
mechanism.kind = AAZStrType(
flags={"required": True},
)
disc_add_remove_replica = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.mechanism.discriminate_by(
"kind", "AddRemoveReplica")
disc_add_remove_replica.max_count = AAZIntType(
serialized_name="maxCount",
flags={"required": True},
)
disc_add_remove_replica.min_count = AAZIntType(
serialized_name="minCount",
flags={"required": True},
)
disc_add_remove_replica.scale_increment = AAZIntType(
serialized_name="scaleIncrement",
flags={"required": True},
)
trigger = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger
trigger.kind = AAZStrType(
flags={"required": True},
)
disc_average_load = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad")
disc_average_load.lower_load_threshold = AAZFloatType(
serialized_name="lowerLoadThreshold",
flags={"required": True},
)
disc_average_load.metric = AAZObjectType(
flags={"required": True},
)
disc_average_load.scale_interval_in_seconds = AAZIntType(
serialized_name="scaleIntervalInSeconds",
flags={"required": True},
)
disc_average_load.upper_load_threshold = AAZFloatType(
serialized_name="upperLoadThreshold",
flags={"required": True},
)
metric = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric
metric.kind = AAZStrType(
flags={"required": True},
)
disc_resource = cls._schema_on_200.value.Element.properties.services.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric.discriminate_by("kind", "Resource")
disc_resource.name = AAZStrType(
flags={"required": True},
)
code_packages = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages
code_packages.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element
_element.commands = AAZListType()
_element.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.endpoints = AAZListType()
_element.entrypoint = AAZStrType()
_element.environment_variables = AAZListType(
serialized_name="environmentVariables",
)
_element.image = AAZStrType(
flags={"required": True},
)
_element.image_registry_credential = AAZObjectType(
serialized_name="imageRegistryCredential",
)
_element.instance_view = AAZObjectType(
serialized_name="instanceView",
)
_element.labels = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.reliable_collections_refs = AAZListType(
serialized_name="reliableCollectionsRefs",
)
_element.resources = AAZObjectType(
flags={"required": True},
)
_element.settings = AAZListType()
_element.volume_refs = AAZListType(
serialized_name="volumeRefs",
)
_element.volumes = AAZListType()
commands = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.commands
commands.Element = AAZStrType()
endpoints = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.endpoints.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType()
environment_variables = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.environment_variables
environment_variables.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.environment_variables.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
image_registry_credential = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.image_registry_credential
image_registry_credential.password = AAZStrType()
image_registry_credential.server = AAZStrType(
flags={"required": True},
)
image_registry_credential.username = AAZStrType(
flags={"required": True},
)
instance_view = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view
instance_view.current_state = AAZObjectType(
serialized_name="currentState",
)
_ListHelper._build_schema_container_state_read(
instance_view.current_state)
instance_view.events = AAZListType()
instance_view.previous_state = AAZObjectType(
serialized_name="previousState",
)
_ListHelper._build_schema_container_state_read(
instance_view.previous_state)
instance_view.restart_count = AAZIntType(
serialized_name="restartCount",
)
events = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view.events
events.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.instance_view.events.Element
_element.count = AAZIntType()
_element.first_timestamp = AAZStrType(
serialized_name="firstTimestamp",
)
_element.last_timestamp = AAZStrType(
serialized_name="lastTimestamp",
)
_element.message = AAZStrType()
_element.name = AAZStrType()
_element.type = AAZStrType()
labels = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.labels.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
reliable_collections_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.reliable_collections_refs
reliable_collections_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.reliable_collections_refs.Element
_element.do_not_persist_state = AAZBoolType(
serialized_name="doNotPersistState",
)
_element.name = AAZStrType(
flags={"required": True},
)
resources = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources
resources.limits = AAZObjectType()
resources.requests = AAZObjectType(
flags={"required": True},
)
limits = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources.limits
limits.cpu = AAZFloatType()
limits.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
)
requests = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.resources.requests
requests.cpu = AAZFloatType(
flags={"required": True},
)
requests.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
flags={"required": True},
)
settings = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.settings
settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.settings.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
volume_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volume_refs
volume_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volume_refs.Element
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
volumes = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes
volumes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element
_element.creation_parameters = AAZObjectType(
serialized_name="creationParameters",
flags={"required": True},
)
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
creation_parameters = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element.creation_parameters
creation_parameters.description = AAZStrType()
creation_parameters.kind = AAZStrType(
flags={"required": True},
)
disc_service_fabric_volume_disk = cls._schema_on_200.value.Element.properties.services.Element.properties.code_packages.Element.volumes.Element.creation_parameters.discriminate_by(
"kind", "ServiceFabricVolumeDisk")
disc_service_fabric_volume_disk.size_disk = AAZStrType(
serialized_name="sizeDisk",
flags={"required": True},
)
network_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs
network_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element
_element.endpoint_refs = AAZListType(
serialized_name="endpointRefs",
)
_element.name = AAZStrType()
endpoint_refs = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element.endpoint_refs
endpoint_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.services.Element.properties.network_refs.Element.endpoint_refs.Element
_element.name = AAZStrType()
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class ApplicationListBySubscription(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 | 52 | 6 | 46 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 492 | 65 | 427 | 62 | 410 | 0 | 223 | 55 | 213 | 2 | 1 | 1 | 11 |
8,985 |
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/mesh/azext_mesh/aaz/latest/mesh/code_package_log/_get.py
|
azext_mesh.aaz.latest.mesh.code_package_log._get.Get.CodePackageGetContainerLogs
|
class CodePackageGetContainerLogs(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.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs",
**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(
"applicationResourceName", self.ctx.args.application_name,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"codePackageName", self.ctx.args.code_package_name,
required=True,
),
**self.serialize_url_param(
"replicaName", self.ctx.args.replica_name,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"serviceResourceName", self.ctx.args.service_name,
skip_quote=True,
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(
"tail", self.ctx.args.tail,
),
**self.serialize_query_param(
"api-version", "2018-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.content = AAZStrType()
return cls._schema_on_200
|
class CodePackageGetContainerLogs(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 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 102 | 14 | 88 | 26 | 71 | 0 | 34 | 19 | 24 | 2 | 1 | 1 | 11 |
8,986 |
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/mesh/azext_mesh/aaz/latest/mesh/service_replica/_list.py
|
azext_mesh.aaz.latest.mesh.service_replica._list.List.ServiceReplicaList
|
class ServiceReplicaList(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.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}/replicas",
**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(
"applicationResourceName", self.ctx.args.application_name,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"serviceResourceName", self.ctx.args.service_name,
skip_quote=True,
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", "2018-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",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.code_packages = AAZListType(
serialized_name="codePackages",
flags={"required": True},
)
_element.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.network_refs = AAZListType(
serialized_name="networkRefs",
)
_element.os_type = AAZStrType(
serialized_name="osType",
flags={"required": True},
)
_element.replica_name = AAZStrType(
serialized_name="replicaName",
flags={"required": True},
)
code_packages = cls._schema_on_200.value.Element.code_packages
code_packages.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element
_element.commands = AAZListType()
_element.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.endpoints = AAZListType()
_element.entrypoint = AAZStrType()
_element.environment_variables = AAZListType(
serialized_name="environmentVariables",
)
_element.image = AAZStrType(
flags={"required": True},
)
_element.image_registry_credential = AAZObjectType(
serialized_name="imageRegistryCredential",
)
_element.instance_view = AAZObjectType(
serialized_name="instanceView",
)
_element.labels = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.reliable_collections_refs = AAZListType(
serialized_name="reliableCollectionsRefs",
)
_element.resources = AAZObjectType(
flags={"required": True},
)
_element.settings = AAZListType()
_element.volume_refs = AAZListType(
serialized_name="volumeRefs",
)
_element.volumes = AAZListType()
commands = cls._schema_on_200.value.Element.code_packages.Element.commands
commands.Element = AAZStrType()
endpoints = cls._schema_on_200.value.Element.code_packages.Element.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.endpoints.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType()
environment_variables = cls._schema_on_200.value.Element.code_packages.Element.environment_variables
environment_variables.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.environment_variables.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
image_registry_credential = cls._schema_on_200.value.Element.code_packages.Element.image_registry_credential
image_registry_credential.password = AAZStrType()
image_registry_credential.server = AAZStrType(
flags={"required": True},
)
image_registry_credential.username = AAZStrType(
flags={"required": True},
)
instance_view = cls._schema_on_200.value.Element.code_packages.Element.instance_view
instance_view.current_state = AAZObjectType(
serialized_name="currentState",
)
_ListHelper._build_schema_container_state_read(
instance_view.current_state)
instance_view.events = AAZListType()
instance_view.previous_state = AAZObjectType(
serialized_name="previousState",
)
_ListHelper._build_schema_container_state_read(
instance_view.previous_state)
instance_view.restart_count = AAZIntType(
serialized_name="restartCount",
)
events = cls._schema_on_200.value.Element.code_packages.Element.instance_view.events
events.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.instance_view.events.Element
_element.count = AAZIntType()
_element.first_timestamp = AAZStrType(
serialized_name="firstTimestamp",
)
_element.last_timestamp = AAZStrType(
serialized_name="lastTimestamp",
)
_element.message = AAZStrType()
_element.name = AAZStrType()
_element.type = AAZStrType()
labels = cls._schema_on_200.value.Element.code_packages.Element.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.labels.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
reliable_collections_refs = cls._schema_on_200.value.Element.code_packages.Element.reliable_collections_refs
reliable_collections_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.reliable_collections_refs.Element
_element.do_not_persist_state = AAZBoolType(
serialized_name="doNotPersistState",
)
_element.name = AAZStrType(
flags={"required": True},
)
resources = cls._schema_on_200.value.Element.code_packages.Element.resources
resources.limits = AAZObjectType()
resources.requests = AAZObjectType(
flags={"required": True},
)
limits = cls._schema_on_200.value.Element.code_packages.Element.resources.limits
limits.cpu = AAZFloatType()
limits.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
)
requests = cls._schema_on_200.value.Element.code_packages.Element.resources.requests
requests.cpu = AAZFloatType(
flags={"required": True},
)
requests.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
flags={"required": True},
)
settings = cls._schema_on_200.value.Element.code_packages.Element.settings
settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.settings.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
volume_refs = cls._schema_on_200.value.Element.code_packages.Element.volume_refs
volume_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.volume_refs.Element
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
volumes = cls._schema_on_200.value.Element.code_packages.Element.volumes
volumes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.code_packages.Element.volumes.Element
_element.creation_parameters = AAZObjectType(
serialized_name="creationParameters",
flags={"required": True},
)
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
creation_parameters = cls._schema_on_200.value.Element.code_packages.Element.volumes.Element.creation_parameters
creation_parameters.description = AAZStrType()
creation_parameters.kind = AAZStrType(
flags={"required": True},
)
disc_service_fabric_volume_disk = cls._schema_on_200.value.Element.code_packages.Element.volumes.Element.creation_parameters.discriminate_by(
"kind", "ServiceFabricVolumeDisk")
disc_service_fabric_volume_disk.size_disk = AAZStrType(
serialized_name="sizeDisk",
flags={"required": True},
)
network_refs = cls._schema_on_200.value.Element.network_refs
network_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.network_refs.Element
_element.endpoint_refs = AAZListType(
serialized_name="endpointRefs",
)
_element.name = AAZStrType()
endpoint_refs = cls._schema_on_200.value.Element.network_refs.Element.endpoint_refs
endpoint_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.network_refs.Element.endpoint_refs.Element
_element.name = AAZStrType()
return cls._schema_on_200
|
class ServiceReplicaList(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 | 33 | 4 | 29 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 320 | 46 | 274 | 47 | 257 | 0 | 146 | 40 | 136 | 2 | 1 | 1 | 11 |
8,987 |
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/mesh/azext_mesh/aaz/latest/mesh/service/_show.py
|
azext_mesh.aaz.latest.mesh.service._show.Show.ServiceGet
|
class ServiceGet(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.ServiceFabricMesh/applications/{applicationResourceName}/services/{serviceResourceName}",
**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(
"applicationResourceName", self.ctx.args.application_name,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"serviceResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-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()
_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.auto_scaling_policies = AAZListType(
serialized_name="autoScalingPolicies",
)
properties.code_packages = AAZListType(
serialized_name="codePackages",
flags={"required": True},
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
_ShowHelper._build_schema_diagnostics_ref_read(
properties.diagnostics)
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.network_refs = AAZListType(
serialized_name="networkRefs",
)
properties.os_type = AAZStrType(
serialized_name="osType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.replica_count = AAZIntType(
serialized_name="replicaCount",
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
auto_scaling_policies = cls._schema_on_200.properties.auto_scaling_policies
auto_scaling_policies.Element = AAZObjectType()
_element = cls._schema_on_200.properties.auto_scaling_policies.Element
_element.mechanism = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.trigger = AAZObjectType(
flags={"required": True},
)
mechanism = cls._schema_on_200.properties.auto_scaling_policies.Element.mechanism
mechanism.kind = AAZStrType(
flags={"required": True},
)
disc_add_remove_replica = cls._schema_on_200.properties.auto_scaling_policies.Element.mechanism.discriminate_by(
"kind", "AddRemoveReplica")
disc_add_remove_replica.max_count = AAZIntType(
serialized_name="maxCount",
flags={"required": True},
)
disc_add_remove_replica.min_count = AAZIntType(
serialized_name="minCount",
flags={"required": True},
)
disc_add_remove_replica.scale_increment = AAZIntType(
serialized_name="scaleIncrement",
flags={"required": True},
)
trigger = cls._schema_on_200.properties.auto_scaling_policies.Element.trigger
trigger.kind = AAZStrType(
flags={"required": True},
)
disc_average_load = cls._schema_on_200.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad")
disc_average_load.lower_load_threshold = AAZFloatType(
serialized_name="lowerLoadThreshold",
flags={"required": True},
)
disc_average_load.metric = AAZObjectType(
flags={"required": True},
)
disc_average_load.scale_interval_in_seconds = AAZIntType(
serialized_name="scaleIntervalInSeconds",
flags={"required": True},
)
disc_average_load.upper_load_threshold = AAZFloatType(
serialized_name="upperLoadThreshold",
flags={"required": True},
)
metric = cls._schema_on_200.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric
metric.kind = AAZStrType(
flags={"required": True},
)
disc_resource = cls._schema_on_200.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric.discriminate_by("kind", "Resource")
disc_resource.name = AAZStrType(
flags={"required": True},
)
code_packages = cls._schema_on_200.properties.code_packages
code_packages.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element
_element.commands = AAZListType()
_element.diagnostics = AAZObjectType()
_ShowHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.endpoints = AAZListType()
_element.entrypoint = AAZStrType()
_element.environment_variables = AAZListType(
serialized_name="environmentVariables",
)
_element.image = AAZStrType(
flags={"required": True},
)
_element.image_registry_credential = AAZObjectType(
serialized_name="imageRegistryCredential",
)
_element.instance_view = AAZObjectType(
serialized_name="instanceView",
)
_element.labels = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.reliable_collections_refs = AAZListType(
serialized_name="reliableCollectionsRefs",
)
_element.resources = AAZObjectType(
flags={"required": True},
)
_element.settings = AAZListType()
_element.volume_refs = AAZListType(
serialized_name="volumeRefs",
)
_element.volumes = AAZListType()
commands = cls._schema_on_200.properties.code_packages.Element.commands
commands.Element = AAZStrType()
endpoints = cls._schema_on_200.properties.code_packages.Element.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.endpoints.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType()
environment_variables = cls._schema_on_200.properties.code_packages.Element.environment_variables
environment_variables.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.environment_variables.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
image_registry_credential = cls._schema_on_200.properties.code_packages.Element.image_registry_credential
image_registry_credential.password = AAZStrType()
image_registry_credential.server = AAZStrType(
flags={"required": True},
)
image_registry_credential.username = AAZStrType(
flags={"required": True},
)
instance_view = cls._schema_on_200.properties.code_packages.Element.instance_view
instance_view.current_state = AAZObjectType(
serialized_name="currentState",
)
_ShowHelper._build_schema_container_state_read(
instance_view.current_state)
instance_view.events = AAZListType()
instance_view.previous_state = AAZObjectType(
serialized_name="previousState",
)
_ShowHelper._build_schema_container_state_read(
instance_view.previous_state)
instance_view.restart_count = AAZIntType(
serialized_name="restartCount",
)
events = cls._schema_on_200.properties.code_packages.Element.instance_view.events
events.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.instance_view.events.Element
_element.count = AAZIntType()
_element.first_timestamp = AAZStrType(
serialized_name="firstTimestamp",
)
_element.last_timestamp = AAZStrType(
serialized_name="lastTimestamp",
)
_element.message = AAZStrType()
_element.name = AAZStrType()
_element.type = AAZStrType()
labels = cls._schema_on_200.properties.code_packages.Element.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.labels.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
reliable_collections_refs = cls._schema_on_200.properties.code_packages.Element.reliable_collections_refs
reliable_collections_refs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.reliable_collections_refs.Element
_element.do_not_persist_state = AAZBoolType(
serialized_name="doNotPersistState",
)
_element.name = AAZStrType(
flags={"required": True},
)
resources = cls._schema_on_200.properties.code_packages.Element.resources
resources.limits = AAZObjectType()
resources.requests = AAZObjectType(
flags={"required": True},
)
limits = cls._schema_on_200.properties.code_packages.Element.resources.limits
limits.cpu = AAZFloatType()
limits.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
)
requests = cls._schema_on_200.properties.code_packages.Element.resources.requests
requests.cpu = AAZFloatType(
flags={"required": True},
)
requests.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
flags={"required": True},
)
settings = cls._schema_on_200.properties.code_packages.Element.settings
settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.settings.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
volume_refs = cls._schema_on_200.properties.code_packages.Element.volume_refs
volume_refs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.volume_refs.Element
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
volumes = cls._schema_on_200.properties.code_packages.Element.volumes
volumes.Element = AAZObjectType()
_element = cls._schema_on_200.properties.code_packages.Element.volumes.Element
_element.creation_parameters = AAZObjectType(
serialized_name="creationParameters",
flags={"required": True},
)
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
creation_parameters = cls._schema_on_200.properties.code_packages.Element.volumes.Element.creation_parameters
creation_parameters.description = AAZStrType()
creation_parameters.kind = AAZStrType(
flags={"required": True},
)
disc_service_fabric_volume_disk = cls._schema_on_200.properties.code_packages.Element.volumes.Element.creation_parameters.discriminate_by(
"kind", "ServiceFabricVolumeDisk")
disc_service_fabric_volume_disk.size_disk = AAZStrType(
serialized_name="sizeDisk",
flags={"required": True},
)
network_refs = cls._schema_on_200.properties.network_refs
network_refs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_refs.Element
_element.endpoint_refs = AAZListType(
serialized_name="endpointRefs",
)
_element.name = AAZStrType()
endpoint_refs = cls._schema_on_200.properties.network_refs.Element.endpoint_refs
endpoint_refs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_refs.Element.endpoint_refs.Element
_element.name = AAZStrType()
return cls._schema_on_200
|
class ServiceGet(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 | 43 | 5 | 38 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 407 | 53 | 354 | 54 | 337 | 0 | 176 | 47 | 166 | 2 | 1 | 1 | 11 |
8,988 |
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/mesh/azext_mesh/aaz/latest/mesh/service/_list.py
|
azext_mesh.aaz.latest.mesh.service._list.List.ServiceList
|
class ServiceList(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.ServiceFabricMesh/applications/{applicationResourceName}/services",
**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(
"applicationResourceName", self.ctx.args.application_name,
skip_quote=True,
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", "2018-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",
)
_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()
_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.auto_scaling_policies = AAZListType(
serialized_name="autoScalingPolicies",
)
properties.code_packages = AAZListType(
serialized_name="codePackages",
flags={"required": True},
)
properties.description = AAZStrType()
properties.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
properties.diagnostics)
properties.health_state = AAZStrType(
serialized_name="healthState",
)
properties.network_refs = AAZListType(
serialized_name="networkRefs",
)
properties.os_type = AAZStrType(
serialized_name="osType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.replica_count = AAZIntType(
serialized_name="replicaCount",
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.unhealthy_evaluation = AAZStrType(
serialized_name="unhealthyEvaluation",
flags={"read_only": True},
)
auto_scaling_policies = cls._schema_on_200.value.Element.properties.auto_scaling_policies
auto_scaling_policies.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element
_element.mechanism = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.trigger = AAZObjectType(
flags={"required": True},
)
mechanism = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.mechanism
mechanism.kind = AAZStrType(
flags={"required": True},
)
disc_add_remove_replica = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.mechanism.discriminate_by(
"kind", "AddRemoveReplica")
disc_add_remove_replica.max_count = AAZIntType(
serialized_name="maxCount",
flags={"required": True},
)
disc_add_remove_replica.min_count = AAZIntType(
serialized_name="minCount",
flags={"required": True},
)
disc_add_remove_replica.scale_increment = AAZIntType(
serialized_name="scaleIncrement",
flags={"required": True},
)
trigger = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.trigger
trigger.kind = AAZStrType(
flags={"required": True},
)
disc_average_load = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad")
disc_average_load.lower_load_threshold = AAZFloatType(
serialized_name="lowerLoadThreshold",
flags={"required": True},
)
disc_average_load.metric = AAZObjectType(
flags={"required": True},
)
disc_average_load.scale_interval_in_seconds = AAZIntType(
serialized_name="scaleIntervalInSeconds",
flags={"required": True},
)
disc_average_load.upper_load_threshold = AAZFloatType(
serialized_name="upperLoadThreshold",
flags={"required": True},
)
metric = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric
metric.kind = AAZStrType(
flags={"required": True},
)
disc_resource = cls._schema_on_200.value.Element.properties.auto_scaling_policies.Element.trigger.discriminate_by(
"kind", "AverageLoad").metric.discriminate_by("kind", "Resource")
disc_resource.name = AAZStrType(
flags={"required": True},
)
code_packages = cls._schema_on_200.value.Element.properties.code_packages
code_packages.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element
_element.commands = AAZListType()
_element.diagnostics = AAZObjectType()
_ListHelper._build_schema_diagnostics_ref_read(
_element.diagnostics)
_element.endpoints = AAZListType()
_element.entrypoint = AAZStrType()
_element.environment_variables = AAZListType(
serialized_name="environmentVariables",
)
_element.image = AAZStrType(
flags={"required": True},
)
_element.image_registry_credential = AAZObjectType(
serialized_name="imageRegistryCredential",
)
_element.instance_view = AAZObjectType(
serialized_name="instanceView",
)
_element.labels = AAZListType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.reliable_collections_refs = AAZListType(
serialized_name="reliableCollectionsRefs",
)
_element.resources = AAZObjectType(
flags={"required": True},
)
_element.settings = AAZListType()
_element.volume_refs = AAZListType(
serialized_name="volumeRefs",
)
_element.volumes = AAZListType()
commands = cls._schema_on_200.value.Element.properties.code_packages.Element.commands
commands.Element = AAZStrType()
endpoints = cls._schema_on_200.value.Element.properties.code_packages.Element.endpoints
endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.endpoints.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType()
environment_variables = cls._schema_on_200.value.Element.properties.code_packages.Element.environment_variables
environment_variables.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.environment_variables.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
image_registry_credential = cls._schema_on_200.value.Element.properties.code_packages.Element.image_registry_credential
image_registry_credential.password = AAZStrType()
image_registry_credential.server = AAZStrType(
flags={"required": True},
)
image_registry_credential.username = AAZStrType(
flags={"required": True},
)
instance_view = cls._schema_on_200.value.Element.properties.code_packages.Element.instance_view
instance_view.current_state = AAZObjectType(
serialized_name="currentState",
)
_ListHelper._build_schema_container_state_read(
instance_view.current_state)
instance_view.events = AAZListType()
instance_view.previous_state = AAZObjectType(
serialized_name="previousState",
)
_ListHelper._build_schema_container_state_read(
instance_view.previous_state)
instance_view.restart_count = AAZIntType(
serialized_name="restartCount",
)
events = cls._schema_on_200.value.Element.properties.code_packages.Element.instance_view.events
events.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.instance_view.events.Element
_element.count = AAZIntType()
_element.first_timestamp = AAZStrType(
serialized_name="firstTimestamp",
)
_element.last_timestamp = AAZStrType(
serialized_name="lastTimestamp",
)
_element.message = AAZStrType()
_element.name = AAZStrType()
_element.type = AAZStrType()
labels = cls._schema_on_200.value.Element.properties.code_packages.Element.labels
labels.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.labels.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
reliable_collections_refs = cls._schema_on_200.value.Element.properties.code_packages.Element.reliable_collections_refs
reliable_collections_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.reliable_collections_refs.Element
_element.do_not_persist_state = AAZBoolType(
serialized_name="doNotPersistState",
)
_element.name = AAZStrType(
flags={"required": True},
)
resources = cls._schema_on_200.value.Element.properties.code_packages.Element.resources
resources.limits = AAZObjectType()
resources.requests = AAZObjectType(
flags={"required": True},
)
limits = cls._schema_on_200.value.Element.properties.code_packages.Element.resources.limits
limits.cpu = AAZFloatType()
limits.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
)
requests = cls._schema_on_200.value.Element.properties.code_packages.Element.resources.requests
requests.cpu = AAZFloatType(
flags={"required": True},
)
requests.memory_in_gb = AAZFloatType(
serialized_name="memoryInGB",
flags={"required": True},
)
settings = cls._schema_on_200.value.Element.properties.code_packages.Element.settings
settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.settings.Element
_element.name = AAZStrType()
_element.value = AAZStrType()
volume_refs = cls._schema_on_200.value.Element.properties.code_packages.Element.volume_refs
volume_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.volume_refs.Element
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
volumes = cls._schema_on_200.value.Element.properties.code_packages.Element.volumes
volumes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.code_packages.Element.volumes.Element
_element.creation_parameters = AAZObjectType(
serialized_name="creationParameters",
flags={"required": True},
)
_element.destination_path = AAZStrType(
serialized_name="destinationPath",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.read_only = AAZBoolType(
serialized_name="readOnly",
)
creation_parameters = cls._schema_on_200.value.Element.properties.code_packages.Element.volumes.Element.creation_parameters
creation_parameters.description = AAZStrType()
creation_parameters.kind = AAZStrType(
flags={"required": True},
)
disc_service_fabric_volume_disk = cls._schema_on_200.value.Element.properties.code_packages.Element.volumes.Element.creation_parameters.discriminate_by(
"kind", "ServiceFabricVolumeDisk")
disc_service_fabric_volume_disk.size_disk = AAZStrType(
serialized_name="sizeDisk",
flags={"required": True},
)
network_refs = cls._schema_on_200.value.Element.properties.network_refs
network_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_refs.Element
_element.endpoint_refs = AAZListType(
serialized_name="endpointRefs",
)
_element.name = AAZStrType()
endpoint_refs = cls._schema_on_200.value.Element.properties.network_refs.Element.endpoint_refs
endpoint_refs.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_refs.Element.endpoint_refs.Element
_element.name = AAZStrType()
return cls._schema_on_200
|
class ServiceList(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 | 43 | 5 | 38 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 411 | 55 | 356 | 55 | 339 | 0 | 181 | 48 | 171 | 2 | 1 | 1 | 11 |
8,989 |
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/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_list.py
|
azext_mesh.aaz.latest.mesh.secretvalue._list.List.SecretValueList
|
class SecretValueList(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.ServiceFabricMesh/secrets/{secretResourceName}/values",
**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(
"secretResourceName", self.ctx.args.secret_name,
skip_quote=True,
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", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.value = AAZStrType()
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SecretValueList(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 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 119 | 18 | 101 | 30 | 84 | 0 | 49 | 23 | 39 | 2 | 1 | 1 | 11 |
8,990 |
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/mesh/azext_mesh/aaz/latest/mesh/secretvalue/_delete.py
|
azext_mesh.aaz.latest.mesh.secretvalue._delete.Delete.SecretValueDelete
|
class SecretValueDelete(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 [202]:
return self.on_202(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.ServiceFabricMesh/secrets/{secretResourceName}/values/{secretValueResourceName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"secretResourceName", self.ctx.args.secret_resource_name,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"secretValueResourceName", self.ctx.args.version,
skip_quote=True,
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", "2018-09-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_202(self, session):
pass
def on_204(self, session):
pass
|
class SecretValueDelete(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_202(self, session):
pass
def on_204(self, session):
pass
| 15 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 72 | 10 | 62 | 20 | 47 | 0 | 30 | 15 | 20 | 4 | 1 | 1 | 12 |
8,991 |
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/mesh/azext_mesh/aaz/latest/mesh/secret/_show.py
|
azext_mesh.aaz.latest.mesh.secret._show.Show.SecretGet
|
class SecretGet(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.ServiceFabricMesh/secrets/{secretResourceName}",
**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(
"secretResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-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.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.content_type = AAZStrType(
serialized_name="contentType",
)
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SecretGet(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 | 121 | 16 | 105 | 28 | 88 | 0 | 48 | 21 | 38 | 2 | 1 | 1 | 11 |
8,992 |
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/mesh/azext_mesh/aaz/latest/mesh/secret/_list.py
|
azext_mesh.aaz.latest.mesh.secret._list.List.SecretListBySubscription
|
class SecretListBySubscription(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.ServiceFabricMesh/secrets",
**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.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.content_type = AAZStrType(
serialized_name="contentType",
)
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SecretListBySubscription(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 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 121 | 18 | 103 | 30 | 86 | 0 | 53 | 23 | 43 | 2 | 1 | 1 | 11 |
8,993 |
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/mesh/azext_mesh/aaz/latest/mesh/secret/_list.py
|
azext_mesh.aaz.latest.mesh.secret._list.List.SecretListByResourceGroup
|
class SecretListByResourceGroup(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.ServiceFabricMesh/secrets",
**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(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.content_type = AAZStrType(
serialized_name="contentType",
)
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SecretListByResourceGroup(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 | 125 | 18 | 107 | 30 | 90 | 0 | 53 | 23 | 43 | 2 | 1 | 1 | 11 |
8,994 |
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/mesh/azext_mesh/aaz/latest/mesh/secret/_delete.py
|
azext_mesh.aaz.latest.mesh.secret._delete.Delete.SecretDelete
|
class SecretDelete(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 [202]:
return self.on_202(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.ServiceFabricMesh/secrets/{secretResourceName}",
**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(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"secretResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-09-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_202(self, session):
pass
def on_204(self, session):
pass
|
class SecretDelete(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_202(self, session):
pass
def on_204(self, session):
pass
| 15 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 67 | 10 | 57 | 20 | 42 | 0 | 30 | 15 | 20 | 4 | 1 | 1 | 12 |
8,995 |
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/mesh/azext_mesh/aaz/latest/mesh/network/_show.py
|
azext_mesh.aaz.latest.mesh.network._show.Show.NetworkGet
|
class NetworkGet(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.ServiceFabricMesh/networks/{networkResourceName}",
**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(
"networkResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-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.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NetworkGet(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 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 118 | 16 | 102 | 28 | 85 | 0 | 47 | 21 | 37 | 2 | 1 | 1 | 11 |
8,996 |
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/mesh/azext_mesh/aaz/latest/mesh/network/_list.py
|
azext_mesh.aaz.latest.mesh.network._list.List.NetworkListBySubscription
|
class NetworkListBySubscription(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.ServiceFabricMesh/networks",
**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.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NetworkListBySubscription(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 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 118 | 18 | 100 | 30 | 83 | 0 | 52 | 23 | 42 | 2 | 1 | 1 | 11 |
8,997 |
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/mesh/azext_mesh/aaz/latest/mesh/network/_list.py
|
azext_mesh.aaz.latest.mesh.network._list.List.NetworkListByResourceGroup
|
class NetworkListByResourceGroup(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.ServiceFabricMesh/networks",
**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(
"api-version", "2018-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",
)
_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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.description = AAZStrType()
properties.kind = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NetworkListByResourceGroup(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 | 10 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 122 | 18 | 104 | 30 | 87 | 0 | 52 | 23 | 42 | 2 | 1 | 1 | 11 |
8,998 |
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/mesh/azext_mesh/aaz/latest/mesh/network/_delete.py
|
azext_mesh.aaz.latest.mesh.network._delete.Delete.NetworkDelete
|
class NetworkDelete(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 [202]:
return self.on_202(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.ServiceFabricMesh/networks/{networkResourceName}",
**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(
"networkResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-09-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_202(self, session):
pass
def on_204(self, session):
pass
|
class NetworkDelete(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_202(self, session):
pass
def on_204(self, session):
pass
| 15 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 67 | 10 | 57 | 20 | 42 | 0 | 30 | 15 | 20 | 4 | 1 | 1 | 12 |
8,999 |
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/mesh/azext_mesh/aaz/latest/mesh/gateway/_show.py
|
azext_mesh.aaz.latest.mesh.gateway._show.Show.GatewayGet
|
class GatewayGet(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.ServiceFabricMesh/gateways/{gatewayResourceName}",
**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(
"gatewayResourceName", self.ctx.args.name,
skip_quote=True,
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", "2018-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.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.description = AAZStrType()
properties.destination_network = AAZObjectType(
serialized_name="destinationNetwork",
flags={"required": True},
)
_ShowHelper._build_schema_network_ref_read(
properties.destination_network)
properties.http = AAZListType()
properties.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.source_network = AAZObjectType(
serialized_name="sourceNetwork",
flags={"required": True},
)
_ShowHelper._build_schema_network_ref_read(
properties.source_network)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
properties.tcp = AAZListType()
http = cls._schema_on_200.properties.http
http.Element = AAZObjectType()
_element = cls._schema_on_200.properties.http.Element
_element.hosts = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType(
flags={"required": True},
)
hosts = cls._schema_on_200.properties.http.Element.hosts
hosts.Element = AAZObjectType()
_element = cls._schema_on_200.properties.http.Element.hosts.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.routes = AAZListType(
flags={"required": True},
)
routes = cls._schema_on_200.properties.http.Element.hosts.Element.routes
routes.Element = AAZObjectType()
_element = cls._schema_on_200.properties.http.Element.hosts.Element.routes.Element
_element.destination = AAZObjectType(
flags={"required": True},
)
_ShowHelper._build_schema_gateway_destination_read(
_element.destination)
_element.match = AAZObjectType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
match = cls._schema_on_200.properties.http.Element.hosts.Element.routes.Element.match
match.headers = AAZListType()
match.path = AAZObjectType(
flags={"required": True},
)
headers = cls._schema_on_200.properties.http.Element.hosts.Element.routes.Element.match.headers
headers.Element = AAZObjectType()
_element = cls._schema_on_200.properties.http.Element.hosts.Element.routes.Element.match.headers.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType()
_element.value = AAZStrType()
path = cls._schema_on_200.properties.http.Element.hosts.Element.routes.Element.match.path
path.rewrite = AAZStrType()
path.type = AAZStrType(
flags={"required": True},
)
path.value = AAZStrType(
flags={"required": True},
)
tcp = cls._schema_on_200.properties.tcp
tcp.Element = AAZObjectType()
_element = cls._schema_on_200.properties.tcp.Element
_element.destination = AAZObjectType(
flags={"required": True},
)
_ShowHelper._build_schema_gateway_destination_read(
_element.destination)
_element.name = AAZStrType(
flags={"required": True},
)
_element.port = AAZIntType(
flags={"required": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class GatewayGet(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 | 21 | 2 | 19 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 211 | 28 | 183 | 36 | 166 | 0 | 91 | 29 | 81 | 2 | 1 | 1 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.