id
int64 0
843k
| repository_name
stringlengths 7
55
| file_path
stringlengths 9
332
| class_name
stringlengths 3
290
| human_written_code
stringlengths 12
4.36M
| class_skeleton
stringlengths 19
2.2M
| total_program_units
int64 1
9.57k
| total_doc_str
int64 0
4.2k
| AvgCountLine
float64 0
7.89k
| AvgCountLineBlank
float64 0
300
| AvgCountLineCode
float64 0
7.89k
| AvgCountLineComment
float64 0
7.89k
| AvgCyclomatic
float64 0
130
| CommentToCodeRatio
float64 0
176
| CountClassBase
float64 0
48
| CountClassCoupled
float64 0
589
| CountClassCoupledModified
float64 0
581
| CountClassDerived
float64 0
5.37k
| CountDeclInstanceMethod
float64 0
4.2k
| CountDeclInstanceVariable
float64 0
299
| CountDeclMethod
float64 0
4.2k
| CountDeclMethodAll
float64 0
4.2k
| CountLine
float64 1
115k
| CountLineBlank
float64 0
9.01k
| CountLineCode
float64 0
94.4k
| CountLineCodeDecl
float64 0
46.1k
| CountLineCodeExe
float64 0
91.3k
| CountLineComment
float64 0
27k
| CountStmt
float64 1
93.2k
| CountStmtDecl
float64 0
46.1k
| CountStmtExe
float64 0
90.2k
| MaxCyclomatic
float64 0
759
| MaxInheritanceTree
float64 0
16
| MaxNesting
float64 0
34
| SumCyclomatic
float64 0
6k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,300 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/vmware_site/machine/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.vmware_site.machine._list.List
|
class List(AAZCommand):
"""List to get machine.
:example: vmware-site machine list for v2arcm
az site-recovery vmware-site machine list -g "rg" --site-name "site_name"
"""
_aaz_info = {
"version": "2020-01-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.offazure/vmwaresites/{}/machines", "2020-01-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.site_name = AAZStrArg(
options=["--site-name"],
help="Site name.",
required=True,
)
_args_schema.continuation_token = AAZStrArg(
options=["--continuation-token"],
help="Optional parameter for continuation token.",
)
_args_schema.filter = AAZStrArg(
options=["--filter"],
help="filter",
)
_args_schema.top = AAZIntArg(
options=["--top"],
help="list a set number of machines",
)
_args_schema.total_record_count = AAZIntArg(
options=["--total-record-count"],
help="Total count of machines in the given site.",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.MachinesGetAllMachinesInSite(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class MachinesGetAllMachinesInSite(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.OffAzure/VMwareSites/{siteName}/machines",
**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(
"siteName", self.ctx.args.site_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(
"$filter", self.ctx.args.filter,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"continuationToken", self.ctx.args.continuation_token,
),
**self.serialize_query_param(
"totalRecordCount", self.ctx.args.total_record_count,
),
**self.serialize_query_param(
"api-version", "2020-01-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(
flags={"read_only": 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()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.allocated_memory_in_mb = AAZFloatType(
serialized_name="allocatedMemoryInMB",
flags={"read_only": True},
)
properties.apps_and_roles = AAZObjectType(
serialized_name="appsAndRoles",
)
properties.bios_guid = AAZStrType(
serialized_name="biosGuid",
flags={"read_only": True},
)
properties.bios_serial_number = AAZStrType(
serialized_name="biosSerialNumber",
flags={"read_only": True},
)
properties.change_tracking_enabled = AAZBoolType(
serialized_name="changeTrackingEnabled",
flags={"read_only": True},
)
properties.change_tracking_supported = AAZBoolType(
serialized_name="changeTrackingSupported",
flags={"read_only": True},
)
properties.created_timestamp = AAZStrType(
serialized_name="createdTimestamp",
flags={"read_only": True},
)
properties.data_center_scope = AAZStrType(
serialized_name="dataCenterScope",
flags={"read_only": True},
)
properties.dependency_mapping = AAZStrType(
serialized_name="dependencyMapping",
flags={"read_only": True},
)
properties.dependency_mapping_start_time = AAZStrType(
serialized_name="dependencyMappingStartTime",
flags={"read_only": True},
)
properties.description = AAZStrType(
flags={"read_only": True},
)
properties.disks = AAZListType(
flags={"read_only": True},
)
properties.display_name = AAZStrType(
serialized_name="displayName",
flags={"read_only": True},
)
properties.errors = AAZListType(
flags={"read_only": True},
)
properties.firmware = AAZStrType(
flags={"read_only": True},
)
properties.guest_details_discovery_timestamp = AAZStrType(
serialized_name="guestDetailsDiscoveryTimestamp",
flags={"read_only": True},
)
properties.guest_os_details = AAZObjectType(
serialized_name="guestOSDetails",
)
properties.host_in_maintenance_mode = AAZBoolType(
serialized_name="hostInMaintenanceMode",
flags={"read_only": True},
)
properties.host_name = AAZStrType(
serialized_name="hostName",
flags={"read_only": True},
)
properties.host_power_state = AAZStrType(
serialized_name="hostPowerState",
flags={"read_only": True},
)
properties.host_version = AAZStrType(
serialized_name="hostVersion",
flags={"read_only": True},
)
properties.instance_uuid = AAZStrType(
serialized_name="instanceUuid",
flags={"read_only": True},
)
properties.is_deleted = AAZBoolType(
serialized_name="isDeleted",
flags={"read_only": True},
)
properties.is_guest_details_discovery_in_progress = AAZBoolType(
serialized_name="isGuestDetailsDiscoveryInProgress",
flags={"read_only": True},
)
properties.max_snapshots = AAZIntType(
serialized_name="maxSnapshots",
flags={"read_only": True},
)
properties.network_adapters = AAZListType(
serialized_name="networkAdapters",
flags={"read_only": True},
)
properties.number_of_applications = AAZIntType(
serialized_name="numberOfApplications",
flags={"read_only": True},
)
properties.number_of_processor_core = AAZIntType(
serialized_name="numberOfProcessorCore",
flags={"read_only": True},
)
properties.operating_system_details = AAZObjectType(
serialized_name="operatingSystemDetails",
)
properties.power_status = AAZStrType(
serialized_name="powerStatus",
flags={"read_only": True},
)
properties.updated_timestamp = AAZStrType(
serialized_name="updatedTimestamp",
flags={"read_only": True},
)
properties.v_center_fqdn = AAZStrType(
serialized_name="vCenterFQDN",
flags={"read_only": True},
)
properties.v_center_id = AAZStrType(
serialized_name="vCenterId",
flags={"read_only": True},
)
properties.v_mware_tools_status = AAZStrType(
serialized_name="vMwareToolsStatus",
flags={"read_only": True},
)
properties.vm_configuration_file_location = AAZStrType(
serialized_name="vmConfigurationFileLocation",
flags={"read_only": True},
)
properties.vm_fqdn = AAZStrType(
serialized_name="vmFqdn",
flags={"read_only": True},
)
apps_and_roles = cls._schema_on_200.value.Element.properties.apps_and_roles
apps_and_roles.applications = AAZListType(
flags={"read_only": True},
)
apps_and_roles.biz_talk_servers = AAZListType(
serialized_name="bizTalkServers",
flags={"read_only": True},
)
apps_and_roles.exchange_servers = AAZListType(
serialized_name="exchangeServers",
flags={"read_only": True},
)
apps_and_roles.features = AAZListType(
flags={"read_only": True},
)
apps_and_roles.other_databases = AAZListType(
serialized_name="otherDatabases",
flags={"read_only": True},
)
apps_and_roles.share_point_servers = AAZListType(
serialized_name="sharePointServers",
flags={"read_only": True},
)
apps_and_roles.sql_servers = AAZListType(
serialized_name="sqlServers",
flags={"read_only": True},
)
apps_and_roles.system_centers = AAZListType(
serialized_name="systemCenters",
flags={"read_only": True},
)
apps_and_roles.web_applications = AAZListType(
serialized_name="webApplications",
flags={"read_only": True},
)
applications = cls._schema_on_200.value.Element.properties.apps_and_roles.applications
applications.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.applications.Element
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.provider = AAZStrType(
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
biz_talk_servers = cls._schema_on_200.value.Element.properties.apps_and_roles.biz_talk_servers
biz_talk_servers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.biz_talk_servers.Element
_element.product_name = AAZStrType(
serialized_name="productName",
flags={"read_only": True},
)
_element.status = AAZStrType(
flags={"read_only": True},
)
exchange_servers = cls._schema_on_200.value.Element.properties.apps_and_roles.exchange_servers
exchange_servers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.exchange_servers.Element
_element.edition = AAZStrType(
flags={"read_only": True},
)
_element.product_name = AAZStrType(
serialized_name="productName",
flags={"read_only": True},
)
_element.roles = AAZStrType(
flags={"read_only": True},
)
_element.service_pack = AAZStrType(
serialized_name="servicePack",
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
features = cls._schema_on_200.value.Element.properties.apps_and_roles.features
features.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.features.Element
_element.feature_type = AAZStrType(
serialized_name="featureType",
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.parent = AAZStrType(
flags={"read_only": True},
)
_element.status = AAZStrType(
flags={"read_only": True},
)
other_databases = cls._schema_on_200.value.Element.properties.apps_and_roles.other_databases
other_databases.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.other_databases.Element
_element.database_type = AAZStrType(
serialized_name="databaseType",
flags={"read_only": True},
)
_element.instance = AAZStrType(
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
share_point_servers = cls._schema_on_200.value.Element.properties.apps_and_roles.share_point_servers
share_point_servers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.share_point_servers.Element
_element.is_enterprise = AAZBoolType(
serialized_name="isEnterprise",
flags={"read_only": True},
)
_element.product_name = AAZStrType(
serialized_name="productName",
flags={"read_only": True},
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
sql_servers = cls._schema_on_200.value.Element.properties.apps_and_roles.sql_servers
sql_servers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.sql_servers.Element
_element.cluster_name = AAZStrType(
serialized_name="clusterName",
flags={"read_only": True},
)
_element.clustered = AAZStrType(
flags={"read_only": True},
)
_element.edition = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.service_pack = AAZStrType(
serialized_name="servicePack",
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
system_centers = cls._schema_on_200.value.Element.properties.apps_and_roles.system_centers
system_centers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.system_centers.Element
_element.product_name = AAZStrType(
serialized_name="productName",
flags={"read_only": True},
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.version = AAZStrType(
flags={"read_only": True},
)
web_applications = cls._schema_on_200.value.Element.properties.apps_and_roles.web_applications
web_applications.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.apps_and_roles.web_applications.Element
_element.application_pool = AAZStrType(
serialized_name="applicationPool",
flags={"read_only": True},
)
_element.group_name = AAZStrType(
serialized_name="groupName",
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.platform = AAZStrType(
flags={"read_only": True},
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.web_server = AAZStrType(
serialized_name="webServer",
flags={"read_only": True},
)
disks = cls._schema_on_200.value.Element.properties.disks
disks.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.disks.Element
_element.disk_mode = AAZStrType(
serialized_name="diskMode",
flags={"read_only": True},
)
_element.disk_provisioning_policy = AAZStrType(
serialized_name="diskProvisioningPolicy",
flags={"read_only": True},
)
_element.disk_scrubbing_policy = AAZStrType(
serialized_name="diskScrubbingPolicy",
flags={"read_only": True},
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
flags={"read_only": True},
)
_element.label = AAZStrType(
flags={"read_only": True},
)
_element.lun = AAZIntType(
flags={"read_only": True},
)
_element.max_size_in_bytes = AAZIntType(
serialized_name="maxSizeInBytes",
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.path = AAZStrType(
flags={"read_only": True},
)
_element.uuid = AAZStrType(
flags={"read_only": True},
)
errors = cls._schema_on_200.value.Element.properties.errors
errors.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.errors.Element
_element.code = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZIntType(
flags={"read_only": True},
)
_element.message = AAZStrType(
flags={"read_only": True},
)
_element.message_parameters = AAZDictType(
serialized_name="messageParameters",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
_element.severity = AAZStrType(
flags={"read_only": True},
)
_element.source = AAZStrType(
flags={"read_only": True},
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
flags={"read_only": True},
)
message_parameters = cls._schema_on_200.value.Element.properties.errors.Element.message_parameters
message_parameters.Element = AAZStrType()
guest_os_details = cls._schema_on_200.value.Element.properties.guest_os_details
guest_os_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
guest_os_details.os_type = AAZStrType(
serialized_name="osType",
)
guest_os_details.os_version = AAZStrType(
serialized_name="osVersion",
flags={"read_only": True},
)
network_adapters = cls._schema_on_200.value.Element.properties.network_adapters
network_adapters.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_adapters.Element
_element.ip_address_list = AAZListType(
serialized_name="ipAddressList",
flags={"read_only": True},
)
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
flags={"read_only": True},
)
_element.label = AAZStrType(
flags={"read_only": True},
)
_element.mac_address = AAZStrType(
serialized_name="macAddress",
flags={"read_only": True},
)
_element.network_name = AAZStrType(
serialized_name="networkName",
flags={"read_only": True},
)
_element.nic_id = AAZStrType(
serialized_name="nicId",
flags={"read_only": True},
)
ip_address_list = cls._schema_on_200.value.Element.properties.network_adapters.Element.ip_address_list
ip_address_list.Element = AAZStrType()
operating_system_details = cls._schema_on_200.value.Element.properties.operating_system_details
operating_system_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
operating_system_details.os_type = AAZStrType(
serialized_name="osType",
flags={"read_only": True},
)
operating_system_details.os_version = AAZStrType(
serialized_name="osVersion",
flags={"read_only": True},
)
return cls._schema_on_200
|
class List(AAZCommand):
'''List to get machine.
:example: vmware-site machine list for v2arcm
az site-recovery vmware-site machine list -g "rg" --site-name "site_name"
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class MachinesGetAllMachinesInSite(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
| 27 | 1 | 42 | 3 | 39 | 0 | 1 | 0.01 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 670 | 59 | 606 | 62 | 579 | 5 | 229 | 52 | 212 | 2 | 1 | 1 | 18 |
9,301 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/vmware_site/machine/__cmd_group.py
|
azext_site_recovery.aaz.latest.site_recovery.vmware_site.machine.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Manage vmware-site machines
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Manage vmware-site machines
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,302 |
Azure/azure-cli-extensions
|
src/spring/azext_spring/_clierror.py
|
azext_spring._clierror.JobExecutionInstanceNotFoundError
|
class JobExecutionInstanceNotFoundError(UserFault):
pass
|
class JobExecutionInstanceNotFoundError(UserFault):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,303 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/volume/_update.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.volume._update.Update.VolumesCreateOrUpdate
|
class VolumesCreateOrUpdate(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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}",
**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(
"accountName", self.ctx.args.account_name,
required=True,
),
**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,
),
**self.serialize_url_param(
"volumeName", self.ctx.args.volume_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"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_volume_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class VolumesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 10 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 118 | 15 | 103 | 29 | 84 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
9,304 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/volume/_update.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.volume._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:
properties.set_prop(
"avsDataStore", AAZStrType, ".avs_data_store")
properties.set_prop("capacityPoolResourceId",
AAZStrType, ".capacity_pool_resource_id")
properties.set_prop("coolAccess", AAZBoolType, ".cool_access")
properties.set_prop("coolAccessRetrievalPolicy",
AAZStrType, ".cool_access_retrieval_policy")
properties.set_prop(
"coolnessPeriod", AAZIntType, ".coolness_period")
properties.set_prop("creationToken", AAZStrType, ".creation_token", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("dataProtection", AAZObjectType)
properties.set_prop("defaultGroupQuotaInKiBs",
AAZIntType, ".default_group_quota_in_ki_bs")
properties.set_prop("defaultUserQuotaInKiBs",
AAZIntType, ".default_user_quota_in_ki_bs")
properties.set_prop("deleteBaseSnapshot",
AAZBoolType, ".delete_base_snapshot")
properties.set_prop("enableSubvolumes",
AAZStrType, ".enable_subvolumes")
properties.set_prop("encryptionKeySource",
AAZStrType, ".encryption_key_source")
properties.set_prop("exportPolicy", AAZObjectType)
properties.set_prop("isDefaultQuotaEnabled",
AAZBoolType, ".is_default_quota_enabled")
properties.set_prop(
"isLargeVolume", AAZBoolType, ".is_large_volume")
properties.set_prop(
"isRestoring", AAZBoolType, ".is_restoring")
properties.set_prop("keyVaultPrivateEndpointResourceId",
AAZStrType, ".key_vault_private_endpoint_resource_id")
properties.set_prop("language", AAZStrType,
".language", typ_kwargs={"nullable": True})
properties.set_prop(
"ldapEnabled", AAZBoolType, ".ldap_enabled")
properties.set_prop("networkFeatures",
AAZStrType, ".network_features")
properties.set_prop(
"placementRules", AAZListType, ".placement_rules")
properties.set_prop(
"protocolTypes", AAZListType, ".protocol_types")
properties.set_prop("proximityPlacementGroup",
AAZStrType, ".proximity_placement_group")
properties.set_prop(
"securityStyle", AAZStrType, ".security_style")
properties.set_prop(
"serviceLevel", AAZStrType, ".service_level")
properties.set_prop("smbAccessBasedEnumeration", AAZStrType,
".smb_access_based_enumeration", typ_kwargs={"nullable": True})
properties.set_prop("smbContinuouslyAvailable",
AAZBoolType, ".smb_continuously_available")
properties.set_prop(
"smbEncryption", AAZBoolType, ".smb_encryption")
properties.set_prop("smbNonBrowsable",
AAZStrType, ".smb_non_browsable")
properties.set_prop("snapshotDirectoryVisible",
AAZBoolType, ".snapshot_directory_visible")
properties.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("throughputMibps", AAZFloatType,
".throughput_mibps", typ_kwargs={"nullable": True})
properties.set_prop("unixPermissions", AAZStrType,
".unix_permissions", typ_kwargs={"nullable": True})
properties.set_prop("usageThreshold", AAZIntType, ".usage_threshold", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"volumeSpecName", AAZStrType, ".volume_spec_name")
properties.set_prop("volumeType", AAZStrType, ".volume_type")
data_protection = _builder.get(".properties.dataProtection")
if data_protection is not None:
data_protection.set_prop("backup", AAZObjectType)
data_protection.set_prop("replication", AAZObjectType)
data_protection.set_prop("snapshot", AAZObjectType)
data_protection.set_prop("volumeRelocation", AAZObjectType)
backup = _builder.get(".properties.dataProtection.backup")
if backup is not None:
backup.set_prop("backupPolicyId", AAZStrType,
".backup_policy_id")
backup.set_prop("backupVaultId", AAZStrType,
".backup_vault_id")
backup.set_prop("policyEnforced", AAZBoolType,
".policy_enforced")
replication = _builder.get(
".properties.dataProtection.replication")
if replication is not None:
replication.set_prop(
"endpointType", AAZStrType, ".endpoint_type")
replication.set_prop("remoteVolumeRegion",
AAZStrType, ".remote_volume_region")
replication.set_prop("replicationSchedule",
AAZStrType, ".replication_schedule")
snapshot = _builder.get(".properties.dataProtection.snapshot")
if snapshot is not None:
snapshot.set_prop("snapshotPolicyId",
AAZStrType, ".snapshot_policy_id")
volume_relocation = _builder.get(
".properties.dataProtection.volumeRelocation")
if volume_relocation is not None:
volume_relocation.set_prop(
"relocationRequested", AAZBoolType, ".relocation_requested")
export_policy = _builder.get(".properties.exportPolicy")
if export_policy is not None:
export_policy.set_prop(
"rules", AAZListType, ".export_policy_rules")
rules = _builder.get(".properties.exportPolicy.rules")
if rules is not None:
rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.exportPolicy.rules[]")
if _elements is not None:
_elements.set_prop(
"allowedClients", AAZStrType, ".allowed_clients")
_elements.set_prop("chownMode", AAZStrType, ".chown_mode")
_elements.set_prop("cifs", AAZBoolType, ".cifs")
_elements.set_prop(
"hasRootAccess", AAZBoolType, ".has_root_access")
_elements.set_prop("kerberos5ReadOnly",
AAZBoolType, ".kerberos5_read_only")
_elements.set_prop("kerberos5ReadWrite",
AAZBoolType, ".kerberos5_read_write")
_elements.set_prop("kerberos5iReadOnly",
AAZBoolType, ".kerberos5i_read_only")
_elements.set_prop("kerberos5iReadWrite",
AAZBoolType, ".kerberos5i_read_write")
_elements.set_prop("kerberos5pReadOnly",
AAZBoolType, ".kerberos5p_read_only")
_elements.set_prop("kerberos5pReadWrite",
AAZBoolType, ".kerberos5p_read_write")
_elements.set_prop("nfsv3", AAZBoolType, ".nfsv3")
_elements.set_prop("nfsv41", AAZBoolType, ".nfsv41")
_elements.set_prop("ruleIndex", AAZIntType, ".rule_index")
_elements.set_prop(
"unixReadOnly", AAZBoolType, ".unix_read_only")
_elements.set_prop(
"unixReadWrite", AAZBoolType, ".unix_read_write")
placement_rules = _builder.get(".properties.placementRules")
if placement_rules is not None:
placement_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.placementRules[]")
if _elements is not None:
_elements.set_prop("key", AAZStrType, ".key", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("value", AAZStrType, ".value", typ_kwargs={
"flags": {"required": True}})
protocol_types = _builder.get(".properties.protocolTypes")
if protocol_types is not None:
protocol_types.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 | 61 | 7 | 54 | 0 | 8 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 124 | 16 | 108 | 16 | 105 | 0 | 104 | 16 | 101 | 14 | 1 | 1 | 15 |
9,305 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/volume/_splitclonefromparent.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.volume._splitclonefromparent.Splitclonefromparent.VolumesSplitCloneFromParent
|
class VolumesSplitCloneFromParent(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,
None,
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.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/splitCloneFromParent",
**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(
"accountName", self.ctx.args.account_name,
required=True,
),
**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,
),
**self.serialize_url_param(
"volumeName", self.ctx.args.volume_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01-preview",
required=True,
),
}
return parameters
|
class VolumesSplitCloneFromParent(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
| 12 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 1 | 6 | 6 | 68 | 7 | 61 | 18 | 49 | 0 | 20 | 12 | 13 | 2 | 1 | 1 | 7 |
9,306 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.IdentityProperties
|
class IdentityProperties(msrest.serialization.Model):
"""IdentityProperties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar principal_id: The identity ID.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
:param type: Identity type. Possible values include: "SystemAssigned", "UserAssigned".
:type type: str or ~microsoft_datadog_client.models.ManagedIdentityTypes
"""
_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}
_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(IdentityProperties, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = kwargs.get('type', None)
|
class IdentityProperties(msrest.serialization.Model):
'''IdentityProperties.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar principal_id: The identity ID.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
:param type: Identity type. Possible values include: "SystemAssigned", "UserAssigned".
:type type: str or ~microsoft_datadog_client.models.ManagedIdentityTypes
'''
def __init__(
self,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 32 | 5 | 18 | 10 | 13 | 9 | 8 | 7 | 6 | 1 | 1 | 0 | 1 |
9,307 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_wait.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._wait.Wait.AccountsGet
|
class AccountsGet(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.NetApp/netAppAccounts/{accountName}",
**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(
"accountName", self.ctx.args.account_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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_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.active_directories = AAZListType(
serialized_name="activeDirectories",
)
properties.disable_showmount = AAZBoolType(
serialized_name="disableShowmount",
nullable=True,
flags={"read_only": True},
)
properties.encryption = AAZObjectType()
properties.is_multi_ad_enabled = AAZBoolType(
serialized_name="isMultiAdEnabled",
nullable=True,
flags={"read_only": True},
)
properties.nfs_v4_id_domain = AAZStrType(
serialized_name="nfsV4IDDomain",
nullable=True,
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
active_directories = cls._schema_on_200.properties.active_directories
active_directories.Element = AAZObjectType()
_element = cls._schema_on_200.properties.active_directories.Element
_element.active_directory_id = AAZStrType(
serialized_name="activeDirectoryId",
nullable=True,
)
_element.ad_name = AAZStrType(
serialized_name="adName",
)
_element.administrators = AAZListType()
_element.aes_encryption = AAZBoolType(
serialized_name="aesEncryption",
)
_element.allow_local_nfs_users_with_ldap = AAZBoolType(
serialized_name="allowLocalNfsUsersWithLdap",
)
_element.backup_operators = AAZListType(
serialized_name="backupOperators",
)
_element.dns = AAZStrType()
_element.domain = AAZStrType()
_element.encrypt_dc_connections = AAZBoolType(
serialized_name="encryptDCConnections",
)
_element.kdc_ip = AAZStrType(
serialized_name="kdcIP",
)
_element.ldap_over_tls = AAZBoolType(
serialized_name="ldapOverTLS",
)
_element.ldap_search_scope = AAZObjectType(
serialized_name="ldapSearchScope",
)
_element.ldap_signing = AAZBoolType(
serialized_name="ldapSigning",
)
_element.organizational_unit = AAZStrType(
serialized_name="organizationalUnit",
)
_element.password = AAZStrType(
flags={"secret": True},
)
_element.preferred_servers_for_ldap_client = AAZStrType(
serialized_name="preferredServersForLdapClient",
)
_element.security_operators = AAZListType(
serialized_name="securityOperators",
)
_element.server_root_ca_certificate = AAZStrType(
serialized_name="serverRootCACertificate",
flags={"secret": True},
)
_element.site = AAZStrType()
_element.smb_server_name = AAZStrType(
serialized_name="smbServerName",
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
_element.username = AAZStrType()
administrators = cls._schema_on_200.properties.active_directories.Element.administrators
administrators.Element = AAZStrType()
backup_operators = cls._schema_on_200.properties.active_directories.Element.backup_operators
backup_operators.Element = AAZStrType()
ldap_search_scope = cls._schema_on_200.properties.active_directories.Element.ldap_search_scope
ldap_search_scope.group_dn = AAZStrType(
serialized_name="groupDN",
)
ldap_search_scope.group_membership_filter = AAZStrType(
serialized_name="groupMembershipFilter",
)
ldap_search_scope.user_dn = AAZStrType(
serialized_name="userDN",
)
security_operators = cls._schema_on_200.properties.active_directories.Element.security_operators
security_operators.Element = AAZStrType()
encryption = cls._schema_on_200.properties.encryption
encryption.identity = AAZObjectType()
encryption.key_source = AAZStrType(
serialized_name="keySource",
)
encryption.key_vault_properties = AAZObjectType(
serialized_name="keyVaultProperties",
)
identity = cls._schema_on_200.properties.encryption.identity
identity.federated_client_id = AAZStrType(
serialized_name="federatedClientId",
)
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.user_assigned_identity = AAZStrType(
serialized_name="userAssignedIdentity",
)
key_vault_properties = cls._schema_on_200.properties.encryption.key_vault_properties
key_vault_properties.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
key_vault_properties.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
key_vault_properties.key_vault_resource_id = AAZStrType(
serialized_name="keyVaultResourceId",
)
key_vault_properties.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
key_vault_properties.status = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class AccountsGet(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 | 2 | 30 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 313 | 29 | 284 | 39 | 267 | 0 | 118 | 32 | 108 | 2 | 1 | 1 | 11 |
9,308 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_update.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._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)
_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, ".identity_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("activeDirectories",
AAZListType, ".active_directories")
properties.set_prop("encryption", AAZObjectType)
properties.set_prop(
"nfsV4IDDomain", AAZStrType, ".nfs_v4_id_domain", typ_kwargs={"nullable": True})
active_directories = _builder.get(".properties.activeDirectories")
if active_directories is not None:
active_directories.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.activeDirectories[]")
if _elements is not None:
_elements.set_prop("activeDirectoryId", AAZStrType,
".active_directory_id", typ_kwargs={"nullable": True})
_elements.set_prop("adName", AAZStrType, ".ad_name")
_elements.set_prop(
"administrators", AAZListType, ".administrators")
_elements.set_prop(
"aesEncryption", AAZBoolType, ".aes_encryption")
_elements.set_prop("allowLocalNfsUsersWithLdap",
AAZBoolType, ".allow_local_nfs_users_with_ldap")
_elements.set_prop("backupOperators",
AAZListType, ".backup_operators")
_elements.set_prop("dns", AAZStrType, ".dns")
_elements.set_prop("domain", AAZStrType, ".domain")
_elements.set_prop("encryptDCConnections",
AAZBoolType, ".encrypt_dc_connections")
_elements.set_prop("kdcIP", AAZStrType, ".kdc_ip")
_elements.set_prop(
"ldapOverTLS", AAZBoolType, ".ldap_over_tls")
_elements.set_prop("ldapSearchScope",
AAZObjectType, ".ldap_search_scope")
_elements.set_prop("ldapSigning", AAZBoolType, ".ldap_signing")
_elements.set_prop("organizationalUnit",
AAZStrType, ".organizational_unit")
_elements.set_prop("password", AAZStrType, ".password", typ_kwargs={
"flags": {"secret": True}})
_elements.set_prop("preferredServersForLdapClient",
AAZStrType, ".preferred_servers_for_ldap_client")
_elements.set_prop("securityOperators",
AAZListType, ".security_operators")
_elements.set_prop("serverRootCACertificate", AAZStrType,
".server_root_ca_certificate", typ_kwargs={"flags": {"secret": True}})
_elements.set_prop("site", AAZStrType, ".site")
_elements.set_prop(
"smbServerName", AAZStrType, ".smb_server_name")
_elements.set_prop("username", AAZStrType, ".username")
administrators = _builder.get(
".properties.activeDirectories[].administrators")
if administrators is not None:
administrators.set_elements(AAZStrType, ".")
backup_operators = _builder.get(
".properties.activeDirectories[].backupOperators")
if backup_operators is not None:
backup_operators.set_elements(AAZStrType, ".")
ldap_search_scope = _builder.get(
".properties.activeDirectories[].ldapSearchScope")
if ldap_search_scope is not None:
ldap_search_scope.set_prop("groupDN", AAZStrType, ".group_dn")
ldap_search_scope.set_prop(
"groupMembershipFilter", AAZStrType, ".group_membership_filter")
ldap_search_scope.set_prop("userDN", AAZStrType, ".user_dn")
security_operators = _builder.get(
".properties.activeDirectories[].securityOperators")
if security_operators is not None:
security_operators.set_elements(AAZStrType, ".")
encryption = _builder.get(".properties.encryption")
if encryption is not None:
encryption.set_prop(
"identity", AAZObjectType, ".encryption_identity")
encryption.set_prop("keySource", AAZStrType, ".key_source")
encryption.set_prop("keyVaultProperties", AAZObjectType)
identity = _builder.get(".properties.encryption.identity")
if identity is not None:
identity.set_prop("federatedClientId",
AAZStrType, ".federated_client_id")
identity.set_prop("userAssignedIdentity",
AAZStrType, ".user_assigned_identity")
key_vault_properties = _builder.get(
".properties.encryption.keyVaultProperties")
if key_vault_properties is not None:
key_vault_properties.set_prop("keyName", AAZStrType, ".key_name", typ_kwargs={
"flags": {"required": True}})
key_vault_properties.set_prop(
"keyVaultResourceId", AAZStrType, ".key_vault_resource_id")
key_vault_properties.set_prop("keyVaultUri", AAZStrType, ".key_vault_uri", 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 | 48 | 7 | 41 | 0 | 8 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 98 | 16 | 82 | 16 | 79 | 0 | 78 | 16 | 75 | 14 | 1 | 1 | 15 |
9,309 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_update.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._update.Update.AccountsGet
|
class AccountsGet(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.NetApp/netAppAccounts/{accountName}",
**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(
"accountName", self.ctx.args.account_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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_net_app_account_read(
cls._schema_on_200)
return cls._schema_on_200
|
class AccountsGet(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 |
9,310 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_update.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._update.Update.AccountsCreateOrUpdate
|
class AccountsCreateOrUpdate(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.NetApp/netAppAccounts/{accountName}",
**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(
"accountName", self.ctx.args.account_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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
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_net_app_account_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class AccountsCreateOrUpdate(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 |
9,311 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_renew_credentials.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._renew_credentials.RenewCredentials.AccountsRenewCredentials
|
class AccountsRenewCredentials(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/renewCredentials",
**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(
"accountName", self.ctx.args.account_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",
required=True,
),
}
return parameters
def on_200(self, session):
pass
|
class AccountsRenewCredentials(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
| 13 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 7 | 1 | 7 | 7 | 72 | 8 | 64 | 19 | 51 | 0 | 24 | 13 | 16 | 3 | 1 | 1 | 9 |
9,312 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_migrate_backup.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._migrate_backup.MigrateBackup.BackupsUnderAccountMigrateBackups
|
class BackupsUnderAccountMigrateBackups(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 [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.NetApp/netAppAccounts/{accountName}/migrateBackups",
**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(
"accountName", self.ctx.args.account_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-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("backupVaultId", AAZStrType, ".backup_vault_id", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200_201(self, session):
pass
|
class BackupsUnderAccountMigrateBackups(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
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 9 | 9 | 92 | 11 | 81 | 25 | 64 | 0 | 31 | 17 | 21 | 3 | 1 | 1 | 11 |
9,313 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_list.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._list.List.AccountsListBySubscription
|
class AccountsListBySubscription(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.NetApp/netAppAccounts",
**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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_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.active_directories = AAZListType(
serialized_name="activeDirectories",
)
properties.disable_showmount = AAZBoolType(
serialized_name="disableShowmount",
nullable=True,
flags={"read_only": True},
)
properties.encryption = AAZObjectType()
properties.is_multi_ad_enabled = AAZBoolType(
serialized_name="isMultiAdEnabled",
nullable=True,
flags={"read_only": True},
)
properties.nfs_v4_id_domain = AAZStrType(
serialized_name="nfsV4IDDomain",
nullable=True,
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
active_directories = cls._schema_on_200.value.Element.properties.active_directories
active_directories.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.active_directories.Element
_element.active_directory_id = AAZStrType(
serialized_name="activeDirectoryId",
nullable=True,
)
_element.ad_name = AAZStrType(
serialized_name="adName",
)
_element.administrators = AAZListType()
_element.aes_encryption = AAZBoolType(
serialized_name="aesEncryption",
)
_element.allow_local_nfs_users_with_ldap = AAZBoolType(
serialized_name="allowLocalNfsUsersWithLdap",
)
_element.backup_operators = AAZListType(
serialized_name="backupOperators",
)
_element.dns = AAZStrType()
_element.domain = AAZStrType()
_element.encrypt_dc_connections = AAZBoolType(
serialized_name="encryptDCConnections",
)
_element.kdc_ip = AAZStrType(
serialized_name="kdcIP",
)
_element.ldap_over_tls = AAZBoolType(
serialized_name="ldapOverTLS",
)
_element.ldap_search_scope = AAZObjectType(
serialized_name="ldapSearchScope",
)
_element.ldap_signing = AAZBoolType(
serialized_name="ldapSigning",
)
_element.organizational_unit = AAZStrType(
serialized_name="organizationalUnit",
)
_element.password = AAZStrType(
flags={"secret": True},
)
_element.preferred_servers_for_ldap_client = AAZStrType(
serialized_name="preferredServersForLdapClient",
)
_element.security_operators = AAZListType(
serialized_name="securityOperators",
)
_element.server_root_ca_certificate = AAZStrType(
serialized_name="serverRootCACertificate",
flags={"secret": True},
)
_element.site = AAZStrType()
_element.smb_server_name = AAZStrType(
serialized_name="smbServerName",
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
_element.username = AAZStrType()
administrators = cls._schema_on_200.value.Element.properties.active_directories.Element.administrators
administrators.Element = AAZStrType()
backup_operators = cls._schema_on_200.value.Element.properties.active_directories.Element.backup_operators
backup_operators.Element = AAZStrType()
ldap_search_scope = cls._schema_on_200.value.Element.properties.active_directories.Element.ldap_search_scope
ldap_search_scope.group_dn = AAZStrType(
serialized_name="groupDN",
)
ldap_search_scope.group_membership_filter = AAZStrType(
serialized_name="groupMembershipFilter",
)
ldap_search_scope.user_dn = AAZStrType(
serialized_name="userDN",
)
security_operators = cls._schema_on_200.value.Element.properties.active_directories.Element.security_operators
security_operators.Element = AAZStrType()
encryption = cls._schema_on_200.value.Element.properties.encryption
encryption.identity = AAZObjectType()
encryption.key_source = AAZStrType(
serialized_name="keySource",
)
encryption.key_vault_properties = AAZObjectType(
serialized_name="keyVaultProperties",
)
identity = cls._schema_on_200.value.Element.properties.encryption.identity
identity.federated_client_id = AAZStrType(
serialized_name="federatedClientId",
)
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.user_assigned_identity = AAZStrType(
serialized_name="userAssignedIdentity",
)
key_vault_properties = cls._schema_on_200.value.Element.properties.encryption.key_vault_properties
key_vault_properties.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
key_vault_properties.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
key_vault_properties.key_vault_resource_id = AAZStrType(
serialized_name="keyVaultResourceId",
)
key_vault_properties.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
key_vault_properties.status = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class AccountsListBySubscription(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 | 2 | 30 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 314 | 31 | 283 | 40 | 266 | 0 | 123 | 33 | 113 | 2 | 1 | 1 | 11 |
9,314 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_list.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._list.List.AccountsList
|
class AccountsList(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.NetApp/netAppAccounts",
**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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_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.active_directories = AAZListType(
serialized_name="activeDirectories",
)
properties.disable_showmount = AAZBoolType(
serialized_name="disableShowmount",
nullable=True,
flags={"read_only": True},
)
properties.encryption = AAZObjectType()
properties.is_multi_ad_enabled = AAZBoolType(
serialized_name="isMultiAdEnabled",
nullable=True,
flags={"read_only": True},
)
properties.nfs_v4_id_domain = AAZStrType(
serialized_name="nfsV4IDDomain",
nullable=True,
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
active_directories = cls._schema_on_200.value.Element.properties.active_directories
active_directories.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.active_directories.Element
_element.active_directory_id = AAZStrType(
serialized_name="activeDirectoryId",
nullable=True,
)
_element.ad_name = AAZStrType(
serialized_name="adName",
)
_element.administrators = AAZListType()
_element.aes_encryption = AAZBoolType(
serialized_name="aesEncryption",
)
_element.allow_local_nfs_users_with_ldap = AAZBoolType(
serialized_name="allowLocalNfsUsersWithLdap",
)
_element.backup_operators = AAZListType(
serialized_name="backupOperators",
)
_element.dns = AAZStrType()
_element.domain = AAZStrType()
_element.encrypt_dc_connections = AAZBoolType(
serialized_name="encryptDCConnections",
)
_element.kdc_ip = AAZStrType(
serialized_name="kdcIP",
)
_element.ldap_over_tls = AAZBoolType(
serialized_name="ldapOverTLS",
)
_element.ldap_search_scope = AAZObjectType(
serialized_name="ldapSearchScope",
)
_element.ldap_signing = AAZBoolType(
serialized_name="ldapSigning",
)
_element.organizational_unit = AAZStrType(
serialized_name="organizationalUnit",
)
_element.password = AAZStrType(
flags={"secret": True},
)
_element.preferred_servers_for_ldap_client = AAZStrType(
serialized_name="preferredServersForLdapClient",
)
_element.security_operators = AAZListType(
serialized_name="securityOperators",
)
_element.server_root_ca_certificate = AAZStrType(
serialized_name="serverRootCACertificate",
flags={"secret": True},
)
_element.site = AAZStrType()
_element.smb_server_name = AAZStrType(
serialized_name="smbServerName",
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
_element.username = AAZStrType()
administrators = cls._schema_on_200.value.Element.properties.active_directories.Element.administrators
administrators.Element = AAZStrType()
backup_operators = cls._schema_on_200.value.Element.properties.active_directories.Element.backup_operators
backup_operators.Element = AAZStrType()
ldap_search_scope = cls._schema_on_200.value.Element.properties.active_directories.Element.ldap_search_scope
ldap_search_scope.group_dn = AAZStrType(
serialized_name="groupDN",
)
ldap_search_scope.group_membership_filter = AAZStrType(
serialized_name="groupMembershipFilter",
)
ldap_search_scope.user_dn = AAZStrType(
serialized_name="userDN",
)
security_operators = cls._schema_on_200.value.Element.properties.active_directories.Element.security_operators
security_operators.Element = AAZStrType()
encryption = cls._schema_on_200.value.Element.properties.encryption
encryption.identity = AAZObjectType()
encryption.key_source = AAZStrType(
serialized_name="keySource",
)
encryption.key_vault_properties = AAZObjectType(
serialized_name="keyVaultProperties",
)
identity = cls._schema_on_200.value.Element.properties.encryption.identity
identity.federated_client_id = AAZStrType(
serialized_name="federatedClientId",
)
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.user_assigned_identity = AAZStrType(
serialized_name="userAssignedIdentity",
)
key_vault_properties = cls._schema_on_200.value.Element.properties.encryption.key_vault_properties
key_vault_properties.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
key_vault_properties.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
key_vault_properties.key_vault_resource_id = AAZStrType(
serialized_name="keyVaultResourceId",
)
key_vault_properties.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
key_vault_properties.status = AAZStrType(
flags={"read_only": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class AccountsList(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 | 2 | 31 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 318 | 31 | 287 | 40 | 270 | 0 | 123 | 33 | 113 | 2 | 1 | 1 | 11 |
9,315 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_delete.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._delete.Delete.AccountsDelete
|
class AccountsDelete(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.NetApp/netAppAccounts/{accountName}",
**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(
"accountName", self.ctx.args.account_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-03-01-preview",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class AccountsDelete(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 |
9,316 |
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/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/account/_create.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.account._create.Create.AccountsCreateOrUpdate
|
class AccountsCreateOrUpdate(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.NetApp/netAppAccounts/{accountName}",
**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(
"accountName", self.ctx.args.account_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-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType)
_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, ".identity_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("activeDirectories",
AAZListType, ".active_directories")
properties.set_prop("encryption", AAZObjectType)
properties.set_prop(
"nfsV4IDDomain", AAZStrType, ".nfs_v4_id_domain", typ_kwargs={"nullable": True})
active_directories = _builder.get(".properties.activeDirectories")
if active_directories is not None:
active_directories.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.activeDirectories[]")
if _elements is not None:
_elements.set_prop("activeDirectoryId", AAZStrType,
".active_directory_id", typ_kwargs={"nullable": True})
_elements.set_prop("adName", AAZStrType, ".ad_name")
_elements.set_prop(
"administrators", AAZListType, ".administrators")
_elements.set_prop(
"aesEncryption", AAZBoolType, ".aes_encryption")
_elements.set_prop("allowLocalNfsUsersWithLdap",
AAZBoolType, ".allow_local_nfs_users_with_ldap")
_elements.set_prop("backupOperators",
AAZListType, ".backup_operators")
_elements.set_prop("dns", AAZStrType, ".dns")
_elements.set_prop("domain", AAZStrType, ".domain")
_elements.set_prop("encryptDCConnections",
AAZBoolType, ".encrypt_dc_connections")
_elements.set_prop("kdcIP", AAZStrType, ".kdc_ip")
_elements.set_prop(
"ldapOverTLS", AAZBoolType, ".ldap_over_tls")
_elements.set_prop("ldapSearchScope",
AAZObjectType, ".ldap_search_scope")
_elements.set_prop("ldapSigning", AAZBoolType, ".ldap_signing")
_elements.set_prop("organizationalUnit",
AAZStrType, ".organizational_unit")
_elements.set_prop("password", AAZStrType, ".password", typ_kwargs={
"flags": {"secret": True}})
_elements.set_prop("preferredServersForLdapClient",
AAZStrType, ".preferred_servers_for_ldap_client")
_elements.set_prop("securityOperators",
AAZListType, ".security_operators")
_elements.set_prop("serverRootCACertificate", AAZStrType,
".server_root_ca_certificate", typ_kwargs={"flags": {"secret": True}})
_elements.set_prop("site", AAZStrType, ".site")
_elements.set_prop(
"smbServerName", AAZStrType, ".smb_server_name")
_elements.set_prop("username", AAZStrType, ".username")
administrators = _builder.get(
".properties.activeDirectories[].administrators")
if administrators is not None:
administrators.set_elements(AAZStrType, ".")
backup_operators = _builder.get(
".properties.activeDirectories[].backupOperators")
if backup_operators is not None:
backup_operators.set_elements(AAZStrType, ".")
ldap_search_scope = _builder.get(
".properties.activeDirectories[].ldapSearchScope")
if ldap_search_scope is not None:
ldap_search_scope.set_prop("groupDN", AAZStrType, ".group_dn")
ldap_search_scope.set_prop(
"groupMembershipFilter", AAZStrType, ".group_membership_filter")
ldap_search_scope.set_prop("userDN", AAZStrType, ".user_dn")
security_operators = _builder.get(
".properties.activeDirectories[].securityOperators")
if security_operators is not None:
security_operators.set_elements(AAZStrType, ".")
encryption = _builder.get(".properties.encryption")
if encryption is not None:
encryption.set_prop("identity", AAZObjectType)
encryption.set_prop("keySource", AAZStrType, ".key_source")
encryption.set_prop("keyVaultProperties", AAZObjectType)
identity = _builder.get(".properties.encryption.identity")
if identity is not None:
identity.set_prop("federatedClientId",
AAZStrType, ".federated_client_id")
identity.set_prop("userAssignedIdentity",
AAZStrType, ".user_assigned_identity")
key_vault_properties = _builder.get(
".properties.encryption.keyVaultProperties")
if key_vault_properties is not None:
key_vault_properties.set_prop("keyName", AAZStrType, ".key_name", typ_kwargs={
"flags": {"required": True}})
key_vault_properties.set_prop(
"keyVaultResourceId", AAZStrType, ".key_vault_resource_id")
key_vault_properties.set_prop("keyVaultUri", AAZStrType, ".key_vault_uri", 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.etag = AAZStrType(
flags={"read_only": True},
)
_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.active_directories = AAZListType(
serialized_name="activeDirectories",
)
properties.disable_showmount = AAZBoolType(
serialized_name="disableShowmount",
nullable=True,
flags={"read_only": True},
)
properties.encryption = AAZObjectType()
properties.is_multi_ad_enabled = AAZBoolType(
serialized_name="isMultiAdEnabled",
nullable=True,
flags={"read_only": True},
)
properties.nfs_v4_id_domain = AAZStrType(
serialized_name="nfsV4IDDomain",
nullable=True,
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
active_directories = cls._schema_on_200_201.properties.active_directories
active_directories.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.active_directories.Element
_element.active_directory_id = AAZStrType(
serialized_name="activeDirectoryId",
nullable=True,
)
_element.ad_name = AAZStrType(
serialized_name="adName",
)
_element.administrators = AAZListType()
_element.aes_encryption = AAZBoolType(
serialized_name="aesEncryption",
)
_element.allow_local_nfs_users_with_ldap = AAZBoolType(
serialized_name="allowLocalNfsUsersWithLdap",
)
_element.backup_operators = AAZListType(
serialized_name="backupOperators",
)
_element.dns = AAZStrType()
_element.domain = AAZStrType()
_element.encrypt_dc_connections = AAZBoolType(
serialized_name="encryptDCConnections",
)
_element.kdc_ip = AAZStrType(
serialized_name="kdcIP",
)
_element.ldap_over_tls = AAZBoolType(
serialized_name="ldapOverTLS",
)
_element.ldap_search_scope = AAZObjectType(
serialized_name="ldapSearchScope",
)
_element.ldap_signing = AAZBoolType(
serialized_name="ldapSigning",
)
_element.organizational_unit = AAZStrType(
serialized_name="organizationalUnit",
)
_element.password = AAZStrType(
flags={"secret": True},
)
_element.preferred_servers_for_ldap_client = AAZStrType(
serialized_name="preferredServersForLdapClient",
)
_element.security_operators = AAZListType(
serialized_name="securityOperators",
)
_element.server_root_ca_certificate = AAZStrType(
serialized_name="serverRootCACertificate",
flags={"secret": True},
)
_element.site = AAZStrType()
_element.smb_server_name = AAZStrType(
serialized_name="smbServerName",
)
_element.status = AAZStrType(
flags={"read_only": True},
)
_element.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
_element.username = AAZStrType()
administrators = cls._schema_on_200_201.properties.active_directories.Element.administrators
administrators.Element = AAZStrType()
backup_operators = cls._schema_on_200_201.properties.active_directories.Element.backup_operators
backup_operators.Element = AAZStrType()
ldap_search_scope = cls._schema_on_200_201.properties.active_directories.Element.ldap_search_scope
ldap_search_scope.group_dn = AAZStrType(
serialized_name="groupDN",
)
ldap_search_scope.group_membership_filter = AAZStrType(
serialized_name="groupMembershipFilter",
)
ldap_search_scope.user_dn = AAZStrType(
serialized_name="userDN",
)
security_operators = cls._schema_on_200_201.properties.active_directories.Element.security_operators
security_operators.Element = AAZStrType()
encryption = cls._schema_on_200_201.properties.encryption
encryption.identity = AAZObjectType()
encryption.key_source = AAZStrType(
serialized_name="keySource",
)
encryption.key_vault_properties = AAZObjectType(
serialized_name="keyVaultProperties",
)
identity = cls._schema_on_200_201.properties.encryption.identity
identity.federated_client_id = AAZStrType(
serialized_name="federatedClientId",
)
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.user_assigned_identity = AAZStrType(
serialized_name="userAssignedIdentity",
)
key_vault_properties = cls._schema_on_200_201.properties.encryption.key_vault_properties
key_vault_properties.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
key_vault_properties.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
key_vault_properties.key_vault_resource_id = AAZStrType(
serialized_name="keyVaultResourceId",
)
key_vault_properties.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
key_vault_properties.status = AAZStrType(
flags={"read_only": 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 AccountsCreateOrUpdate(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 | 41 | 3 | 37 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 428 | 44 | 384 | 55 | 365 | 0 | 196 | 46 | 185 | 14 | 1 | 1 | 26 |
9,317 |
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/neon/azext_neon/tests/latest/test_neon.py
|
azext_neon.tests.latest.test_neon.NeonScenario
|
class NeonScenario(ScenarioTest):
@AllowLargeResponse(size_kb=10240)
@ResourceGroupPreparer(name_prefix='cli_test_neon', location="eastus2euap")
def test_neon(self, resource_group):
self.kwargs.update({
'name': 'NeonCLITestOrg1',
'location': 'eastus2euap',
'subscription': '00000000-0000-0000-0000-000000000000',
'marketplace_subscription_id': 'yxmkfivp',
'publisher_id': 'neon1722366567200',
'offer_id': 'neon_test',
'plan_id': 'neon_test_1',
'plan_name': 'Neon Serverless Postgres - Free (Test_Liftr)',
'term_unit': 'P1M',
'term_id': 'gmz7xq9ge3py',
'user_first_name': 'Almas',
'user_last_name': 'Khan',
'user_email': 'khanalmas@example.com',
'user_upn': 'khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com',
'user_phone': '+1234567890',
'company_name': 'SampleCompany',
'country': 'USA',
'business_phone': '+1234567890',
'office_address': '5678 Azure Blvd',
'domain': 'samplecompany.com',
'number_of_employees': 500,
'organization_id': 'org67890',
'org-name': 'PartnerOrgForCLITest1',
'enterprise_app_id': 'app67890',
'sso_url': 'https://sso.partnerorgtest.com',
'aad_domain': 'partnerorgtest.com',
'resource_group': 'NeonDemoRG'
})
# Create Neon Organization
self.cmd('az neon postgres create --resource-group {resource_group} --name {name} --location {location} --subscription {subscription} '
'--marketplace-details \'{{"subscription-id": "{marketplace_subscription_id}", "subscription-status": "PendingFulfillmentStart", '
'"offer-details": {{"publisher-id": "{publisher_id}", "offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}}}\' '
'--user-details \'{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}\' '
'--company-details \'{{"company-name": "{company_name}", "country": "{country}", "business-phone": "{business_phone}", "office-address": "{office_address}", "domain": "{domain}", "number-of-employees": {number_of_employees}}}\' '
'--partner-organization-properties \'{{"organization-id": "{organization_id}", "org-name": "{org-name}", '
'"single-sign-on-properties": {{"single-sign-on-state": "Enable", "enterprise-app-id": "{enterprise_app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{aad_domain}"]}}}}\'',
checks=[
self.check('name', '{name}'),
])
# List Neon Organizations
self.cmd('az neon postgres organization list --subscription {subscription} --resource-group {resource_group}',
checks=[])
# Show Neon Organization
self.cmd('az neon postgres organization show --subscription {subscription} --resource-group {resource_group} --name {name}',
checks=[
self.check('name', '{name}'),
])
|
class NeonScenario(ScenarioTest):
@AllowLargeResponse(size_kb=10240)
@ResourceGroupPreparer(name_prefix='cli_test_neon', location="eastus2euap")
def test_neon(self, resource_group):
pass
| 4 | 0 | 52 | 3 | 46 | 4 | 1 | 0.08 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 55 | 3 | 49 | 3 | 45 | 4 | 6 | 2 | 4 | 1 | 1 | 0 | 1 |
9,318 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py
|
azext_neon.aaz.latest.neon.postgres.organization._wait.Wait.OrganizationsGet
|
class OrganizationsGet(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/Neon.Postgres/organizations/{organizationName}",
**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(
"organizationName", self.ctx.args.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-08-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()
_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.company_details = AAZObjectType(
serialized_name="companyDetails",
flags={"required": True},
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.partner_organization_properties = AAZObjectType(
serialized_name="partnerOrganizationProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user_details = AAZObjectType(
serialized_name="userDetails",
flags={"required": True},
)
company_details = cls._schema_on_200.properties.company_details
company_details.business_phone = AAZStrType(
serialized_name="businessPhone",
)
company_details.company_name = AAZStrType(
serialized_name="companyName",
)
company_details.country = AAZStrType()
company_details.domain = AAZStrType()
company_details.number_of_employees = AAZIntType(
serialized_name="numberOfEmployees",
)
company_details.office_address = AAZStrType(
serialized_name="officeAddress",
)
marketplace_details = cls._schema_on_200.properties.marketplace_details
marketplace_details.offer_details = AAZObjectType(
serialized_name="offerDetails",
flags={"required": True},
)
marketplace_details.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
marketplace_details.subscription_status = AAZStrType(
serialized_name="subscriptionStatus",
)
offer_details = cls._schema_on_200.properties.marketplace_details.offer_details
offer_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
offer_details.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
offer_details.plan_name = AAZStrType(
serialized_name="planName",
)
offer_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
offer_details.term_id = AAZStrType(
serialized_name="termId",
)
offer_details.term_unit = AAZStrType(
serialized_name="termUnit",
)
partner_organization_properties = cls._schema_on_200.properties.partner_organization_properties
partner_organization_properties.organization_id = AAZStrType(
serialized_name="organizationId",
)
partner_organization_properties.organization_name = AAZStrType(
serialized_name="organizationName",
flags={"required": True},
)
partner_organization_properties.single_sign_on_properties = AAZObjectType(
serialized_name="singleSignOnProperties",
)
single_sign_on_properties = cls._schema_on_200.properties.partner_organization_properties.single_sign_on_properties
single_sign_on_properties.aad_domains = AAZListType(
serialized_name="aadDomains",
)
single_sign_on_properties.enterprise_app_id = AAZStrType(
serialized_name="enterpriseAppId",
)
single_sign_on_properties.single_sign_on_state = AAZStrType(
serialized_name="singleSignOnState",
)
single_sign_on_properties.single_sign_on_url = AAZStrType(
serialized_name="singleSignOnUrl",
)
aad_domains = cls._schema_on_200.properties.partner_organization_properties.single_sign_on_properties.aad_domains
aad_domains.Element = AAZStrType()
user_details = cls._schema_on_200.properties.user_details
user_details.email_address = AAZStrType(
serialized_name="emailAddress",
)
user_details.first_name = AAZStrType(
serialized_name="firstName",
)
user_details.last_name = AAZStrType(
serialized_name="lastName",
)
user_details.phone_number = AAZStrType(
serialized_name="phoneNumber",
)
user_details.upn = 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 OrganizationsGet(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 | 23 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 240 | 24 | 216 | 36 | 199 | 0 | 90 | 29 | 80 | 2 | 1 | 1 | 11 |
9,319 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py
|
azext_neon.aaz.latest.neon.postgres.organization._update.Update.OrganizationsGet
|
class OrganizationsGet(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/Neon.Postgres/organizations/{organizationName}",
**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(
"organizationName", self.ctx.args.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-08-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_organization_resource_read(
cls._schema_on_200)
return cls._schema_on_200
|
class OrganizationsGet(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 |
9,320 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py
|
azext_neon.aaz.latest.neon.postgres.organization._update.Update.OrganizationsCreateOrUpdate
|
class OrganizationsCreateOrUpdate(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/Neon.Postgres/organizations/{organizationName}",
**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(
"organizationName", self.ctx.args.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-08-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_organization_resource_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class OrganizationsCreateOrUpdate(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 |
9,321 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py
|
azext_neon.aaz.latest.neon.postgres.organization._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("companyDetails", AAZObjectType, ".company_details", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("partnerOrganizationProperties",
AAZObjectType, ".partner_organization_properties")
properties.set_prop("userDetails", AAZObjectType, ".user_details", typ_kwargs={
"flags": {"required": True}})
company_details = _builder.get(".properties.companyDetails")
if company_details is not None:
company_details.set_prop(
"businessPhone", AAZStrType, ".business_phone")
company_details.set_prop(
"companyName", AAZStrType, ".company_name")
company_details.set_prop("country", AAZStrType, ".country")
company_details.set_prop("domain", AAZStrType, ".domain")
company_details.set_prop(
"numberOfEmployees", AAZIntType, ".number_of_employees")
company_details.set_prop(
"officeAddress", AAZStrType, ".office_address")
partner_organization_properties = _builder.get(
".properties.partnerOrganizationProperties")
if partner_organization_properties is not None:
partner_organization_properties.set_prop(
"organizationId", AAZStrType, ".organization_id")
partner_organization_properties.set_prop(
"organizationName", AAZStrType, ".org_name", typ_kwargs={"flags": {"required": True}})
partner_organization_properties.set_prop(
"singleSignOnProperties", AAZObjectType, ".single_sign_on_properties")
single_sign_on_properties = _builder.get(
".properties.partnerOrganizationProperties.singleSignOnProperties")
if single_sign_on_properties is not None:
single_sign_on_properties.set_prop(
"aadDomains", AAZListType, ".aad_domains")
single_sign_on_properties.set_prop(
"enterpriseAppId", AAZStrType, ".enterprise_app_id")
single_sign_on_properties.set_prop(
"singleSignOnState", AAZStrType, ".single_sign_on_state")
single_sign_on_properties.set_prop(
"singleSignOnUrl", AAZStrType, ".single_sign_on_url")
aad_domains = _builder.get(
".properties.partnerOrganizationProperties.singleSignOnProperties.aadDomains")
if aad_domains is not None:
aad_domains.set_elements(AAZStrType, ".")
user_details = _builder.get(".properties.userDetails")
if user_details is not None:
user_details.set_prop(
"emailAddress", AAZStrType, ".email_address")
user_details.set_prop("firstName", AAZStrType, ".first_name")
user_details.set_prop("lastName", AAZStrType, ".last_name")
user_details.set_prop(
"phoneNumber", AAZStrType, ".phone_number")
user_details.set_prop("upn", AAZStrType, ".upn")
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 | 28 | 4 | 24 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 59 | 10 | 49 | 11 | 46 | 0 | 45 | 11 | 42 | 8 | 1 | 1 | 9 |
9,322 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py
|
azext_neon.aaz.latest.neon.postgres.organization._list.List.OrganizationsListBySubscription
|
class OrganizationsListBySubscription(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/Neon.Postgres/organizations",
**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-08-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(
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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_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.company_details = AAZObjectType(
serialized_name="companyDetails",
flags={"required": True},
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.partner_organization_properties = AAZObjectType(
serialized_name="partnerOrganizationProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user_details = AAZObjectType(
serialized_name="userDetails",
flags={"required": True},
)
company_details = cls._schema_on_200.value.Element.properties.company_details
company_details.business_phone = AAZStrType(
serialized_name="businessPhone",
)
company_details.company_name = AAZStrType(
serialized_name="companyName",
)
company_details.country = AAZStrType()
company_details.domain = AAZStrType()
company_details.number_of_employees = AAZIntType(
serialized_name="numberOfEmployees",
)
company_details.office_address = AAZStrType(
serialized_name="officeAddress",
)
marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details
marketplace_details.offer_details = AAZObjectType(
serialized_name="offerDetails",
flags={"required": True},
)
marketplace_details.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
marketplace_details.subscription_status = AAZStrType(
serialized_name="subscriptionStatus",
)
offer_details = cls._schema_on_200.value.Element.properties.marketplace_details.offer_details
offer_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
offer_details.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
offer_details.plan_name = AAZStrType(
serialized_name="planName",
)
offer_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
offer_details.term_id = AAZStrType(
serialized_name="termId",
)
offer_details.term_unit = AAZStrType(
serialized_name="termUnit",
)
partner_organization_properties = cls._schema_on_200.value.Element.properties.partner_organization_properties
partner_organization_properties.organization_id = AAZStrType(
serialized_name="organizationId",
)
partner_organization_properties.organization_name = AAZStrType(
serialized_name="organizationName",
flags={"required": True},
)
partner_organization_properties.single_sign_on_properties = AAZObjectType(
serialized_name="singleSignOnProperties",
)
single_sign_on_properties = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties
single_sign_on_properties.aad_domains = AAZListType(
serialized_name="aadDomains",
)
single_sign_on_properties.enterprise_app_id = AAZStrType(
serialized_name="enterpriseAppId",
)
single_sign_on_properties.single_sign_on_state = AAZStrType(
serialized_name="singleSignOnState",
)
single_sign_on_properties.single_sign_on_url = AAZStrType(
serialized_name="singleSignOnUrl",
)
aad_domains = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties.aad_domains
aad_domains.Element = AAZStrType()
user_details = cls._schema_on_200.value.Element.properties.user_details
user_details.email_address = AAZStrType(
serialized_name="emailAddress",
)
user_details.first_name = AAZStrType(
serialized_name="firstName",
)
user_details.last_name = AAZStrType(
serialized_name="lastName",
)
user_details.phone_number = AAZStrType(
serialized_name="phoneNumber",
)
user_details.upn = 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 OrganizationsListBySubscription(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 | 25 | 2 | 23 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 243 | 26 | 217 | 38 | 200 | 0 | 95 | 31 | 85 | 2 | 1 | 1 | 11 |
9,323 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(FilteringTag, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.value = kwargs.get('value', None)
self.action = kwargs.get('action', None)
|
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,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.64 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 26 | 3 | 14 | 9 | 9 | 9 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
9,324 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py
|
azext_neon.aaz.latest.neon.postgres.organization._list.List.OrganizationsListByResourceGroup
|
class OrganizationsListByResourceGroup(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/Neon.Postgres/organizations",
**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-08-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(
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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_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.company_details = AAZObjectType(
serialized_name="companyDetails",
flags={"required": True},
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.partner_organization_properties = AAZObjectType(
serialized_name="partnerOrganizationProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user_details = AAZObjectType(
serialized_name="userDetails",
flags={"required": True},
)
company_details = cls._schema_on_200.value.Element.properties.company_details
company_details.business_phone = AAZStrType(
serialized_name="businessPhone",
)
company_details.company_name = AAZStrType(
serialized_name="companyName",
)
company_details.country = AAZStrType()
company_details.domain = AAZStrType()
company_details.number_of_employees = AAZIntType(
serialized_name="numberOfEmployees",
)
company_details.office_address = AAZStrType(
serialized_name="officeAddress",
)
marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details
marketplace_details.offer_details = AAZObjectType(
serialized_name="offerDetails",
flags={"required": True},
)
marketplace_details.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
marketplace_details.subscription_status = AAZStrType(
serialized_name="subscriptionStatus",
)
offer_details = cls._schema_on_200.value.Element.properties.marketplace_details.offer_details
offer_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
offer_details.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
offer_details.plan_name = AAZStrType(
serialized_name="planName",
)
offer_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
offer_details.term_id = AAZStrType(
serialized_name="termId",
)
offer_details.term_unit = AAZStrType(
serialized_name="termUnit",
)
partner_organization_properties = cls._schema_on_200.value.Element.properties.partner_organization_properties
partner_organization_properties.organization_id = AAZStrType(
serialized_name="organizationId",
)
partner_organization_properties.organization_name = AAZStrType(
serialized_name="organizationName",
flags={"required": True},
)
partner_organization_properties.single_sign_on_properties = AAZObjectType(
serialized_name="singleSignOnProperties",
)
single_sign_on_properties = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties
single_sign_on_properties.aad_domains = AAZListType(
serialized_name="aadDomains",
)
single_sign_on_properties.enterprise_app_id = AAZStrType(
serialized_name="enterpriseAppId",
)
single_sign_on_properties.single_sign_on_state = AAZStrType(
serialized_name="singleSignOnState",
)
single_sign_on_properties.single_sign_on_url = AAZStrType(
serialized_name="singleSignOnUrl",
)
aad_domains = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties.aad_domains
aad_domains.Element = AAZStrType()
user_details = cls._schema_on_200.value.Element.properties.user_details
user_details.email_address = AAZStrType(
serialized_name="emailAddress",
)
user_details.first_name = AAZStrType(
serialized_name="firstName",
)
user_details.last_name = AAZStrType(
serialized_name="lastName",
)
user_details.phone_number = AAZStrType(
serialized_name="phoneNumber",
)
user_details.upn = 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 OrganizationsListByResourceGroup(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 | 25 | 2 | 23 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 247 | 26 | 221 | 38 | 204 | 0 | 95 | 31 | 85 | 2 | 1 | 1 | 11 |
9,325 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.ErrorResponse
|
class ErrorResponse(msrest.serialization.Model):
"""Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
:param error: The error object.
:type error: ~microsoft_datadog_client.models.ErrorDetail
"""
_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorDetail'},
}
def __init__(
self,
**kwargs
):
super(ErrorResponse, self).__init__(**kwargs)
self.error = kwargs.get('error', None)
|
class ErrorResponse(msrest.serialization.Model):
'''Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
:param error: The error object.
:type error: ~microsoft_datadog_client.models.ErrorDetail
'''
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 |
9,326 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogSingleSignOnResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = kwargs.get('properties', None)
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,
**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 |
9,327 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_microsoft_datadog_client_enums.py
|
azext_datadog.vendored_sdks.datadog.models._microsoft_datadog_client_enums.ProvisioningState
|
class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
ACCEPTED = "Accepted"
CREATING = "Creating"
UPDATING = "Updating"
DELETING = "Deleting"
SUCCEEDED = "Succeeded"
FAILED = "Failed"
CANCELED = "Canceled"
DELETED = "Deleted"
NOT_SPECIFIED = "NotSpecified"
|
class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
pass
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 1 | 10 | 10 | 9 | 0 | 10 | 10 | 9 | 0 | 1 | 0 | 0 |
9,328 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogAgreementProperties, self).__init__(**kwargs)
self.publisher = kwargs.get('publisher', None)
self.product = kwargs.get('product', None)
self.plan = kwargs.get('plan', None)
self.license_text_link = kwargs.get('license_text_link', None)
self.privacy_policy_link = kwargs.get('privacy_policy_link', None)
self.retrieve_datetime = kwargs.get('retrieve_datetime', None)
self.signature = kwargs.get('signature', None)
self.accepted = kwargs.get('accepted', None)
|
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,
**kwargs
):
pass
| 2 | 1 | 13 | 0 | 13 | 0 | 1 | 0.79 | 1 | 1 | 0 | 0 | 1 | 8 | 1 | 1 | 46 | 3 | 24 | 14 | 19 | 19 | 12 | 11 | 10 | 1 | 1 | 0 | 1 |
9,329 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogAgreementResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.properties = kwargs.get('properties', None)
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,
**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 |
9,330 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogAgreementResourceListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
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,
**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 |
9,331 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogApiKey, self).__init__(**kwargs)
self.created_by = kwargs.get('created_by', None)
self.name = kwargs.get('name', None)
self.key = kwargs['key']
self.created = kwargs.get('created', None)
|
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,
**kwargs
):
pass
| 2 | 1 | 9 | 0 | 9 | 0 | 1 | 0.58 | 1 | 1 | 0 | 0 | 1 | 4 | 1 | 1 | 35 | 5 | 19 | 11 | 14 | 11 | 9 | 8 | 7 | 1 | 1 | 0 | 1 |
9,332 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogApiKeyListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
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,
**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 |
9,333 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogHost, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.aliases = kwargs.get('aliases', None)
self.apps = kwargs.get('apps', None)
self.meta = kwargs.get('meta', None)
|
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,
**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 |
9,334 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogHostListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
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,
**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 |
9,335 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogHostMetadata, self).__init__(**kwargs)
self.agent_version = kwargs.get('agent_version', None)
self.install_method = kwargs.get('install_method', None)
self.logs_agent = kwargs.get('logs_agent', None)
|
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,
**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 |
9,336 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogInstallMethod, self).__init__(**kwargs)
self.tool = kwargs.get('tool', None)
self.tool_version = kwargs.get('tool_version', None)
self.installer_version = kwargs.get('installer_version', None)
|
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,
**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 |
9,337 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.DatadogLogsAgent
|
class DatadogLogsAgent(msrest.serialization.Model):
"""DatadogLogsAgent.
:param transport: The transport.
:type transport: str
"""
_attribute_map = {
'transport': {'key': 'transport', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(DatadogLogsAgent, self).__init__(**kwargs)
self.transport = kwargs.get('transport', None)
|
class DatadogLogsAgent(msrest.serialization.Model):
'''DatadogLogsAgent.
:param transport: The transport.
:type transport: 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 |
9,338 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogMonitorResource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
self.sku = kwargs.get('sku', None)
self.properties = kwargs.get('properties', None)
self.identity = kwargs.get('identity', None)
self.tags = kwargs.get('tags', None)
self.location = kwargs['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,
**kwargs
):
pass
| 2 | 1 | 14 | 0 | 14 | 0 | 1 | 0.67 | 1 | 1 | 0 | 0 | 1 | 9 | 1 | 1 | 61 | 6 | 33 | 16 | 28 | 22 | 14 | 13 | 12 | 1 | 1 | 0 | 1 |
9,339 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogMonitorResourceListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
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,
**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 |
9,340 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogMonitorResourceUpdateParameters, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
self.tags = kwargs.get('tags', None)
self.sku = kwargs.get('sku', None)
|
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,
**kwargs
):
pass
| 2 | 1 | 8 | 0 | 8 | 0 | 1 | 0.64 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 1 | 26 | 3 | 14 | 9 | 9 | 9 | 7 | 6 | 5 | 1 | 1 | 0 | 1 |
9,341 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogOrganizationProperties, self).__init__(**kwargs)
self.name = None
self.id = None
self.linking_auth_code = kwargs.get('linking_auth_code', None)
self.linking_client_id = kwargs.get('linking_client_id', None)
self.redirect_uri = kwargs.get('redirect_uri', None)
self.api_key = kwargs.get('api_key', None)
self.application_key = kwargs.get('application_key', None)
self.enterprise_app_id = kwargs.get('enterprise_app_id', None)
|
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,
**kwargs
):
pass
| 2 | 1 | 13 | 0 | 13 | 0 | 1 | 0.71 | 1 | 1 | 0 | 0 | 1 | 8 | 1 | 1 | 53 | 5 | 28 | 15 | 23 | 20 | 13 | 12 | 11 | 1 | 1 | 0 | 1 |
9,342 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogSetPasswordLink, self).__init__(**kwargs)
self.set_password_link = kwargs.get('set_password_link', None)
|
class DatadogSetPasswordLink(msrest.serialization.Model):
'''DatadogSetPasswordLink.
:param set_password_link:
:type set_password_link: 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 |
9,343 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogSingleSignOnProperties, self).__init__(**kwargs)
self.provisioning_state = None
self.single_sign_on_state = kwargs.get('single_sign_on_state', None)
self.enterprise_app_id = kwargs.get('enterprise_app_id', None)
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,
**kwargs
):
pass
| 2 | 1 | 9 | 0 | 9 | 0 | 1 | 0.65 | 1 | 1 | 0 | 0 | 1 | 4 | 1 | 1 | 38 | 5 | 20 | 11 | 15 | 13 | 9 | 8 | 7 | 1 | 1 | 0 | 1 |
9,344 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_models.py
|
azext_datadog.vendored_sdks.datadog.models._models.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,
**kwargs
):
super(DatadogSingleSignOnResourceListResponse, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.next_link = kwargs.get('next_link', None)
|
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,
**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 |
9,345 |
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/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py
|
azext_neon.aaz.latest.neon.postgres.organization._delete.Delete.OrganizationsDelete
|
class OrganizationsDelete(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/Neon.Postgres/organizations/{organizationName}",
**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(
"organizationName", self.ctx.args.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-08-01-preview",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class OrganizationsDelete(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 |
9,346 |
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/neon/azext_neon/aaz/latest/neon/postgres/_create.py
|
azext_neon.aaz.latest.neon.postgres._create.Create.OrganizationsCreateOrUpdate
|
class OrganizationsCreateOrUpdate(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/Neon.Postgres/organizations/{organizationName}",
**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(
"organizationName", self.ctx.args.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-08-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("companyDetails", AAZObjectType, ".company_details", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("partnerOrganizationProperties",
AAZObjectType, ".partner_organization_properties")
properties.set_prop("userDetails", AAZObjectType, ".user_details", typ_kwargs={
"flags": {"required": True}})
company_details = _builder.get(".properties.companyDetails")
if company_details is not None:
company_details.set_prop(
"businessPhone", AAZStrType, ".business_phone")
company_details.set_prop(
"companyName", AAZStrType, ".company_name")
company_details.set_prop("country", AAZStrType, ".country")
company_details.set_prop("domain", AAZStrType, ".domain")
company_details.set_prop(
"numberOfEmployees", AAZIntType, ".number_of_employees")
company_details.set_prop(
"officeAddress", AAZStrType, ".office_address")
marketplace_details = _builder.get(
".properties.marketplaceDetails")
if marketplace_details is not None:
marketplace_details.set_prop("offerDetails", AAZObjectType, ".offer_details", typ_kwargs={
"flags": {"required": True}})
marketplace_details.set_prop(
"subscriptionId", AAZStrType, ".subscription_id")
marketplace_details.set_prop(
"subscriptionStatus", AAZStrType, ".subscription_status")
offer_details = _builder.get(
".properties.marketplaceDetails.offerDetails")
if offer_details is not None:
offer_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={
"flags": {"required": True}})
offer_details.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={
"flags": {"required": True}})
offer_details.set_prop("planName", AAZStrType, ".plan_name")
offer_details.set_prop("publisherId", AAZStrType, ".publisher_id", typ_kwargs={
"flags": {"required": True}})
offer_details.set_prop("termId", AAZStrType, ".term_id")
offer_details.set_prop("termUnit", AAZStrType, ".term_unit")
partner_organization_properties = _builder.get(
".properties.partnerOrganizationProperties")
if partner_organization_properties is not None:
partner_organization_properties.set_prop(
"organizationId", AAZStrType, ".organization_id")
partner_organization_properties.set_prop(
"organizationName", AAZStrType, ".org_name", typ_kwargs={"flags": {"required": True}})
partner_organization_properties.set_prop(
"singleSignOnProperties", AAZObjectType, ".single_sign_on_properties")
single_sign_on_properties = _builder.get(
".properties.partnerOrganizationProperties.singleSignOnProperties")
if single_sign_on_properties is not None:
single_sign_on_properties.set_prop(
"aadDomains", AAZListType, ".aad_domains")
single_sign_on_properties.set_prop(
"enterpriseAppId", AAZStrType, ".enterprise_app_id")
single_sign_on_properties.set_prop(
"singleSignOnState", AAZStrType, ".single_sign_on_state")
single_sign_on_properties.set_prop(
"singleSignOnUrl", AAZStrType, ".single_sign_on_url")
aad_domains = _builder.get(
".properties.partnerOrganizationProperties.singleSignOnProperties.aadDomains")
if aad_domains is not None:
aad_domains.set_elements(AAZStrType, ".")
user_details = _builder.get(".properties.userDetails")
if user_details is not None:
user_details.set_prop(
"emailAddress", AAZStrType, ".email_address")
user_details.set_prop("firstName", AAZStrType, ".first_name")
user_details.set_prop("lastName", AAZStrType, ".last_name")
user_details.set_prop(
"phoneNumber", AAZStrType, ".phone_number")
user_details.set_prop("upn", AAZStrType, ".upn")
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()
_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.company_details = AAZObjectType(
serialized_name="companyDetails",
flags={"required": True},
)
properties.marketplace_details = AAZObjectType(
serialized_name="marketplaceDetails",
flags={"required": True},
)
properties.partner_organization_properties = AAZObjectType(
serialized_name="partnerOrganizationProperties",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.user_details = AAZObjectType(
serialized_name="userDetails",
flags={"required": True},
)
company_details = cls._schema_on_200_201.properties.company_details
company_details.business_phone = AAZStrType(
serialized_name="businessPhone",
)
company_details.company_name = AAZStrType(
serialized_name="companyName",
)
company_details.country = AAZStrType()
company_details.domain = AAZStrType()
company_details.number_of_employees = AAZIntType(
serialized_name="numberOfEmployees",
)
company_details.office_address = AAZStrType(
serialized_name="officeAddress",
)
marketplace_details = cls._schema_on_200_201.properties.marketplace_details
marketplace_details.offer_details = AAZObjectType(
serialized_name="offerDetails",
flags={"required": True},
)
marketplace_details.subscription_id = AAZStrType(
serialized_name="subscriptionId",
)
marketplace_details.subscription_status = AAZStrType(
serialized_name="subscriptionStatus",
)
offer_details = cls._schema_on_200_201.properties.marketplace_details.offer_details
offer_details.offer_id = AAZStrType(
serialized_name="offerId",
flags={"required": True},
)
offer_details.plan_id = AAZStrType(
serialized_name="planId",
flags={"required": True},
)
offer_details.plan_name = AAZStrType(
serialized_name="planName",
)
offer_details.publisher_id = AAZStrType(
serialized_name="publisherId",
flags={"required": True},
)
offer_details.term_id = AAZStrType(
serialized_name="termId",
)
offer_details.term_unit = AAZStrType(
serialized_name="termUnit",
)
partner_organization_properties = cls._schema_on_200_201.properties.partner_organization_properties
partner_organization_properties.organization_id = AAZStrType(
serialized_name="organizationId",
)
partner_organization_properties.organization_name = AAZStrType(
serialized_name="organizationName",
flags={"required": True},
)
partner_organization_properties.single_sign_on_properties = AAZObjectType(
serialized_name="singleSignOnProperties",
)
single_sign_on_properties = cls._schema_on_200_201.properties.partner_organization_properties.single_sign_on_properties
single_sign_on_properties.aad_domains = AAZListType(
serialized_name="aadDomains",
)
single_sign_on_properties.enterprise_app_id = AAZStrType(
serialized_name="enterpriseAppId",
)
single_sign_on_properties.single_sign_on_state = AAZStrType(
serialized_name="singleSignOnState",
)
single_sign_on_properties.single_sign_on_url = AAZStrType(
serialized_name="singleSignOnUrl",
)
aad_domains = cls._schema_on_200_201.properties.partner_organization_properties.single_sign_on_properties.aad_domains
aad_domains.Element = AAZStrType()
user_details = cls._schema_on_200_201.properties.user_details
user_details.email_address = AAZStrType(
serialized_name="emailAddress",
)
user_details.first_name = AAZStrType(
serialized_name="firstName",
)
user_details.last_name = AAZStrType(
serialized_name="lastName",
)
user_details.phone_number = AAZStrType(
serialized_name="phoneNumber",
)
user_details.upn = 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 OrganizationsCreateOrUpdate(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 | 31 | 2 | 29 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 332 | 35 | 297 | 49 | 278 | 0 | 149 | 40 | 138 | 10 | 1 | 1 | 22 |
9,347 |
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/multicloud-connector/azext_multicloud_connector/tests/latest/test_multicloud_connector.py
|
azext_multicloud_connector.tests.latest.test_multicloud_connector.MulticloudConnectorScenario
|
class MulticloudConnectorScenario(ScenarioTest):
@ResourceGroupPreparer()
def test_public_cloud_connector(self, resource_group):
sub = self.get_subscription_id()
connector_name = "testConnector"
am_sc_name = "testAssetManagement"
afs_sc_name = "testArcOnboarding"
self.kwargs.update({
'name': f'{connector_name}',
'rg': resource_group,
'sub': f'{sub}',
'loc': 'eastus',
})
# test public-cloud-connector create
self.cmd(
'arc-multicloud public-cloud-connector create '
'--name {name} '
'--resource-group {rg} '
'--subscription {sub} '
'--host-type AWS '
'--aws-cloud-profile accountId=471112500375 isOrganizationalAccount=false '
'--location {loc}',
checks=[self.check('name', 'testConnector'),
self.check('type', 'microsoft.hybridconnectivity/publiccloudconnectors')]
)
self.kwargs.update({
'cid': f'subscriptions/{sub}/resourceGroups/{resource_group}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{connector_name}',
'am_sc_name': am_sc_name,
'type': 'Microsoft.AssetManagement',
'settings': 'periodicSync="true" cloudProviderServiceTypes="ec2,s3" awsGlobalReadOnly="true" cloudProviderRegions="us-east-1,us-east-2" periodicSyncTime="1"'
})
# create solution-configuration which is required for other API test
self.cmd(
'arc-multicloud solution-configuration create '
'--connector-id {cid} '
'--name {am_sc_name} '
'--solution-settings {settings} '
'--solution-type {type}',
checks=[self.check('name', 'testAssetManagement'),
self.check('type', 'microsoft.hybridconnectivity/solutionconfigurations')]
)
# test public-cloud-connector update
self.cmd(
'arc-multicloud public-cloud-connector update '
'--name {name} '
'--resource-group {rg} '
'--subscription {sub} '
'--aws-cloud-profile excluded-accounts=["123456789123"] '
'--tag testTag=test',
checks=[self.check('name', 'testConnector')]
)
# test public-cloud-connector test-permission
self.cmd(
'arc-multicloud public-cloud-connector test-permission '
'--name {name} '
'--resource-group {rg} '
'--subscription {sub} '
)
# test public-cloud-connector list
self.cmd(
'arc-multicloud public-cloud-connector list '
'--resource-group {rg} '
'--subscription {sub}',
checks=[self.check('[0].name', 'testConnector'),
self.check('[0].type', 'microsoft.hybridconnectivity/publiccloudconnectors')]
)
# test public-cloud-connector show
self.cmd(
'arc-multicloud public-cloud-connector show '
'--name {name} '
'--resource-group {rg} '
'--subscription {sub}',
checks=[self.check('name', 'testConnector'),
self.check('type', 'microsoft.hybridconnectivity/publiccloudconnectors')]
)
# test public-cloud-connector delete
self.cmd(
'arc-multicloud public-cloud-connector delete '
'--name {name} '
'--resource-group {rg} '
'-y'
)
@ResourceGroupPreparer()
def test_solution_configuration(self, resource_group):
sub = self.get_subscription_id()
connector_name = "testConnector"
am_sc_name = "testAssetManagement"
afs_sc_name = "testArcOnboarding"
# First, create public-cloud-connector
self.cmd(
'arc-multicloud public-cloud-connector create '
f'--name {connector_name} '
f'--resource-group {resource_group} '
f'--subscription {sub} '
'--host-type AWS '
'--aws-cloud-profile accountId=471112500375 '
'--location eastus'
)
self.kwargs.update({
'cid': f'subscriptions/{sub}/resourceGroups/{resource_group}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{connector_name}',
'name': am_sc_name,
'type': 'Microsoft.AssetManagement',
'settings': 'periodicSync="true" cloudProviderServiceTypes="ec2,s3" awsGlobalReadOnly="true" cloudProviderRegions="us-east-1,us-east-2" periodicSyncTime="1"'
})
# test solution-configuration create
self.cmd(
'arc-multicloud solution-configuration create '
'--connector-id {cid} '
'--name {name} '
'--solution-settings {settings} '
'--solution-type {type}',
checks=[self.check('name', 'testAssetManagement'),
self.check('type', 'microsoft.hybridconnectivity/solutionconfigurations')]
)
# test solution-configuration list
self.cmd(
'arc-multicloud solution-configuration list '
'--connector-id {cid}',
checks=[self.check('[0].name', 'testAssetManagement'),
self.check('[0].type', 'microsoft.hybridconnectivity/solutionconfigurations')]
)
# test solution-configuration show
self.cmd(
'arc-multicloud solution-configuration show '
'--connector-id {cid} '
'--name {name}',
checks=[self.check('name', 'testAssetManagement'),
self.check('type', 'microsoft.hybridconnectivity/solutionconfigurations')]
)
# test solution-configuration update
self.kwargs.update({
'settings': 'periodicSync="true" periodicSyncTime="2"'
})
self.cmd(
'arc-multicloud solution-configuration update '
'--connector-id {cid} '
'--name {name} '
'--solution-settings {settings} '
'--solution-type {type}',
checks=[self.check(
'properties.solutionSettings.periodicSyncTime', 2)]
)
# test solution-configuration delete
self.cmd(
'arc-multicloud solution-configuration delete '
'--connector-id {cid} '
'--name {name} '
'-y'
)
@ResourceGroupPreparer()
def test_solution_types(self, resource_group):
sub = self.get_subscription_id()
self.kwargs.update({
'rg': resource_group,
'sub': f'{sub}',
'name': 'Microsoft.AssetManagement'
})
# test solution-type show
self.cmd(
'arc-multicloud solution-type show '
'--name {name} '
'--resource-group {rg} '
'--subscription {sub}',
checks=[self.check('properties.solutionType', '{name}')]
)
# test solution-type list
self.cmd(
'arc-multicloud solution-type list '
'--resource-group {rg} '
'--subscription {sub}',
checks=[self.check('length(@)', 2)]
)
|
class MulticloudConnectorScenario(ScenarioTest):
@ResourceGroupPreparer()
def test_public_cloud_connector(self, resource_group):
pass
@ResourceGroupPreparer()
def test_solution_configuration(self, resource_group):
pass
@ResourceGroupPreparer()
def test_solution_types(self, resource_group):
pass
| 7 | 0 | 62 | 6 | 51 | 5 | 1 | 0.1 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 192 | 21 | 156 | 16 | 149 | 15 | 33 | 13 | 29 | 1 | 1 | 0 | 3 |
9,348 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_update.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_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("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("exporters", AAZListType, ".exporters", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("networkingConfigurations",
AAZListType, ".network_config")
properties.set_prop("processors", AAZListType, ".processors", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("receivers", AAZListType, ".receivers", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("replicas", AAZIntType, ".replicas")
properties.set_prop("service", AAZObjectType, ".service", typ_kwargs={
"flags": {"required": True}})
exporters = _builder.get(".properties.exporters")
if exporters is not None:
exporters.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.exporters[]")
if _elements is not None:
_elements.set_prop("azureMonitorWorkspaceLogs",
AAZObjectType, ".azure_monitor_workspace_logs")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("tcp", AAZObjectType, ".tcp")
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
azure_monitor_workspace_logs = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs")
if azure_monitor_workspace_logs is not None:
azure_monitor_workspace_logs.set_prop(
"api", AAZObjectType, ".api", typ_kwargs={"flags": {"required": True}})
azure_monitor_workspace_logs.set_prop(
"cache", AAZObjectType, ".cache")
azure_monitor_workspace_logs.set_prop(
"concurrency", AAZObjectType, ".concurrency")
api = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api")
if api is not None:
api.set_prop("dataCollectionEndpointUrl", AAZStrType,
".data_collection_endpoint_url", typ_kwargs={"flags": {"required": True}})
api.set_prop("dataCollectionRule", AAZStrType, ".data_collection_rule", typ_kwargs={
"flags": {"required": True}})
api.set_prop("schema", AAZObjectType, ".schema",
typ_kwargs={"flags": {"required": True}})
api.set_prop("stream", AAZStrType, ".stream",
typ_kwargs={"flags": {"required": True}})
schema = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema")
if schema is not None:
schema.set_prop("recordMap", AAZListType, ".record_map", typ_kwargs={
"flags": {"required": True}})
schema.set_prop("resourceMap", AAZListType, ".resource_map")
schema.set_prop("scopeMap", AAZListType, ".scope_map")
record_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.recordMap")
if record_map is not None:
record_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.recordMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
resource_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.resourceMap")
if resource_map is not None:
resource_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.resourceMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
scope_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.scopeMap")
if scope_map is not None:
scope_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.scopeMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
cache = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.cache")
if cache is not None:
cache.set_prop("maxStorageUsage", AAZIntType,
".max_storage_usage")
cache.set_prop("retentionPeriod", AAZIntType,
".retention_period")
concurrency = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.concurrency")
if concurrency is not None:
concurrency.set_prop(
"batchQueueSize", AAZIntType, ".batch_queue_size")
concurrency.set_prop(
"workerCount", AAZIntType, ".worker_count")
tcp = _builder.get(".properties.exporters[].tcp")
if tcp is not None:
tcp.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
networking_configurations = _builder.get(
".properties.networkingConfigurations")
if networking_configurations is not None:
networking_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.networkingConfigurations[]")
if _elements is not None:
_elements.set_prop("externalNetworkingMode", AAZStrType, ".external_networking_mode", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("host", AAZStrType, ".host")
_elements.set_prop("routes", AAZListType, ".routes", typ_kwargs={
"flags": {"required": True}})
routes = _builder.get(
".properties.networkingConfigurations[].routes")
if routes is not None:
routes.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkingConfigurations[].routes[]")
if _elements is not None:
_elements.set_prop("path", AAZStrType, ".path")
_elements.set_prop("port", AAZIntType, ".port")
_elements.set_prop("receiver", AAZStrType, ".receiver", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("subdomain", AAZStrType, ".subdomain")
processors = _builder.get(".properties.processors")
if processors is not None:
processors.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.processors[]")
if _elements is not None:
_elements.set_prop("batch", AAZObjectType, ".batch")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
batch = _builder.get(".properties.processors[].batch")
if batch is not None:
batch.set_prop("batchSize", AAZIntType, ".batch_size")
batch.set_prop("timeout", AAZIntType, ".timeout")
receivers = _builder.get(".properties.receivers")
if receivers is not None:
receivers.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.receivers[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("otlp", AAZObjectType, ".otlp")
_elements.set_prop("syslog", AAZObjectType, ".syslog")
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("udp", AAZObjectType, ".udp")
otlp = _builder.get(".properties.receivers[].otlp")
if otlp is not None:
otlp.set_prop("endpoint", AAZStrType, ".endpoint",
typ_kwargs={"flags": {"required": True}})
syslog = _builder.get(".properties.receivers[].syslog")
if syslog is not None:
syslog.set_prop("endpoint", AAZStrType, ".endpoint", typ_kwargs={
"flags": {"required": True}})
syslog.set_prop("protocol", AAZStrType, ".protocol")
udp = _builder.get(".properties.receivers[].udp")
if udp is not None:
udp.set_prop("encoding", AAZStrType, ".encoding")
udp.set_prop("endpoint", AAZStrType, ".endpoint",
typ_kwargs={"flags": {"required": True}})
udp.set_prop("jsonArrayMapper", AAZObjectType,
".json_array_mapper")
udp.set_prop("readQueueLength", AAZIntType,
".read_queue_length")
json_array_mapper = _builder.get(
".properties.receivers[].udp.jsonArrayMapper")
if json_array_mapper is not None:
json_array_mapper.set_prop(
"destinationField", AAZObjectType, ".destination_field")
json_array_mapper.set_prop("keys", AAZListType, ".keys", typ_kwargs={
"flags": {"required": True}})
json_array_mapper.set_prop(
"sourceField", AAZObjectType, ".source_field")
destination_field = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.destinationField")
if destination_field is not None:
destination_field.set_prop(
"destination", AAZStrType, ".destination")
destination_field.set_prop(
"fieldName", AAZStrType, ".field_name")
keys = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.keys")
if keys is not None:
keys.set_elements(AAZStrType, ".")
source_field = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.sourceField")
if source_field is not None:
source_field.set_prop("fieldName", AAZStrType, ".field_name")
service = _builder.get(".properties.service")
if service is not None:
service.set_prop("persistence", AAZObjectType, ".persistence")
service.set_prop("pipelines", AAZListType, ".pipelines", typ_kwargs={
"flags": {"required": True}})
persistence = _builder.get(".properties.service.persistence")
if persistence is not None:
persistence.set_prop("persistentVolumeName", AAZStrType, ".persistent_volume_name", typ_kwargs={
"flags": {"required": True}})
pipelines = _builder.get(".properties.service.pipelines")
if pipelines is not None:
pipelines.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.service.pipelines[]")
if _elements is not None:
_elements.set_prop("exporters", AAZListType, ".exporters", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("processors", AAZListType, ".processors")
_elements.set_prop("receivers", AAZListType, ".receivers", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
exporters = _builder.get(
".properties.service.pipelines[].exporters")
if exporters is not None:
exporters.set_elements(AAZStrType, ".")
processors = _builder.get(
".properties.service.pipelines[].processors")
if processors is not None:
processors.set_elements(AAZStrType, ".")
receivers = _builder.get(
".properties.service.pipelines[].receivers")
if receivers is not None:
receivers.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 | 106 | 20 | 86 | 0 | 21 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 215 | 42 | 173 | 32 | 170 | 0 | 169 | 32 | 166 | 40 | 1 | 1 | 41 |
9,349 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_list.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._list.List.PipelineGroupsListBySubscription
|
class PipelineGroupsListBySubscription(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.Monitor/pipelineGroups",
**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-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(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.extended_location = AAZObjectType(
serialized_name="extendedLocation",
)
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
extended_location = cls._schema_on_200.value.Element.extended_location
extended_location.name = AAZStrType(
flags={"required": True},
)
extended_location.type = AAZStrType(
flags={"required": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.exporters = AAZListType(
flags={"required": True},
)
properties.networking_configurations = AAZListType(
serialized_name="networkingConfigurations",
)
properties.processors = AAZListType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.receivers = AAZListType(
flags={"required": True},
)
properties.replicas = AAZIntType()
properties.service = AAZObjectType(
flags={"required": True},
)
exporters = cls._schema_on_200.value.Element.properties.exporters
exporters.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element
_element.azure_monitor_workspace_logs = AAZObjectType(
serialized_name="azureMonitorWorkspaceLogs",
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.tcp = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
azure_monitor_workspace_logs = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs
azure_monitor_workspace_logs.api = AAZObjectType(
flags={"required": True},
)
azure_monitor_workspace_logs.cache = AAZObjectType()
azure_monitor_workspace_logs.concurrency = AAZObjectType()
api = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api
api.data_collection_endpoint_url = AAZStrType(
serialized_name="dataCollectionEndpointUrl",
flags={"required": True},
)
api.data_collection_rule = AAZStrType(
serialized_name="dataCollectionRule",
flags={"required": True},
)
api.schema = AAZObjectType(
flags={"required": True},
)
api.stream = AAZStrType(
flags={"required": True},
)
schema = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema
schema.record_map = AAZListType(
serialized_name="recordMap",
flags={"required": True},
)
schema.resource_map = AAZListType(
serialized_name="resourceMap",
)
schema.scope_map = AAZListType(
serialized_name="scopeMap",
)
record_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map
record_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
resource_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map
resource_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
scope_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map
scope_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
cache = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.cache
cache.max_storage_usage = AAZIntType(
serialized_name="maxStorageUsage",
)
cache.retention_period = AAZIntType(
serialized_name="retentionPeriod",
)
concurrency = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.concurrency
concurrency.batch_queue_size = AAZIntType(
serialized_name="batchQueueSize",
)
concurrency.worker_count = AAZIntType(
serialized_name="workerCount",
)
tcp = cls._schema_on_200.value.Element.properties.exporters.Element.tcp
tcp.url = AAZStrType(
flags={"required": True},
)
networking_configurations = cls._schema_on_200.value.Element.properties.networking_configurations
networking_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networking_configurations.Element
_element.external_networking_mode = AAZStrType(
serialized_name="externalNetworkingMode",
flags={"required": True},
)
_element.host = AAZStrType()
_element.routes = AAZListType(
flags={"required": True},
)
routes = cls._schema_on_200.value.Element.properties.networking_configurations.Element.routes
routes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networking_configurations.Element.routes.Element
_element.path = AAZStrType()
_element.port = AAZIntType()
_element.receiver = AAZStrType(
flags={"required": True},
)
_element.subdomain = AAZStrType()
processors = cls._schema_on_200.value.Element.properties.processors
processors.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.processors.Element
_element.batch = AAZObjectType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
batch = cls._schema_on_200.value.Element.properties.processors.Element.batch
batch.batch_size = AAZIntType(
serialized_name="batchSize",
)
batch.timeout = AAZIntType()
receivers = cls._schema_on_200.value.Element.properties.receivers
receivers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.receivers.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.otlp = AAZObjectType()
_element.syslog = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
_element.udp = AAZObjectType()
otlp = cls._schema_on_200.value.Element.properties.receivers.Element.otlp
otlp.endpoint = AAZStrType(
flags={"required": True},
)
syslog = cls._schema_on_200.value.Element.properties.receivers.Element.syslog
syslog.endpoint = AAZStrType(
flags={"required": True},
)
syslog.protocol = AAZStrType()
udp = cls._schema_on_200.value.Element.properties.receivers.Element.udp
udp.encoding = AAZStrType()
udp.endpoint = AAZStrType(
flags={"required": True},
)
udp.json_array_mapper = AAZObjectType(
serialized_name="jsonArrayMapper",
)
udp.read_queue_length = AAZIntType(
serialized_name="readQueueLength",
)
json_array_mapper = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper
json_array_mapper.destination_field = AAZObjectType(
serialized_name="destinationField",
)
json_array_mapper.keys = AAZListType(
flags={"required": True},
)
json_array_mapper.source_field = AAZObjectType(
serialized_name="sourceField",
)
destination_field = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.destination_field
destination_field.destination = AAZStrType()
destination_field.field_name = AAZStrType(
serialized_name="fieldName",
)
keys = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.keys
keys.Element = AAZStrType()
source_field = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.source_field
source_field.field_name = AAZStrType(
serialized_name="fieldName",
)
service = cls._schema_on_200.value.Element.properties.service
service.persistence = AAZObjectType()
service.pipelines = AAZListType(
flags={"required": True},
)
persistence = cls._schema_on_200.value.Element.properties.service.persistence
persistence.persistent_volume_name = AAZStrType(
serialized_name="persistentVolumeName",
flags={"required": True},
)
pipelines = cls._schema_on_200.value.Element.properties.service.pipelines
pipelines.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.service.pipelines.Element
_element.exporters = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.processors = AAZListType()
_element.receivers = AAZListType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
exporters = cls._schema_on_200.value.Element.properties.service.pipelines.Element.exporters
exporters.Element = AAZStrType()
processors = cls._schema_on_200.value.Element.properties.service.pipelines.Element.processors
processors.Element = AAZStrType()
receivers = cls._schema_on_200.value.Element.properties.service.pipelines.Element.receivers
receivers.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 PipelineGroupsListBySubscription(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 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 407 | 57 | 350 | 57 | 333 | 0 | 179 | 50 | 169 | 2 | 1 | 1 | 11 |
9,350 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_list.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._list.List.PipelineGroupsListByResourceGroup
|
class PipelineGroupsListByResourceGroup(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.Monitor/pipelineGroups",
**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-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(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.extended_location = AAZObjectType(
serialized_name="extendedLocation",
)
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
extended_location = cls._schema_on_200.value.Element.extended_location
extended_location.name = AAZStrType(
flags={"required": True},
)
extended_location.type = AAZStrType(
flags={"required": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.exporters = AAZListType(
flags={"required": True},
)
properties.networking_configurations = AAZListType(
serialized_name="networkingConfigurations",
)
properties.processors = AAZListType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.receivers = AAZListType(
flags={"required": True},
)
properties.replicas = AAZIntType()
properties.service = AAZObjectType(
flags={"required": True},
)
exporters = cls._schema_on_200.value.Element.properties.exporters
exporters.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element
_element.azure_monitor_workspace_logs = AAZObjectType(
serialized_name="azureMonitorWorkspaceLogs",
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.tcp = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
azure_monitor_workspace_logs = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs
azure_monitor_workspace_logs.api = AAZObjectType(
flags={"required": True},
)
azure_monitor_workspace_logs.cache = AAZObjectType()
azure_monitor_workspace_logs.concurrency = AAZObjectType()
api = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api
api.data_collection_endpoint_url = AAZStrType(
serialized_name="dataCollectionEndpointUrl",
flags={"required": True},
)
api.data_collection_rule = AAZStrType(
serialized_name="dataCollectionRule",
flags={"required": True},
)
api.schema = AAZObjectType(
flags={"required": True},
)
api.stream = AAZStrType(
flags={"required": True},
)
schema = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema
schema.record_map = AAZListType(
serialized_name="recordMap",
flags={"required": True},
)
schema.resource_map = AAZListType(
serialized_name="resourceMap",
)
schema.scope_map = AAZListType(
serialized_name="scopeMap",
)
record_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map
record_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
resource_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map
resource_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
scope_map = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map
scope_map.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
cache = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.cache
cache.max_storage_usage = AAZIntType(
serialized_name="maxStorageUsage",
)
cache.retention_period = AAZIntType(
serialized_name="retentionPeriod",
)
concurrency = cls._schema_on_200.value.Element.properties.exporters.Element.azure_monitor_workspace_logs.concurrency
concurrency.batch_queue_size = AAZIntType(
serialized_name="batchQueueSize",
)
concurrency.worker_count = AAZIntType(
serialized_name="workerCount",
)
tcp = cls._schema_on_200.value.Element.properties.exporters.Element.tcp
tcp.url = AAZStrType(
flags={"required": True},
)
networking_configurations = cls._schema_on_200.value.Element.properties.networking_configurations
networking_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networking_configurations.Element
_element.external_networking_mode = AAZStrType(
serialized_name="externalNetworkingMode",
flags={"required": True},
)
_element.host = AAZStrType()
_element.routes = AAZListType(
flags={"required": True},
)
routes = cls._schema_on_200.value.Element.properties.networking_configurations.Element.routes
routes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networking_configurations.Element.routes.Element
_element.path = AAZStrType()
_element.port = AAZIntType()
_element.receiver = AAZStrType(
flags={"required": True},
)
_element.subdomain = AAZStrType()
processors = cls._schema_on_200.value.Element.properties.processors
processors.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.processors.Element
_element.batch = AAZObjectType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
batch = cls._schema_on_200.value.Element.properties.processors.Element.batch
batch.batch_size = AAZIntType(
serialized_name="batchSize",
)
batch.timeout = AAZIntType()
receivers = cls._schema_on_200.value.Element.properties.receivers
receivers.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.receivers.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.otlp = AAZObjectType()
_element.syslog = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
_element.udp = AAZObjectType()
otlp = cls._schema_on_200.value.Element.properties.receivers.Element.otlp
otlp.endpoint = AAZStrType(
flags={"required": True},
)
syslog = cls._schema_on_200.value.Element.properties.receivers.Element.syslog
syslog.endpoint = AAZStrType(
flags={"required": True},
)
syslog.protocol = AAZStrType()
udp = cls._schema_on_200.value.Element.properties.receivers.Element.udp
udp.encoding = AAZStrType()
udp.endpoint = AAZStrType(
flags={"required": True},
)
udp.json_array_mapper = AAZObjectType(
serialized_name="jsonArrayMapper",
)
udp.read_queue_length = AAZIntType(
serialized_name="readQueueLength",
)
json_array_mapper = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper
json_array_mapper.destination_field = AAZObjectType(
serialized_name="destinationField",
)
json_array_mapper.keys = AAZListType(
flags={"required": True},
)
json_array_mapper.source_field = AAZObjectType(
serialized_name="sourceField",
)
destination_field = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.destination_field
destination_field.destination = AAZStrType()
destination_field.field_name = AAZStrType(
serialized_name="fieldName",
)
keys = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.keys
keys.Element = AAZStrType()
source_field = cls._schema_on_200.value.Element.properties.receivers.Element.udp.json_array_mapper.source_field
source_field.field_name = AAZStrType(
serialized_name="fieldName",
)
service = cls._schema_on_200.value.Element.properties.service
service.persistence = AAZObjectType()
service.pipelines = AAZListType(
flags={"required": True},
)
persistence = cls._schema_on_200.value.Element.properties.service.persistence
persistence.persistent_volume_name = AAZStrType(
serialized_name="persistentVolumeName",
flags={"required": True},
)
pipelines = cls._schema_on_200.value.Element.properties.service.pipelines
pipelines.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.service.pipelines.Element
_element.exporters = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.processors = AAZListType()
_element.receivers = AAZListType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
exporters = cls._schema_on_200.value.Element.properties.service.pipelines.Element.exporters
exporters.Element = AAZStrType()
processors = cls._schema_on_200.value.Element.properties.service.pipelines.Element.processors
processors.Element = AAZStrType()
receivers = cls._schema_on_200.value.Element.properties.service.pipelines.Element.receivers
receivers.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 PipelineGroupsListByResourceGroup(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 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 411 | 57 | 354 | 57 | 337 | 0 | 179 | 50 | 169 | 2 | 1 | 1 | 11 |
9,351 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_delete.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._delete.Delete.PipelineGroupsDelete
|
class PipelineGroupsDelete(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.Monitor/pipelineGroups/{pipelineGroupName}",
**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(
"pipelineGroupName", self.ctx.args.pipeline_group_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-01-preview",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class PipelineGroupsDelete(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 |
9,352 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_create.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._create.Create.PipelineGroupsCreateOrUpdate
|
class PipelineGroupsCreateOrUpdate(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.Monitor/pipelineGroups/{pipelineGroupName}",
**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(
"pipelineGroupName", self.ctx.args.pipeline_group_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-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("extendedLocation",
AAZObjectType, ".extended_location")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
extended_location = _builder.get(".extendedLocation")
if extended_location is not None:
extended_location.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
extended_location.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("exporters", AAZListType, ".exporters", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("networkingConfigurations",
AAZListType, ".network_config")
properties.set_prop("processors", AAZListType, ".processors", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("receivers", AAZListType, ".receivers", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("replicas", AAZIntType, ".replicas")
properties.set_prop("service", AAZObjectType, ".service", typ_kwargs={
"flags": {"required": True}})
exporters = _builder.get(".properties.exporters")
if exporters is not None:
exporters.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.exporters[]")
if _elements is not None:
_elements.set_prop("azureMonitorWorkspaceLogs",
AAZObjectType, ".azure_monitor_workspace_logs")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("tcp", AAZObjectType, ".tcp")
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
azure_monitor_workspace_logs = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs")
if azure_monitor_workspace_logs is not None:
azure_monitor_workspace_logs.set_prop(
"api", AAZObjectType, ".api", typ_kwargs={"flags": {"required": True}})
azure_monitor_workspace_logs.set_prop(
"cache", AAZObjectType, ".cache")
azure_monitor_workspace_logs.set_prop(
"concurrency", AAZObjectType, ".concurrency")
api = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api")
if api is not None:
api.set_prop("dataCollectionEndpointUrl", AAZStrType,
".data_collection_endpoint_url", typ_kwargs={"flags": {"required": True}})
api.set_prop("dataCollectionRule", AAZStrType, ".data_collection_rule", typ_kwargs={
"flags": {"required": True}})
api.set_prop("schema", AAZObjectType, ".schema",
typ_kwargs={"flags": {"required": True}})
api.set_prop("stream", AAZStrType, ".stream",
typ_kwargs={"flags": {"required": True}})
schema = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema")
if schema is not None:
schema.set_prop("recordMap", AAZListType, ".record_map", typ_kwargs={
"flags": {"required": True}})
schema.set_prop("resourceMap", AAZListType, ".resource_map")
schema.set_prop("scopeMap", AAZListType, ".scope_map")
record_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.recordMap")
if record_map is not None:
record_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.recordMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
resource_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.resourceMap")
if resource_map is not None:
resource_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.resourceMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
scope_map = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.scopeMap")
if scope_map is not None:
scope_map.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.api.schema.scopeMap[]")
if _elements is not None:
_elements.set_prop("from", AAZStrType, ".from_", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("to", AAZStrType, ".to", typ_kwargs={
"flags": {"required": True}})
cache = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.cache")
if cache is not None:
cache.set_prop("maxStorageUsage", AAZIntType,
".max_storage_usage")
cache.set_prop("retentionPeriod", AAZIntType,
".retention_period")
concurrency = _builder.get(
".properties.exporters[].azureMonitorWorkspaceLogs.concurrency")
if concurrency is not None:
concurrency.set_prop(
"batchQueueSize", AAZIntType, ".batch_queue_size")
concurrency.set_prop(
"workerCount", AAZIntType, ".worker_count")
tcp = _builder.get(".properties.exporters[].tcp")
if tcp is not None:
tcp.set_prop("url", AAZStrType, ".url", typ_kwargs={
"flags": {"required": True}})
networking_configurations = _builder.get(
".properties.networkingConfigurations")
if networking_configurations is not None:
networking_configurations.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.networkingConfigurations[]")
if _elements is not None:
_elements.set_prop("externalNetworkingMode", AAZStrType, ".external_networking_mode", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("host", AAZStrType, ".host")
_elements.set_prop("routes", AAZListType, ".routes", typ_kwargs={
"flags": {"required": True}})
routes = _builder.get(
".properties.networkingConfigurations[].routes")
if routes is not None:
routes.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkingConfigurations[].routes[]")
if _elements is not None:
_elements.set_prop("path", AAZStrType, ".path")
_elements.set_prop("port", AAZIntType, ".port")
_elements.set_prop("receiver", AAZStrType, ".receiver", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("subdomain", AAZStrType, ".subdomain")
processors = _builder.get(".properties.processors")
if processors is not None:
processors.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.processors[]")
if _elements is not None:
_elements.set_prop("batch", AAZObjectType, ".batch")
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
batch = _builder.get(".properties.processors[].batch")
if batch is not None:
batch.set_prop("batchSize", AAZIntType, ".batch_size")
batch.set_prop("timeout", AAZIntType, ".timeout")
receivers = _builder.get(".properties.receivers")
if receivers is not None:
receivers.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.receivers[]")
if _elements is not None:
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("otlp", AAZObjectType, ".otlp")
_elements.set_prop("syslog", AAZObjectType, ".syslog")
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("udp", AAZObjectType, ".udp")
otlp = _builder.get(".properties.receivers[].otlp")
if otlp is not None:
otlp.set_prop("endpoint", AAZStrType, ".endpoint",
typ_kwargs={"flags": {"required": True}})
syslog = _builder.get(".properties.receivers[].syslog")
if syslog is not None:
syslog.set_prop("endpoint", AAZStrType, ".endpoint", typ_kwargs={
"flags": {"required": True}})
syslog.set_prop("protocol", AAZStrType, ".protocol")
udp = _builder.get(".properties.receivers[].udp")
if udp is not None:
udp.set_prop("encoding", AAZStrType, ".encoding")
udp.set_prop("endpoint", AAZStrType, ".endpoint",
typ_kwargs={"flags": {"required": True}})
udp.set_prop("jsonArrayMapper", AAZObjectType,
".json_array_mapper")
udp.set_prop("readQueueLength", AAZIntType,
".read_queue_length")
json_array_mapper = _builder.get(
".properties.receivers[].udp.jsonArrayMapper")
if json_array_mapper is not None:
json_array_mapper.set_prop(
"destinationField", AAZObjectType, ".destination_field")
json_array_mapper.set_prop("keys", AAZListType, ".keys", typ_kwargs={
"flags": {"required": True}})
json_array_mapper.set_prop(
"sourceField", AAZObjectType, ".source_field")
destination_field = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.destinationField")
if destination_field is not None:
destination_field.set_prop(
"destination", AAZStrType, ".destination")
destination_field.set_prop(
"fieldName", AAZStrType, ".field_name")
keys = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.keys")
if keys is not None:
keys.set_elements(AAZStrType, ".")
source_field = _builder.get(
".properties.receivers[].udp.jsonArrayMapper.sourceField")
if source_field is not None:
source_field.set_prop("fieldName", AAZStrType, ".field_name")
service = _builder.get(".properties.service")
if service is not None:
service.set_prop("persistence", AAZObjectType, ".persistence")
service.set_prop("pipelines", AAZListType, ".pipelines", typ_kwargs={
"flags": {"required": True}})
persistence = _builder.get(".properties.service.persistence")
if persistence is not None:
persistence.set_prop("persistentVolumeName", AAZStrType, ".persistent_volume_name", typ_kwargs={
"flags": {"required": True}})
pipelines = _builder.get(".properties.service.pipelines")
if pipelines is not None:
pipelines.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.service.pipelines[]")
if _elements is not None:
_elements.set_prop("exporters", AAZListType, ".exporters", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("processors", AAZListType, ".processors")
_elements.set_prop("receivers", AAZListType, ".receivers", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
exporters = _builder.get(
".properties.service.pipelines[].exporters")
if exporters is not None:
exporters.set_elements(AAZStrType, ".")
processors = _builder.get(
".properties.service.pipelines[].processors")
if processors is not None:
processors.set_elements(AAZStrType, ".")
receivers = _builder.get(
".properties.service.pipelines[].receivers")
if receivers is not None:
receivers.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.extended_location = AAZObjectType(
serialized_name="extendedLocation",
)
_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()
_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},
)
extended_location = cls._schema_on_200_201.extended_location
extended_location.name = AAZStrType(
flags={"required": True},
)
extended_location.type = AAZStrType(
flags={"required": True},
)
properties = cls._schema_on_200_201.properties
properties.exporters = AAZListType(
flags={"required": True},
)
properties.networking_configurations = AAZListType(
serialized_name="networkingConfigurations",
)
properties.processors = AAZListType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.receivers = AAZListType(
flags={"required": True},
)
properties.replicas = AAZIntType()
properties.service = AAZObjectType(
flags={"required": True},
)
exporters = cls._schema_on_200_201.properties.exporters
exporters.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.exporters.Element
_element.azure_monitor_workspace_logs = AAZObjectType(
serialized_name="azureMonitorWorkspaceLogs",
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.tcp = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
azure_monitor_workspace_logs = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs
azure_monitor_workspace_logs.api = AAZObjectType(
flags={"required": True},
)
azure_monitor_workspace_logs.cache = AAZObjectType()
azure_monitor_workspace_logs.concurrency = AAZObjectType()
api = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api
api.data_collection_endpoint_url = AAZStrType(
serialized_name="dataCollectionEndpointUrl",
flags={"required": True},
)
api.data_collection_rule = AAZStrType(
serialized_name="dataCollectionRule",
flags={"required": True},
)
api.schema = AAZObjectType(
flags={"required": True},
)
api.stream = AAZStrType(
flags={"required": True},
)
schema = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema
schema.record_map = AAZListType(
serialized_name="recordMap",
flags={"required": True},
)
schema.resource_map = AAZListType(
serialized_name="resourceMap",
)
schema.scope_map = AAZListType(
serialized_name="scopeMap",
)
record_map = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map
record_map.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
resource_map = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map
resource_map.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
scope_map = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map
scope_map.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
cache = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.cache
cache.max_storage_usage = AAZIntType(
serialized_name="maxStorageUsage",
)
cache.retention_period = AAZIntType(
serialized_name="retentionPeriod",
)
concurrency = cls._schema_on_200_201.properties.exporters.Element.azure_monitor_workspace_logs.concurrency
concurrency.batch_queue_size = AAZIntType(
serialized_name="batchQueueSize",
)
concurrency.worker_count = AAZIntType(
serialized_name="workerCount",
)
tcp = cls._schema_on_200_201.properties.exporters.Element.tcp
tcp.url = AAZStrType(
flags={"required": True},
)
networking_configurations = cls._schema_on_200_201.properties.networking_configurations
networking_configurations.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.networking_configurations.Element
_element.external_networking_mode = AAZStrType(
serialized_name="externalNetworkingMode",
flags={"required": True},
)
_element.host = AAZStrType()
_element.routes = AAZListType(
flags={"required": True},
)
routes = cls._schema_on_200_201.properties.networking_configurations.Element.routes
routes.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.networking_configurations.Element.routes.Element
_element.path = AAZStrType()
_element.port = AAZIntType()
_element.receiver = AAZStrType(
flags={"required": True},
)
_element.subdomain = AAZStrType()
processors = cls._schema_on_200_201.properties.processors
processors.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.processors.Element
_element.batch = AAZObjectType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
batch = cls._schema_on_200_201.properties.processors.Element.batch
batch.batch_size = AAZIntType(
serialized_name="batchSize",
)
batch.timeout = AAZIntType()
receivers = cls._schema_on_200_201.properties.receivers
receivers.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.receivers.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.otlp = AAZObjectType()
_element.syslog = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
_element.udp = AAZObjectType()
otlp = cls._schema_on_200_201.properties.receivers.Element.otlp
otlp.endpoint = AAZStrType(
flags={"required": True},
)
syslog = cls._schema_on_200_201.properties.receivers.Element.syslog
syslog.endpoint = AAZStrType(
flags={"required": True},
)
syslog.protocol = AAZStrType()
udp = cls._schema_on_200_201.properties.receivers.Element.udp
udp.encoding = AAZStrType()
udp.endpoint = AAZStrType(
flags={"required": True},
)
udp.json_array_mapper = AAZObjectType(
serialized_name="jsonArrayMapper",
)
udp.read_queue_length = AAZIntType(
serialized_name="readQueueLength",
)
json_array_mapper = cls._schema_on_200_201.properties.receivers.Element.udp.json_array_mapper
json_array_mapper.destination_field = AAZObjectType(
serialized_name="destinationField",
)
json_array_mapper.keys = AAZListType(
flags={"required": True},
)
json_array_mapper.source_field = AAZObjectType(
serialized_name="sourceField",
)
destination_field = cls._schema_on_200_201.properties.receivers.Element.udp.json_array_mapper.destination_field
destination_field.destination = AAZStrType()
destination_field.field_name = AAZStrType(
serialized_name="fieldName",
)
keys = cls._schema_on_200_201.properties.receivers.Element.udp.json_array_mapper.keys
keys.Element = AAZStrType()
source_field = cls._schema_on_200_201.properties.receivers.Element.udp.json_array_mapper.source_field
source_field.field_name = AAZStrType(
serialized_name="fieldName",
)
service = cls._schema_on_200_201.properties.service
service.persistence = AAZObjectType()
service.pipelines = AAZListType(
flags={"required": True},
)
persistence = cls._schema_on_200_201.properties.service.persistence
persistence.persistent_volume_name = AAZStrType(
serialized_name="persistentVolumeName",
flags={"required": True},
)
pipelines = cls._schema_on_200_201.properties.service.pipelines
pipelines.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.service.pipelines.Element
_element.exporters = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.processors = AAZListType()
_element.receivers = AAZListType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
exporters = cls._schema_on_200_201.properties.service.pipelines.Element.exporters
exporters.Element = AAZStrType()
processors = cls._schema_on_200_201.properties.service.pipelines.Element.processors
processors.Element = AAZStrType()
receivers = cls._schema_on_200_201.properties.service.pipelines.Element.receivers
receivers.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 PipelineGroupsCreateOrUpdate(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 | 62 | 9 | 53 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 642 | 97 | 545 | 89 | 526 | 0 | 348 | 80 | 337 | 41 | 1 | 1 | 53 |
9,353 |
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/tests/latest/test_mobile_network.py
|
azext_mobile_network.tests.latest.test_mobile_network.MobileNetworkScenario
|
class MobileNetworkScenario(ScenarioTest):
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
self.cmd('mobile-network update -n {mobile_network} -g {rg} --tags {{tag:test,tag2:test2}}', checks=[
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network list -g {rg}', checks=[
self.check('[0].publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('[0].publicLandMobileNetworkIdentifier.mnc', '01'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network show -n {mobile_network} -g {rg}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network delete -n {mobile_network} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_site(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'site_name': self.create_random_name('site_', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
self.cmd('mobile-network site create --mobile-network-name {mobile_network} -n {site_name} -g {rg} ', checks=[
self.check('name', '{site_name}'),
])
self.cmd('mobile-network site update --mobile-network-name {mobile_network} -n {site_name} -g {rg} --tags {{tag:test,tag2:test2}}', checks=[
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network site list --mobile-network-name {mobile_network} -g {rg}', checks=[
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network site show --mobile-network-name {mobile_network} -n {site_name} -g {rg}', checks=[
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network site delete --mobile-network-name {mobile_network} -n {site_name} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_pccp(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'site_name': self.create_random_name('site_', 10),
'pccp_name': self.create_random_name('pccp_', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
site = self.cmd('mobile-network site create --mobile-network-name {mobile_network} -n {site_name} -g {rg} ', checks=[
self.check('name', '{site_name}'),
]).get_output_in_json()
self.kwargs.update({
'site_id': site['id']
})
self.cmd('mobile-network pccp create -n {pccp_name} -g {rg} --access-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}} --local-diagnostics {{authentication-type:AAD}} --platform {{type:AKS-HCI}} --sites [{{id:{site_id}}}] --sku G0', checks=[
self.check('controlPlaneAccessInterface.ipv4Address',
'10.28.128.2'),
self.check('controlPlaneAccessInterface.ipv4Gateway',
'10.28.128.1'),
self.check('controlPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('controlPlaneAccessInterface.name', 'N2'),
self.check('localDiagnosticsAccess.authenticationType', 'AAD'),
self.check('platform.type', 'AKS-HCI'),
self.check('name', '{pccp_name}'),
self.check('sku', 'G0'),
self.check('sites[0].id', '{site_id}')
])
self.cmd('mobile-network pccp update -n {pccp_name} -g {rg} --ue-mtu 1500 --tags {{tag:test,tag2:test2}}', checks=[
self.check('ueMtu', '1500'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network pccp list -g {rg} ', checks=[
self.check(
'[0].controlPlaneAccessInterface.ipv4Address', '10.28.128.2'),
self.check(
'[0].controlPlaneAccessInterface.ipv4Gateway', '10.28.128.1'),
self.check('[0].controlPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('[0].controlPlaneAccessInterface.name', 'N2'),
self.check('[0].localDiagnosticsAccess.authenticationType', 'AAD'),
self.check('[0].platform.type', 'AKS-HCI'),
self.check('[0].name', '{pccp_name}'),
self.check('[0].sku', 'G0'),
self.check('[0].ueMtu', '1500'),
])
self.cmd('mobile-network pccp show -n {pccp_name} -g {rg}', checks=[
self.check('controlPlaneAccessInterface.ipv4Address',
'10.28.128.2'),
self.check('controlPlaneAccessInterface.ipv4Gateway',
'10.28.128.1'),
self.check('controlPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('controlPlaneAccessInterface.name', 'N2'),
self.check('localDiagnosticsAccess.authenticationType', 'AAD'),
self.check('platform.type', 'AKS-HCI'),
self.check('name', '{pccp_name}'),
self.check('sku', 'G0'),
self.check('ueMtu', '1500'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network pccp version list')
self.cmd('mobile-network pccp version show --version-name pmn-2211-0-80', checks=[
self.check('name', 'pmn-2211-0-80')
])
self.cmd('mobile-network pccp delete -n {pccp_name} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_pcdp(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'site_name': self.create_random_name('site_', 10),
'pccp_name': self.create_random_name('pccp_', 10),
'pcdp_name': self.create_random_name('pcdp_', 10),
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
site = self.cmd('mobile-network site create --mobile-network-name {mobile_network} -n {site_name} -g {rg} ', checks=[
self.check('name', '{site_name}'),
]).get_output_in_json()
self.kwargs.update({
'site_id': site['id']
})
self.cmd('mobile-network pccp create -n {pccp_name} -g {rg} --access-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}} --local-diagnostics {{authentication-type:AAD}} --platform {{type:AKS-HCI}} --sites [{{id:{site_id}}}] --sku G0', checks=[
self.check('controlPlaneAccessInterface.ipv4Address',
'10.28.128.2'),
self.check('controlPlaneAccessInterface.ipv4Gateway',
'10.28.128.1'),
self.check('controlPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('controlPlaneAccessInterface.name', 'N2'),
self.check('localDiagnosticsAccess.authenticationType', 'AAD'),
self.check('platform.type', 'AKS-HCI'),
self.check('name', '{pccp_name}'),
self.check('sku', 'G0'),
self.check('sites[0].id', '{site_id}')
])
self.cmd('mobile-network pcdp create -n {pcdp_name} -g {rg} --pccp-name {pccp_name} --access-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}}', checks=[
self.check('userPlaneAccessInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneAccessInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('userPlaneAccessInterface.name', 'N2')
])
self.cmd('mobile-network pcdp update -n {pcdp_name} -g {rg} --pccp-name {pccp_name} --tags {{tag:test,tag2:test2}}', checks=[
self.check('userPlaneAccessInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneAccessInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('userPlaneAccessInterface.name', 'N2'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network pcdp list -g {rg} --pccp-name {pccp_name}', checks=[
self.check('[0].userPlaneAccessInterface.ipv4Address',
'10.28.128.2'),
self.check('[0].userPlaneAccessInterface.ipv4Gateway',
'10.28.128.1'),
self.check('[0].userPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('[0].userPlaneAccessInterface.name', 'N2'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network pcdp show -g {rg} -n {pcdp_name} --pccp-name {pccp_name}', checks=[
self.check('userPlaneAccessInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneAccessInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('userPlaneAccessInterface.name', 'N2'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network pcdp delete -g {rg} -n {pcdp_name} --pccp-name {pccp_name} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_data_network(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'data_network': self.create_random_name('dn', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
self.cmd('mobile-network data-network create -n {data_network} -g {rg} --mobile-network-name {mobile_network}', checks=[
self.check('name', '{data_network}')
])
self.cmd('mobile-network data-network update -n {data_network} -g {rg} --mobile-network-name {mobile_network} --tags {{tag:test,tag2:test2}}', checks=[
self.check('name', '{data_network}'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network data-network list --mobile-network-name {mobile_network} -g {rg} ', checks=[
self.check('[0].name', '{data_network}'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network data-network show -n {data_network} --mobile-network-name {mobile_network} -g {rg}', checks=[
self.check('name', '{data_network}'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network data-network delete -n {data_network} --mobile-network-name {mobile_network} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_attached_data_network(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'site_name': self.create_random_name('site_', 10),
'pccp_name': self.create_random_name('pccp', 10),
'pcdp_name': self.create_random_name('pcdp', 10),
'data_network': self.create_random_name('dn', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
site = self.cmd('mobile-network site create --mobile-network-name {mobile_network} -n {site_name} -g {rg} ', checks=[
self.check('name', '{site_name}'),
]).get_output_in_json()
self.kwargs.update({
'site_id': site['id']
})
self.cmd('mobile-network pccp create -n {pccp_name} -g {rg} --access-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}} --local-diagnostics {{authentication-type:AAD}} --platform {{type:AKS-HCI}} --sites [{{id:{site_id}}}] --sku G0', checks=[
self.check('controlPlaneAccessInterface.ipv4Address',
'10.28.128.2'),
self.check('controlPlaneAccessInterface.ipv4Gateway',
'10.28.128.1'),
self.check('controlPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('controlPlaneAccessInterface.name', 'N2'),
self.check('localDiagnosticsAccess.authenticationType', 'AAD'),
self.check('platform.type', 'AKS-HCI'),
self.check('name', '{pccp_name}'),
self.check('sku', 'G0'),
self.check('sites[0].id', '{site_id}')
])
self.cmd('mobile-network pcdp create -n {pcdp_name} -g {rg} --pccp-name {pccp_name} --access-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}}', checks=[
self.check('userPlaneAccessInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneAccessInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneAccessInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('userPlaneAccessInterface.name', 'N2')
])
self.cmd('mobile-network data-network create -n {data_network} -g {rg} --mobile-network-name {mobile_network}', checks=[
self.check('name', '{data_network}')
])
self.cmd('mobile-network attached-data-network create -n {data_network} -g {rg} --pccp-name {pccp_name} --pcdp-name {pcdp_name} --dns-addresses [1.1.1.1] --data-interface {{name:N2,ipv4Address:10.28.128.2,ipv4Subnet:10.28.128.0/24,ipv4Gateway:10.28.128.1}} --address-pool [2.2.0.0/16]', checks=[
self.check('dnsAddresses[0]', '1.1.1.1'),
self.check('userPlaneDataInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneDataInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneDataInterface.ipv4Subnet', '10.28.128.0/24'),
self.check('userPlaneDataInterface.name', 'N2')
])
self.cmd('mobile-network attached-data-network update -n {data_network} -g {rg} --pccp-name {pccp_name} --pcdp-name {pcdp_name} --tags {{tag:test,tag2:test2}}', checks=[
self.check('dnsAddresses[0]', '1.1.1.1'),
self.check('userPlaneDataInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneDataInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneDataInterface.ipv4Subnet', '10.28.128.0/24'),
self.check('userPlaneDataInterface.name', 'N2'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network attached-data-network list -g {rg} --pccp-name {pccp_name} --pcdp-name {pcdp_name}', checks=[
self.check('[0].dnsAddresses[0]', '1.1.1.1'),
self.check('[0].userPlaneDataInterface.ipv4Address',
'10.28.128.2'),
self.check('[0].userPlaneDataInterface.ipv4Gateway',
'10.28.128.1'),
self.check('[0].userPlaneDataInterface.ipv4Subnet',
'10.28.128.0/24'),
self.check('[0].userPlaneDataInterface.name', 'N2'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network attached-data-network show -n {data_network} --pccp-name {pccp_name} --pcdp-name {pcdp_name} -g {rg}', checks=[
self.check('dnsAddresses[0]', '1.1.1.1'),
self.check('userPlaneDataInterface.ipv4Address', '10.28.128.2'),
self.check('userPlaneDataInterface.ipv4Gateway', '10.28.128.1'),
self.check('userPlaneDataInterface.ipv4Subnet', '10.28.128.0/24'),
self.check('userPlaneDataInterface.name', 'N2'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network attached-data-network delete -n {data_network} --pccp-name {pccp_name} --pcdp-name {pcdp_name} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_service(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'service': self.create_random_name('ser', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
self.cmd('mobile-network service create -n {service} -g {rg} --mobile-network-name {mobile_network} --pcc-rules [{{ruleName:default-rule,rulePrecedence:10,serviceDataFlowTemplates:[{{templateName:IP-to-server,direction:Uplink,protocol:[ip],remoteIpList:[10.3.4.0/24]}}]}}] --service-precedence 10', checks=[
self.check('pccRules[0].ruleName', 'default-rule'),
self.check('pccRules[0].rulePrecedence', '10'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].direction', 'Uplink'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].protocol[0]', 'ip'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].remoteIpList[0]', '10.3.4.0/24'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].templateName', 'IP-to-server'),
self.check('servicePrecedence', '10')
])
self.cmd('mobile-network service update --mobile-network-name {mobile_network} -g {rg} -n {service} --tags {{tag:test,tag2:test2}}', checks=[
self.check('pccRules[0].ruleName', 'default-rule'),
self.check('pccRules[0].rulePrecedence', '10'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].direction', 'Uplink'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].protocol[0]', 'ip'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].remoteIpList[0]', '10.3.4.0/24'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].templateName', 'IP-to-server'),
self.check('servicePrecedence', '10'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network service list --mobile-network-name {mobile_network} -g {rg} ', checks=[
self.check('[0].pccRules[0].ruleName', 'default-rule'),
self.check('[0].pccRules[0].rulePrecedence', '10'),
self.check(
'[0].pccRules[0].serviceDataFlowTemplates[0].direction', 'Uplink'),
self.check(
'[0].pccRules[0].serviceDataFlowTemplates[0].protocol[0]', 'ip'),
self.check(
'[0].pccRules[0].serviceDataFlowTemplates[0].remoteIpList[0]', '10.3.4.0/24'),
self.check(
'[0].pccRules[0].serviceDataFlowTemplates[0].templateName', 'IP-to-server'),
self.check('[0].servicePrecedence', '10'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network service show --mobile-network-name {mobile_network} -n {service} -g {rg}', checks=[
self.check('pccRules[0].ruleName', 'default-rule'),
self.check('pccRules[0].rulePrecedence', '10'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].direction', 'Uplink'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].protocol[0]', 'ip'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].remoteIpList[0]', '10.3.4.0/24'),
self.check(
'pccRules[0].serviceDataFlowTemplates[0].templateName', 'IP-to-server'),
self.check('servicePrecedence', '10'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network service delete --mobile-network-name {mobile_network} -n {service} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_sim(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'sim_group': self.create_random_name('simgroup', 15),
'sim': self.create_random_name('sim', 10),
})
mobile_network = self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
]).get_output_in_json()
self.kwargs.update({
'mobile_network_id': mobile_network['id']
})
self.cmd('mobile-network sim group create -n {sim_group} -g {rg} --mobile-network {{id:{mobile_network_id}}}', checks=[
self.check('mobileNetwork.id', '{mobile_network_id}'),
self.check('name', '{sim_group}')
])
self.cmd('mobile-network sim group update -n {sim_group} -g {rg} --tags {{tag:test,tag2:test2}}', checks=[
self.check('mobileNetwork.id', '{mobile_network_id}'),
self.check('name', '{sim_group}'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network sim group list -g {rg}', checks=[
self.check('[0].mobileNetwork.id', '{mobile_network_id}'),
self.check('[0].name', '{sim_group}'),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network sim group show -n {sim_group} -g {rg}', checks=[
self.check('mobileNetwork.id', '{mobile_network_id}'),
self.check('name', '{sim_group}'),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network sim create -g {rg} --sim-group-name {sim_group} -n {sim} --international-msi 0000000000 --operator-key-code 00000000000000000000000000000000 --authentication-key 00000000000000000000000000000000', checks=[
self.check('internationalMobileSubscriberIdentity', '0000000000'),
self.check('name', '{sim}')
])
self.cmd('mobile-network sim list -g {rg} --sim-group-name {sim_group} ', checks=[
self.check(
'[0].internationalMobileSubscriberIdentity', '0000000000'),
self.check('[0].name', '{sim}')
])
self.cmd('mobile-network sim show -g {rg} -n {sim} --sim-group-name {sim_group} ', checks=[
self.check('internationalMobileSubscriberIdentity', '0000000000'),
self.check('name', '{sim}')
])
self.cmd(
'mobile-network sim delete -g {rg} -n {sim} --sim-group-name {sim_group} -y')
self.cmd('mobile-network sim group delete -n {sim_group} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_slice(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'slice': self.create_random_name('slice', 10)
})
self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
])
self.cmd('mobile-network slice create --mobile-network-name {mobile_network} -n {slice} -g {rg} --snssai {{sst:1,sd:123abc}}', checks=[
self.check('name', '{slice}'),
self.check('snssai.sd', '123abc'),
self.check('snssai.sst', 1)
])
self.cmd('mobile-network slice update --mobile-network-name {mobile_network} -n {slice} -g {rg} --tags {{tag:test,tag2:test2}}', checks=[
self.check('name', '{slice}'),
self.check('snssai.sd', '123abc'),
self.check('snssai.sst', 1),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd('mobile-network slice list --mobile-network-name {mobile_network} -g {rg}', checks=[
self.check('[0].name', '{slice}'),
self.check('[0].snssai.sd', '123abc'),
self.check('[0].snssai.sst', 1),
self.check('[0].tags.tag', 'test'),
self.check('[0].tags.tag2', 'test2')
])
self.cmd('mobile-network slice show --mobile-network-name {mobile_network} -n {slice} -g {rg}', checks=[
self.check('name', '{slice}'),
self.check('snssai.sd', '123abc'),
self.check('snssai.sst', 1),
self.check('tags.tag', 'test'),
self.check('tags.tag2', 'test2')
])
self.cmd(
'mobile-network slice delete --mobile-network-name {mobile_network} -n {slice} -g {rg} -y')
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='centraluseuap')
def test_mobile_network_bulk_sim_upload(self, resource_group):
self.kwargs.update({
'mobile_network': self.create_random_name('mobile_network_', 20),
'sim_group': self.create_random_name('simgroup', 15),
})
mobile_network = self.cmd('mobile-network create -n {mobile_network} -g {rg} --identifier {{mcc:001,mnc:01}}', checks=[
self.check('publicLandMobileNetworkIdentifier.mcc', '001'),
self.check('publicLandMobileNetworkIdentifier.mnc', '01')
]).get_output_in_json()
self.kwargs.update({
'mobile_network_id': mobile_network['id']
})
sim_group = self.cmd('mobile-network sim group create -n {sim_group} -g {rg} --mobile-network {{id:{mobile_network_id}}}', checks=[
self.check('mobileNetwork.id', '{mobile_network_id}'),
self.check('name', '{sim_group}')
]).get_output_in_json()
self.kwargs.update({
'sim_group_id': sim_group['id'],
'sims': '{name:bulk-upload-sim-01,authentication-key:00000000000000000000000000000000,operator-key-code:00000000000000000000000000000000,international-msi:0000000000},{name:bulk-upload-sim-02,authentication-key:00000000000000000000000000000001,operator-key-code:00000000000000000000000000000001,international-msi:0000000001}'
})
self.cmd('mobile-network sim group bulk-upload-sims -g {rg} --sim-group-name {sim_group} --sims ["{sims}"] ', checks=[
self.check('status', 'Succeeded')
])
self.cmd('mobile-network sim group bulk-delete-sims -g {rg} --sim-group-name {sim_group} --sims [bulk-upload-sim-01,bulk-upload-sim-02] ', checks=[
self.check('status', 'Succeeded')
])
self.cmd('mobile-network sim group delete -n {sim_group} -g {rg} -y')
|
class MobileNetworkScenario(ScenarioTest):
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_site(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_pccp(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_pcdp(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_data_network(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_attached_data_network(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_service(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_sim(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='eastus')
def test_mobile_network_slice(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_test_mobile_network', location='centraluseuap')
def test_mobile_network_bulk_sim_upload(self, resource_group):
pass
| 21 | 0 | 44 | 0 | 44 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 10 | 0 | 10 | 10 | 455 | 9 | 446 | 27 | 425 | 0 | 98 | 17 | 87 | 1 | 1 | 0 | 10 |
9,354 |
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/slice/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._wait.Wait.SlicesGet
|
class SlicesGet(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}/slices/{sliceName}",
**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(
"sliceName", self.ctx.args.slice_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.description = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.snssai = AAZObjectType(
flags={"required": True},
)
snssai = cls._schema_on_200.properties.snssai
snssai.sd = AAZStrType()
snssai.sst = AAZIntType(
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 SlicesGet(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 | 146 | 18 | 128 | 30 | 111 | 0 | 56 | 23 | 46 | 2 | 1 | 1 | 11 |
9,355 |
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/slice/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._update.Update.SlicesGet
|
class SlicesGet(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}/slices/{sliceName}",
**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(
"sliceName", self.ctx.args.slice_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_slice_read(cls._schema_on_200)
return cls._schema_on_200
|
class SlicesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,356 |
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/slice/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._update.Update.SlicesCreateOrUpdate
|
class SlicesCreateOrUpdate(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}/slices/{sliceName}",
**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(
"sliceName", self.ctx.args.slice_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_slice_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class SlicesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
9,357 |
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/slice/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._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:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("snssai", AAZObjectType, ".snssai", typ_kwargs={
"flags": {"required": True}})
snssai = _builder.get(".properties.snssai")
if snssai is not None:
snssai.set_prop("sd", AAZStrType, ".sd")
snssai.set_prop("sst", AAZIntType, ".sst", 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 | 13 | 2 | 11 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 2 | 29 | 6 | 23 | 7 | 20 | 0 | 19 | 7 | 16 | 4 | 1 | 1 | 5 |
9,358 |
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/slice/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._list.List.SlicesListByMobileNetwork
|
class SlicesListByMobileNetwork(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}/slices",
**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.description = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.snssai = AAZObjectType(
flags={"required": True},
)
snssai = cls._schema_on_200.value.Element.properties.snssai
snssai.sd = AAZStrType()
snssai.sst = AAZIntType(
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 SlicesListByMobileNetwork(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 152 | 20 | 132 | 32 | 115 | 0 | 61 | 25 | 51 | 2 | 1 | 1 | 11 |
9,359 |
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/slice/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._delete.Delete.SlicesDelete
|
class SlicesDelete(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}/slices/{sliceName}",
**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(
"sliceName", self.ctx.args.slice_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 SlicesDelete(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 |
9,360 |
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/slice/_create.py
|
azext_mobile_network.aaz.latest.mobile_network.slice._create.Create.SlicesCreateOrUpdate
|
class SlicesCreateOrUpdate(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}/slices/{sliceName}",
**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(
"sliceName", self.ctx.args.slice_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:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("snssai", AAZObjectType, ".snssai", typ_kwargs={
"flags": {"required": True}})
snssai = _builder.get(".properties.snssai")
if snssai is not None:
snssai.set_prop("sd", AAZStrType, ".sd")
snssai.set_prop("sst", AAZIntType, ".sst", 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.description = AAZStrType()
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.snssai = AAZObjectType(
flags={"required": True},
)
snssai = cls._schema_on_200_201.properties.snssai
snssai.sd = AAZStrType()
snssai.sst = AAZIntType(
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 SlicesCreateOrUpdate(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 | 17 | 1 | 16 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 192 | 23 | 169 | 37 | 150 | 0 | 75 | 28 | 64 | 4 | 1 | 1 | 16 |
9,361 |
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/site/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network.site._wait.Wait.SitesGet
|
class SitesGet(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}/sites/{siteName}",
**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(
"siteName", self.ctx.args.site_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={"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.network_functions = AAZListType(
serialized_name="networkFunctions",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
network_functions = cls._schema_on_200.properties.network_functions
network_functions.Element = AAZObjectType()
_element = cls._schema_on_200.properties.network_functions.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 SitesGet(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 | 148 | 19 | 129 | 31 | 112 | 0 | 56 | 24 | 46 | 2 | 1 | 1 | 11 |
9,362 |
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/site/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.site._update.Update.SitesGet
|
class SitesGet(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}/sites/{siteName}",
**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(
"siteName", self.ctx.args.site_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_site_read(cls._schema_on_200)
return cls._schema_on_200
|
class SitesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 86 | 13 | 73 | 25 | 56 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,363 |
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/site/_update.py
|
azext_mobile_network.aaz.latest.mobile_network.site._update.Update.SitesCreateOrUpdate
|
class SitesCreateOrUpdate(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}/sites/{siteName}",
**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(
"siteName", self.ctx.args.site_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_site_read(cls._schema_on_200_201)
return cls._schema_on_200_201
|
class SitesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 1 | 10 | 10 | 114 | 15 | 99 | 29 | 80 | 0 | 38 | 20 | 27 | 3 | 1 | 1 | 13 |
9,364 |
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/site/_list.py
|
azext_mobile_network.aaz.latest.mobile_network.site._list.List.SitesListByMobileNetwork
|
class SitesListByMobileNetwork(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}/sites",
**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={"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.network_functions = AAZListType(
serialized_name="networkFunctions",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
network_functions = cls._schema_on_200.value.Element.properties.network_functions
network_functions.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_functions.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 SitesListByMobileNetwork(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 154 | 21 | 133 | 32 | 116 | 0 | 61 | 25 | 51 | 2 | 1 | 1 | 11 |
9,365 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_update.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._update.Update.PipelineGroupsCreateOrUpdate
|
class PipelineGroupsCreateOrUpdate(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.Monitor/pipelineGroups/{pipelineGroupName}",
**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(
"pipelineGroupName", self.ctx.args.pipeline_group_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-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_pipeline_group_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class PipelineGroupsCreateOrUpdate(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 |
9,366 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_update.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._update.Update.PipelineGroupsGet
|
class PipelineGroupsGet(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.Monitor/pipelineGroups/{pipelineGroupName}",
**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(
"pipelineGroupName", self.ctx.args.pipeline_group_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-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_pipeline_group_read(cls._schema_on_200)
return cls._schema_on_200
|
class PipelineGroupsGet(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 |
9,367 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/aaz/latest/monitor/pipeline_group/_wait.py
|
azext_monitor_pipeline_group.aaz.latest.monitor.pipeline_group._wait.Wait.PipelineGroupsGet
|
class PipelineGroupsGet(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.Monitor/pipelineGroups/{pipelineGroupName}",
**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(
"pipelineGroupName", self.ctx.args.pipeline_group_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-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.extended_location = AAZObjectType(
serialized_name="extendedLocation",
)
_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()
_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},
)
extended_location = cls._schema_on_200.extended_location
extended_location.name = AAZStrType(
flags={"required": True},
)
extended_location.type = AAZStrType(
flags={"required": True},
)
properties = cls._schema_on_200.properties
properties.exporters = AAZListType(
flags={"required": True},
)
properties.networking_configurations = AAZListType(
serialized_name="networkingConfigurations",
)
properties.processors = AAZListType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.receivers = AAZListType(
flags={"required": True},
)
properties.replicas = AAZIntType()
properties.service = AAZObjectType(
flags={"required": True},
)
exporters = cls._schema_on_200.properties.exporters
exporters.Element = AAZObjectType()
_element = cls._schema_on_200.properties.exporters.Element
_element.azure_monitor_workspace_logs = AAZObjectType(
serialized_name="azureMonitorWorkspaceLogs",
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.tcp = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
azure_monitor_workspace_logs = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs
azure_monitor_workspace_logs.api = AAZObjectType(
flags={"required": True},
)
azure_monitor_workspace_logs.cache = AAZObjectType()
azure_monitor_workspace_logs.concurrency = AAZObjectType()
api = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api
api.data_collection_endpoint_url = AAZStrType(
serialized_name="dataCollectionEndpointUrl",
flags={"required": True},
)
api.data_collection_rule = AAZStrType(
serialized_name="dataCollectionRule",
flags={"required": True},
)
api.schema = AAZObjectType(
flags={"required": True},
)
api.stream = AAZStrType(
flags={"required": True},
)
schema = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema
schema.record_map = AAZListType(
serialized_name="recordMap",
flags={"required": True},
)
schema.resource_map = AAZListType(
serialized_name="resourceMap",
)
schema.scope_map = AAZListType(
serialized_name="scopeMap",
)
record_map = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map
record_map.Element = AAZObjectType()
_element = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.record_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
resource_map = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map
resource_map.Element = AAZObjectType()
_element = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.resource_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
scope_map = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map
scope_map.Element = AAZObjectType()
_element = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.api.schema.scope_map.Element
_element["from"] = AAZStrType(
flags={"required": True},
)
_element.to = AAZStrType(
flags={"required": True},
)
cache = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.cache
cache.max_storage_usage = AAZIntType(
serialized_name="maxStorageUsage",
)
cache.retention_period = AAZIntType(
serialized_name="retentionPeriod",
)
concurrency = cls._schema_on_200.properties.exporters.Element.azure_monitor_workspace_logs.concurrency
concurrency.batch_queue_size = AAZIntType(
serialized_name="batchQueueSize",
)
concurrency.worker_count = AAZIntType(
serialized_name="workerCount",
)
tcp = cls._schema_on_200.properties.exporters.Element.tcp
tcp.url = AAZStrType(
flags={"required": True},
)
networking_configurations = cls._schema_on_200.properties.networking_configurations
networking_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.networking_configurations.Element
_element.external_networking_mode = AAZStrType(
serialized_name="externalNetworkingMode",
flags={"required": True},
)
_element.host = AAZStrType()
_element.routes = AAZListType(
flags={"required": True},
)
routes = cls._schema_on_200.properties.networking_configurations.Element.routes
routes.Element = AAZObjectType()
_element = cls._schema_on_200.properties.networking_configurations.Element.routes.Element
_element.path = AAZStrType()
_element.port = AAZIntType()
_element.receiver = AAZStrType(
flags={"required": True},
)
_element.subdomain = AAZStrType()
processors = cls._schema_on_200.properties.processors
processors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.processors.Element
_element.batch = AAZObjectType()
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
batch = cls._schema_on_200.properties.processors.Element.batch
batch.batch_size = AAZIntType(
serialized_name="batchSize",
)
batch.timeout = AAZIntType()
receivers = cls._schema_on_200.properties.receivers
receivers.Element = AAZObjectType()
_element = cls._schema_on_200.properties.receivers.Element
_element.name = AAZStrType(
flags={"required": True},
)
_element.otlp = AAZObjectType()
_element.syslog = AAZObjectType()
_element.type = AAZStrType(
flags={"required": True},
)
_element.udp = AAZObjectType()
otlp = cls._schema_on_200.properties.receivers.Element.otlp
otlp.endpoint = AAZStrType(
flags={"required": True},
)
syslog = cls._schema_on_200.properties.receivers.Element.syslog
syslog.endpoint = AAZStrType(
flags={"required": True},
)
syslog.protocol = AAZStrType()
udp = cls._schema_on_200.properties.receivers.Element.udp
udp.encoding = AAZStrType()
udp.endpoint = AAZStrType(
flags={"required": True},
)
udp.json_array_mapper = AAZObjectType(
serialized_name="jsonArrayMapper",
)
udp.read_queue_length = AAZIntType(
serialized_name="readQueueLength",
)
json_array_mapper = cls._schema_on_200.properties.receivers.Element.udp.json_array_mapper
json_array_mapper.destination_field = AAZObjectType(
serialized_name="destinationField",
)
json_array_mapper.keys = AAZListType(
flags={"required": True},
)
json_array_mapper.source_field = AAZObjectType(
serialized_name="sourceField",
)
destination_field = cls._schema_on_200.properties.receivers.Element.udp.json_array_mapper.destination_field
destination_field.destination = AAZStrType()
destination_field.field_name = AAZStrType(
serialized_name="fieldName",
)
keys = cls._schema_on_200.properties.receivers.Element.udp.json_array_mapper.keys
keys.Element = AAZStrType()
source_field = cls._schema_on_200.properties.receivers.Element.udp.json_array_mapper.source_field
source_field.field_name = AAZStrType(
serialized_name="fieldName",
)
service = cls._schema_on_200.properties.service
service.persistence = AAZObjectType()
service.pipelines = AAZListType(
flags={"required": True},
)
persistence = cls._schema_on_200.properties.service.persistence
persistence.persistent_volume_name = AAZStrType(
serialized_name="persistentVolumeName",
flags={"required": True},
)
pipelines = cls._schema_on_200.properties.service.pipelines
pipelines.Element = AAZObjectType()
_element = cls._schema_on_200.properties.service.pipelines.Element
_element.exporters = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.processors = AAZListType()
_element.receivers = AAZListType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
exporters = cls._schema_on_200.properties.service.pipelines.Element.exporters
exporters.Element = AAZStrType()
processors = cls._schema_on_200.properties.service.pipelines.Element.processors
processors.Element = AAZStrType()
receivers = cls._schema_on_200.properties.service.pipelines.Element.receivers
receivers.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 PipelineGroupsGet(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 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 404 | 55 | 349 | 56 | 332 | 0 | 174 | 49 | 164 | 2 | 1 | 1 | 11 |
9,368 |
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/monitor-pipeline-group/azext_monitor_pipeline_group/tests/latest/test_monitor_pipeline_group.py
|
azext_monitor_pipeline_group.tests.latest.test_monitor_pipeline_group.MonitorPipelineGroupScenario
|
class MonitorPipelineGroupScenario(ScenarioTest):
@ResourceGroupPreparer()
def test_monitor_pipeline_group(self, resource_group):
import os
data_path = os.path.relpath(os.path.join(
os.path.abspath(__file__), '..', 'data_files'))
self.kwargs.update({
'rg': resource_group,
'name': 'mygroup',
'location': 'eastus2euap',
'exporters_path': os.path.join(data_path, "exporters.json").replace('\\', '\\\\'),
'extended_location_path': os.path.join(data_path, "extendedLocation.json").replace('\\', '\\\\'),
'processors_path': os.path.join(data_path, "processors.json").replace('\\', '\\\\'),
'receivers_path': os.path.join(data_path, "receivers.json").replace('\\', '\\\\'),
'service_path': os.path.join(data_path, "service.json").replace('\\', '\\\\'),
'servicepatch_path': os.path.join(data_path, "servicepatch.json").replace('\\', '\\\\')
})
self.cmd('az monitor pipeline-group create -g {rg} -n {name} -l {location} '
'--exporters @{exporters_path} '
'--processors @{processors_path} '
'--receivers @{receivers_path} '
'--service @{service_path} '
'--extended-location @{extended_location_path} '
'--network-config [] '
'--replicas 1 ',
checks=[self.check('properties.provisioningState', 'Succeeded')])
self.cmd('az monitor pipeline-group show -g {rg} -n {name}', checks=[
self.check('name', '{name}'),
self.check('properties.provisioningState', 'Succeeded')
])
self.cmd('az monitor pipeline-group list -g {rg}', checks=[
self.check('length(@)', 1)
])
self.cmd('az monitor pipeline-group update -g {rg} -n {name} --service @{servicepatch_path}', checks=[
self.check('properties.service.pipelines[0].name', 'MyPipeline2')
])
self.cmd('az monitor pipeline-group delete -g {rg} -n {name} -y')
self.cmd('az monitor pipeline-group list -g {rg}', checks=[
self.check('length(@)', 0)
])
|
class MonitorPipelineGroupScenario(ScenarioTest):
@ResourceGroupPreparer()
def test_monitor_pipeline_group(self, resource_group):
pass
| 3 | 0 | 43 | 6 | 37 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 45 | 6 | 39 | 5 | 35 | 0 | 11 | 4 | 8 | 1 | 1 | 0 | 1 |
9,369 |
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/multicloud-connector/azext_multicloud_connector/custom.py
|
azext_multicloud_connector.custom.customized_generate_aws_template.OutputAwsTemplateToFile
|
class OutputAwsTemplateToFile(_GenAwsTemplate):
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
args_schema = super()._build_arguments_schema(*args, **kwargs)
# Add the --output-directory argument to the schema with an optional argument
args_schema.output_directory = AAZStrArg(
options=["--output-directory"],
help="Directory where the output AWS templated JSON file will be written. Defaults to './AzureArcMulticloudFolder/'.",
nullable=True
)
return args_schema
def pre_operations(self):
register_providers_if_needed(cmd=self.ctx)
super().pre_operations()
def output_response_to_file(self):
raw_response = super()._output()
# Check if 'body' exists and flatten its contents into the parent dictionary
if "body" in raw_response and isinstance(raw_response["body"], dict):
# Merge 'body' contents into the parent structure
body_content = raw_response.pop("body")
raw_response.update(body_content)
output_dir = self.ctx.args.output_directory
# Convert AAZStrArg to a string
if output_dir is not None:
output_dir = output_dir.to_serialized_data()
# Use default directory if the user doesn't provide --output-directory
output_dir = output_dir or "./AzureArcMulticloudFolder"
if not os.path.exists(output_dir):
try:
os.makedirs(output_dir)
logger.info("successfully create the dir")
except Exception as e:
raise ValidationError(
f"Failed to create directory {output_directory}: {str(e)}")
output_file_path = os.path.join(output_dir, 'aws_template.json')
# Write the output in JSON file
try:
with open(output_file_path, 'w') as output_file:
json.dump(raw_response, output_file, indent=4)
logger.debug(
f"Response successfully written to {output_file_path}")
except Exception as e:
raise ValidationError(f"Failed to write response to file: {e}")
def _output(self, *args, **kwargs):
try:
self.output_response_to_file()
return {
"status": "success",
"message": "AWS template was generated and saved successfully. Please check your specified output directory or default to ./AzureArcMulticloudFolder",
}
except Exception as e:
return {
"status": "error",
"message": f"An error occurred: {str(e)}"
}
|
class OutputAwsTemplateToFile(_GenAwsTemplate):
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def pre_operations(self):
pass
def output_response_to_file(self):
pass
def _output(self, *args, **kwargs):
pass
| 6 | 0 | 15 | 3 | 11 | 2 | 3 | 0.13 | 1 | 4 | 0 | 0 | 3 | 0 | 4 | 10 | 66 | 13 | 47 | 14 | 41 | 6 | 36 | 10 | 31 | 6 | 2 | 2 | 10 |
9,370 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_type/_show.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_type._show.Show.SolutionTypesGet
|
class SolutionTypesGet(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.HybridConnectivity/solutionTypes/{solutionType}",
**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(
"solutionType", self.ctx.args.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", "2024-12-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()
_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.description = AAZStrType()
properties.solution_settings = AAZListType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
)
properties.supported_azure_regions = AAZListType(
serialized_name="supportedAzureRegions",
)
solution_settings = cls._schema_on_200.properties.solution_settings
solution_settings.Element = AAZObjectType()
_element = cls._schema_on_200.properties.solution_settings.Element
_element.allowed_values = AAZListType(
serialized_name="allowedValues",
flags={"required": True},
)
_element.default_value = AAZStrType(
serialized_name="defaultValue",
flags={"required": True},
)
_element.description = AAZStrType(
flags={"required": True},
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
allowed_values = cls._schema_on_200.properties.solution_settings.Element.allowed_values
allowed_values.Element = AAZStrType()
supported_azure_regions = cls._schema_on_200.properties.supported_azure_regions
supported_azure_regions.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",
)
return cls._schema_on_200
|
class SolutionTypesGet(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 161 | 20 | 141 | 32 | 124 | 0 | 63 | 25 | 53 | 2 | 1 | 1 | 11 |
9,371 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_type/_list.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_type._list.List.SolutionTypesListBySubscription
|
class SolutionTypesListBySubscription(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.HybridConnectivity/solutionTypes",
**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-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
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()
_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.description = AAZStrType()
properties.solution_settings = AAZListType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
)
properties.supported_azure_regions = AAZListType(
serialized_name="supportedAzureRegions",
)
solution_settings = cls._schema_on_200.value.Element.properties.solution_settings
solution_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.solution_settings.Element
_element.allowed_values = AAZListType(
serialized_name="allowedValues",
flags={"required": True},
)
_element.default_value = AAZStrType(
serialized_name="defaultValue",
flags={"required": True},
)
_element.description = AAZStrType(
flags={"required": True},
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
allowed_values = cls._schema_on_200.value.Element.properties.solution_settings.Element.allowed_values
allowed_values.Element = AAZStrType()
supported_azure_regions = cls._schema_on_200.value.Element.properties.supported_azure_regions
supported_azure_regions.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 SolutionTypesListBySubscription(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 164 | 22 | 142 | 33 | 125 | 0 | 68 | 26 | 58 | 2 | 1 | 1 | 11 |
9,372 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_type/_list.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_type._list.List.SolutionTypesListByResourceGroup
|
class SolutionTypesListByResourceGroup(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.HybridConnectivity/solutionTypes",
**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-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
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()
_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.description = AAZStrType()
properties.solution_settings = AAZListType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
)
properties.supported_azure_regions = AAZListType(
serialized_name="supportedAzureRegions",
)
solution_settings = cls._schema_on_200.value.Element.properties.solution_settings
solution_settings.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.solution_settings.Element
_element.allowed_values = AAZListType(
serialized_name="allowedValues",
flags={"required": True},
)
_element.default_value = AAZStrType(
serialized_name="defaultValue",
flags={"required": True},
)
_element.description = AAZStrType(
flags={"required": True},
)
_element.display_name = AAZStrType(
serialized_name="displayName",
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"required": True},
)
allowed_values = cls._schema_on_200.value.Element.properties.solution_settings.Element.allowed_values
allowed_values.Element = AAZStrType()
supported_azure_regions = cls._schema_on_200.value.Element.properties.supported_azure_regions
supported_azure_regions.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 SolutionTypesListByResourceGroup(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 168 | 22 | 146 | 33 | 129 | 0 | 68 | 26 | 58 | 2 | 1 | 1 | 11 |
9,373 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_update.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._update.Update.SolutionConfigurationsUpdate
|
class SolutionConfigurationsUpdate(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(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"solutionConfiguration", self.ctx.args.name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("solutionSettings",
AAZDictType, ".solution_settings")
properties.set_prop(
"solutionType", AAZStrType, ".solution_type")
solution_settings = _builder.get(".properties.solutionSettings")
if solution_settings is not None:
solution_settings.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.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_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.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.solution_settings = AAZDictType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
flags={"required": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
solution_settings = cls._schema_on_200.properties.solution_settings
solution_settings.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",
)
return cls._schema_on_200
|
class SolutionConfigurationsUpdate(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 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 164 | 21 | 143 | 34 | 124 | 0 | 65 | 26 | 54 | 3 | 1 | 1 | 14 |
9,374 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_sync_now.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._sync_now.SyncNow.SolutionConfigurationsSyncNow
|
class SolutionConfigurationsSyncNow(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(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}/syncNow",
**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(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"solutionConfiguration", self.ctx.args.name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-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()
_SyncNowHelper._build_schema_operation_status_result_read(
cls._schema_on_200)
return cls._schema_on_200
|
class SolutionConfigurationsSyncNow(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 95 | 13 | 82 | 26 | 65 | 0 | 35 | 18 | 25 | 3 | 1 | 1 | 12 |
9,375 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_show.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._show.Show.SolutionConfigurationsGet
|
class SolutionConfigurationsGet(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(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}",
**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(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"solutionConfiguration", self.ctx.args.name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-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()
_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.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.solution_settings = AAZDictType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
flags={"required": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
solution_settings = cls._schema_on_200.properties.solution_settings
solution_settings.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",
)
return cls._schema_on_200
|
class SolutionConfigurationsGet(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 | 13 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 141 | 17 | 124 | 29 | 107 | 0 | 54 | 22 | 44 | 2 | 1 | 1 | 11 |
9,376 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_list.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._list.List.SolutionConfigurationsList
|
class SolutionConfigurationsList(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(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations",
**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(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
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()
_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.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.solution_settings = AAZDictType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
flags={"required": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
solution_settings = cls._schema_on_200.value.Element.properties.solution_settings
solution_settings.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 SolutionConfigurationsList(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 | 148 | 19 | 129 | 31 | 112 | 0 | 59 | 24 | 49 | 2 | 1 | 1 | 11 |
9,377 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_microsoft_datadog_client_enums.py
|
azext_datadog.vendored_sdks.datadog.models._microsoft_datadog_client_enums.MarketplaceSubscriptionStatus
|
class MarketplaceSubscriptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in
time, the resource will go in Suspended state.
"""
PROVISIONING = "Provisioning"
ACTIVE = "Active"
SUSPENDED = "Suspended"
UNSUBSCRIBED = "Unsubscribed"
|
class MarketplaceSubscriptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
'''Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in
time, the resource will go in Suspended state.
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 5 | 5 | 4 | 3 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
9,378 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_delete.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._delete.Delete.SolutionConfigurationsDelete
|
class SolutionConfigurationsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}",
**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(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"solutionConfiguration", self.ctx.args.name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SolutionConfigurationsDelete(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 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 58 | 9 | 49 | 19 | 35 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,379 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_wait.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._wait.Wait.PublicCloudConnectorsGet
|
class PublicCloudConnectorsGet(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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}",
**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(
"publicCloudConnector", self.ctx.args.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-12-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()
_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.aws_cloud_profile = AAZObjectType(
serialized_name="awsCloudProfile",
flags={"required": True},
)
properties.connector_primary_identifier = AAZStrType(
serialized_name="connectorPrimaryIdentifier",
flags={"read_only": True},
)
properties.host_type = AAZStrType(
serialized_name="hostType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
aws_cloud_profile = cls._schema_on_200.properties.aws_cloud_profile
aws_cloud_profile.account_id = AAZStrType(
serialized_name="accountId",
flags={"required": True},
)
aws_cloud_profile.excluded_accounts = AAZListType(
serialized_name="excludedAccounts",
)
aws_cloud_profile.is_organizational_account = AAZBoolType(
serialized_name="isOrganizationalAccount",
)
excluded_accounts = cls._schema_on_200.properties.aws_cloud_profile.excluded_accounts
excluded_accounts.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 PublicCloudConnectorsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 157 | 19 | 138 | 31 | 121 | 0 | 60 | 24 | 50 | 2 | 1 | 1 | 11 |
9,380 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_update.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._update.Update.PublicCloudConnectorsUpdate
|
class PublicCloudConnectorsUpdate(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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"publicCloudConnector", self.ctx.args.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-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("awsCloudProfile",
AAZObjectType, ".aws_cloud_profile")
aws_cloud_profile = _builder.get(".properties.awsCloudProfile")
if aws_cloud_profile is not None:
aws_cloud_profile.set_prop(
"excludedAccounts", AAZListType, ".excluded_accounts")
excluded_accounts = _builder.get(
".properties.awsCloudProfile.excludedAccounts")
if excluded_accounts is not None:
excluded_accounts.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(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()
_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.aws_cloud_profile = AAZObjectType(
serialized_name="awsCloudProfile",
flags={"required": True},
)
properties.connector_primary_identifier = AAZStrType(
serialized_name="connectorPrimaryIdentifier",
flags={"read_only": True},
)
properties.host_type = AAZStrType(
serialized_name="hostType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
aws_cloud_profile = cls._schema_on_200.properties.aws_cloud_profile
aws_cloud_profile.account_id = AAZStrType(
serialized_name="accountId",
flags={"required": True},
)
aws_cloud_profile.excluded_accounts = AAZListType(
serialized_name="excludedAccounts",
)
aws_cloud_profile.is_organizational_account = AAZBoolType(
serialized_name="isOrganizationalAccount",
)
excluded_accounts = cls._schema_on_200.properties.aws_cloud_profile.excluded_accounts
excluded_accounts.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 PublicCloudConnectorsUpdate(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 | 17 | 1 | 15 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 188 | 25 | 163 | 38 | 144 | 0 | 77 | 30 | 66 | 5 | 1 | 1 | 16 |
9,381 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_test_permission.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._test_permission.TestPermission.PublicCloudConnectorsTestPermissions
|
class PublicCloudConnectorsTestPermissions(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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}/testPermissions",
**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(
"publicCloudConnector", self.ctx.args.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-12-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()
_TestPermissionHelper._build_schema_operation_status_result_read(
cls._schema_on_200)
return cls._schema_on_200
|
class PublicCloudConnectorsTestPermissions(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 | 8 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 1 | 9 | 9 | 98 | 13 | 85 | 26 | 68 | 0 | 35 | 18 | 25 | 3 | 1 | 1 | 12 |
9,382 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_list.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._list.List.PublicCloudConnectorsListBySubscription
|
class PublicCloudConnectorsListBySubscription(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.HybridConnectivity/publicCloudConnectors",
**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-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_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.aws_cloud_profile = AAZObjectType(
serialized_name="awsCloudProfile",
flags={"required": True},
)
properties.connector_primary_identifier = AAZStrType(
serialized_name="connectorPrimaryIdentifier",
flags={"read_only": True},
)
properties.host_type = AAZStrType(
serialized_name="hostType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
aws_cloud_profile = cls._schema_on_200.value.Element.properties.aws_cloud_profile
aws_cloud_profile.account_id = AAZStrType(
serialized_name="accountId",
flags={"required": True},
)
aws_cloud_profile.excluded_accounts = AAZListType(
serialized_name="excludedAccounts",
)
aws_cloud_profile.is_organizational_account = AAZBoolType(
serialized_name="isOrganizationalAccount",
)
excluded_accounts = cls._schema_on_200.value.Element.properties.aws_cloud_profile.excluded_accounts
excluded_accounts.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 PublicCloudConnectorsListBySubscription(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 | 16 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 160 | 21 | 139 | 33 | 122 | 0 | 65 | 26 | 55 | 2 | 1 | 1 | 11 |
9,383 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_list.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._list.List.PublicCloudConnectorsListByResourceGroup
|
class PublicCloudConnectorsListByResourceGroup(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.HybridConnectivity/publicCloudConnectors",
**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-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
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.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_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.aws_cloud_profile = AAZObjectType(
serialized_name="awsCloudProfile",
flags={"required": True},
)
properties.connector_primary_identifier = AAZStrType(
serialized_name="connectorPrimaryIdentifier",
flags={"read_only": True},
)
properties.host_type = AAZStrType(
serialized_name="hostType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
aws_cloud_profile = cls._schema_on_200.value.Element.properties.aws_cloud_profile
aws_cloud_profile.account_id = AAZStrType(
serialized_name="accountId",
flags={"required": True},
)
aws_cloud_profile.excluded_accounts = AAZListType(
serialized_name="excludedAccounts",
)
aws_cloud_profile.is_organizational_account = AAZBoolType(
serialized_name="isOrganizationalAccount",
)
excluded_accounts = cls._schema_on_200.value.Element.properties.aws_cloud_profile.excluded_accounts
excluded_accounts.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 PublicCloudConnectorsListByResourceGroup(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 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 164 | 21 | 143 | 33 | 126 | 0 | 65 | 26 | 55 | 2 | 1 | 1 | 11 |
9,384 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_delete.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._delete.Delete.PublicCloudConnectorsDelete
|
class PublicCloudConnectorsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}",
**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(
"publicCloudConnector", self.ctx.args.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-12-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class PublicCloudConnectorsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 61 | 9 | 52 | 19 | 38 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,385 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/public_cloud_connector/_create.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.public_cloud_connector._create.Create.PublicCloudConnectorsCreateOrUpdate
|
class PublicCloudConnectorsCreateOrUpdate(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.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}",
**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(
"publicCloudConnector", self.ctx.args.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-12-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)
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("awsCloudProfile", AAZObjectType, ".aws_cloud_profile", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("hostType", AAZStrType, ".host_type", typ_kwargs={
"flags": {"required": True}})
aws_cloud_profile = _builder.get(".properties.awsCloudProfile")
if aws_cloud_profile is not None:
aws_cloud_profile.set_prop("accountId", AAZStrType, ".account_id", typ_kwargs={
"flags": {"required": True}})
aws_cloud_profile.set_prop(
"excludedAccounts", AAZListType, ".excluded_accounts")
aws_cloud_profile.set_prop(
"isOrganizationalAccount", AAZBoolType, ".is_organizational_account")
excluded_accounts = _builder.get(
".properties.awsCloudProfile.excludedAccounts")
if excluded_accounts is not None:
excluded_accounts.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.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType()
_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.aws_cloud_profile = AAZObjectType(
serialized_name="awsCloudProfile",
flags={"required": True},
)
properties.connector_primary_identifier = AAZStrType(
serialized_name="connectorPrimaryIdentifier",
flags={"read_only": True},
)
properties.host_type = AAZStrType(
serialized_name="hostType",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
aws_cloud_profile = cls._schema_on_200_201.properties.aws_cloud_profile
aws_cloud_profile.account_id = AAZStrType(
serialized_name="accountId",
flags={"required": True},
)
aws_cloud_profile.excluded_accounts = AAZListType(
serialized_name="excludedAccounts",
)
aws_cloud_profile.is_organizational_account = AAZBoolType(
serialized_name="isOrganizationalAccount",
)
excluded_accounts = cls._schema_on_200_201.properties.aws_cloud_profile.excluded_accounts
excluded_accounts.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 PublicCloudConnectorsCreateOrUpdate(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 | 19 | 1 | 17 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 208 | 25 | 183 | 39 | 164 | 0 | 83 | 30 | 72 | 5 | 1 | 1 | 17 |
9,386 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/_generate_aws_template.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud._generate_aws_template.GenerateAwsTemplate.GenerateAwsTemplatePost
|
class GenerateAwsTemplatePost(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.HybridConnectivity/generateAwsTemplate",
**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(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-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("connectorId", AAZStrType, ".connector_id", typ_kwargs={
"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZFreeFormDictType()
return cls._schema_on_200
|
class GenerateAwsTemplatePost(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 | 7 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 87 | 15 | 72 | 28 | 53 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
9,387 |
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/multicloud-connector/azext_multicloud_connector/aaz/latest/arc_multicloud/solution_configuration/_create.py
|
azext_multicloud_connector.aaz.latest.arc_multicloud.solution_configuration._create.Create.SolutionConfigurationsCreateOrUpdate
|
class SolutionConfigurationsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}",
**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(
"resourceUri", self.ctx.args.connector_id,
skip_quote=True,
required=True,
),
**self.serialize_url_param(
"solutionConfiguration", self.ctx.args.name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-12-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("solutionSettings",
AAZDictType, ".solution_settings")
properties.set_prop("solutionType", AAZStrType, ".solution_type", typ_kwargs={
"flags": {"required": True}})
solution_settings = _builder.get(".properties.solutionSettings")
if solution_settings is not None:
solution_settings.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.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType()
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.solution_settings = AAZDictType(
serialized_name="solutionSettings",
)
properties.solution_type = AAZStrType(
serialized_name="solutionType",
flags={"required": True},
)
properties.status = AAZStrType(
flags={"read_only": True},
)
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
solution_settings = cls._schema_on_200_201.properties.solution_settings
solution_settings.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",
)
return cls._schema_on_200_201
|
class SolutionConfigurationsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 164 | 21 | 143 | 34 | 124 | 0 | 65 | 26 | 54 | 3 | 1 | 1 | 14 |
9,388 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/models/_microsoft_datadog_client_enums.py
|
azext_datadog.vendored_sdks.datadog.models._microsoft_datadog_client_enums.ManagedIdentityTypes
|
class ManagedIdentityTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Identity type
"""
SYSTEM_ASSIGNED = "SystemAssigned"
USER_ASSIGNED = "UserAssigned"
|
class ManagedIdentityTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
'''Identity type
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.67 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 3 | 3 | 2 | 2 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
9,389 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_tag_rules_operations.py
|
azext_datadog.vendored_sdks.datadog.aio.operations._tag_rules_operations.TagRulesOperations
|
class TagRulesOperations:
"""TagRulesOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_datadog_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def list(
self,
resource_group_name: str,
monitor_name: str,
**kwargs
) -> AsyncIterable["models.MonitoringTagRulesListResponse"]:
"""List the tag rules for a given monitor resource.
List the tag rules for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either MonitoringTagRulesListResponse or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_datadog_client.models.MonitoringTagRulesListResponse]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.MonitoringTagRulesListResponse"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
async def extract_data(pipeline_response):
deserialized = self._deserialize('MonitoringTagRulesListResponse', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)
async def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize(models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules'} # type: ignore
async def create_or_update(
self,
resource_group_name: str,
monitor_name: str,
rule_set_name: str,
body: Optional["models.MonitoringTagRules"] = None,
**kwargs
) -> "models.MonitoringTagRules":
"""Create or update a tag rule set for a given monitor resource.
Create or update a tag rule set for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param rule_set_name: Rule set name.
:type rule_set_name: str
:param body:
:type body: ~microsoft_datadog_client.models.MonitoringTagRules
:keyword callable cls: A custom type or function that will be passed the direct response
:return: MonitoringTagRules, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.MonitoringTagRules
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.MonitoringTagRules"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
if body is not None:
body_content = self._serialize.body(body, 'MonitoringTagRules')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('MonitoringTagRules', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName}'} # type: ignore
async def get(
self,
resource_group_name: str,
monitor_name: str,
rule_set_name: str,
**kwargs
) -> "models.MonitoringTagRules":
"""Get a tag rule set for a given monitor resource.
Get a tag rule set for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param rule_set_name: Rule set name.
:type rule_set_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: MonitoringTagRules, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.MonitoringTagRules
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.MonitoringTagRules"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
'ruleSetName': self._serialize.url("rule_set_name", rule_set_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('MonitoringTagRules', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName}'}
|
class TagRulesOperations:
'''TagRulesOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_datadog_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
'''
def __init__(self, client, config, serializer, deserializer) -> None:
pass
def list(
self,
resource_group_name: str,
monitor_name: str,
**kwargs
) -> AsyncIterable["models.MonitoringTagRulesListResponse"]:
'''List the tag rules for a given monitor resource.
List the tag rules for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either MonitoringTagRulesListResponse or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_datadog_client.models.MonitoringTagRulesListResponse]
:raises: ~azure.core.exceptions.HttpResponseError
'''
pass
def prepare_request(next_link=None):
pass
async def extract_data(pipeline_response):
pass
async def get_next(next_link=None):
pass
async def create_or_update(
self,
resource_group_name: str,
monitor_name: str,
rule_set_name: str,
body: Optional["models.MonitoringTagRules"] = None,
**kwargs
) -> "models.MonitoringTagRules":
'''Create or update a tag rule set for a given monitor resource.
Create or update a tag rule set for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param rule_set_name: Rule set name.
:type rule_set_name: str
:param body:
:type body: ~microsoft_datadog_client.models.MonitoringTagRules
:keyword callable cls: A custom type or function that will be passed the direct response
:return: MonitoringTagRules, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.MonitoringTagRules
:raises: ~azure.core.exceptions.HttpResponseError
'''
pass
async def get_next(next_link=None):
'''Get a tag rule set for a given monitor resource.
Get a tag rule set for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param rule_set_name: Rule set name.
:type rule_set_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: MonitoringTagRules, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.MonitoringTagRules
:raises: ~azure.core.exceptions.HttpResponseError
'''
pass
| 8 | 4 | 37 | 5 | 25 | 10 | 2 | 0.52 | 0 | 1 | 0 | 0 | 4 | 4 | 4 | 4 | 239 | 38 | 143 | 75 | 117 | 75 | 101 | 57 | 93 | 4 | 0 | 1 | 15 |
9,390 |
Azure/azure-cli-extensions
|
src/datadog/azext_datadog/vendored_sdks/datadog/aio/operations/_single_sign_on_configurations_operations.py
|
azext_datadog.vendored_sdks.datadog.aio.operations._single_sign_on_configurations_operations.SingleSignOnConfigurationsOperations
|
class SingleSignOnConfigurationsOperations:
"""SingleSignOnConfigurationsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_datadog_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def list(
self,
resource_group_name: str,
monitor_name: str,
**kwargs
) -> AsyncIterable["models.DatadogSingleSignOnResourceListResponse"]:
"""List the single sign-on configurations for a given monitor resource.
List the single sign-on configurations for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DatadogSingleSignOnResourceListResponse or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_datadog_client.models.DatadogSingleSignOnResourceListResponse]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatadogSingleSignOnResourceListResponse"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
accept = "application/json"
def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
request = self._client.get(url, query_parameters, header_parameters)
return request
async def extract_data(pipeline_response):
deserialized = self._deserialize('DatadogSingleSignOnResourceListResponse', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)
async def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
error = self._deserialize(models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
return pipeline_response
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations'} # type: ignore
async def _create_or_update_initial(
self,
resource_group_name: str,
monitor_name: str,
configuration_name: str,
body: Optional["models.DatadogSingleSignOnResource"] = None,
**kwargs
) -> "models.DatadogSingleSignOnResource":
cls = kwargs.pop('cls', None) # type: ClsType["models.DatadogSingleSignOnResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self._create_or_update_initial.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
if body is not None:
body_content = self._serialize.body(body, 'DatadogSingleSignOnResource')
else:
body_content = None
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response)
if response.status_code == 201:
deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
_create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}'} # type: ignore
async def begin_create_or_update(
self,
resource_group_name: str,
monitor_name: str,
configuration_name: str,
body: Optional["models.DatadogSingleSignOnResource"] = None,
**kwargs
) -> AsyncLROPoller["models.DatadogSingleSignOnResource"]:
"""Configures single-sign-on for this resource.
Configures single-sign-on for this resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param configuration_name: Configuration name.
:type configuration_name: str
:param body:
:type body: ~microsoft_datadog_client.models.DatadogSingleSignOnResource
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either DatadogSingleSignOnResource or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~microsoft_datadog_client.models.DatadogSingleSignOnResource]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.DatadogSingleSignOnResource"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
)
cont_token = kwargs.pop('continuation_token', None) # type: Optional[str]
if cont_token is None:
raw_result = await self._create_or_update_initial(
resource_group_name=resource_group_name,
monitor_name=monitor_name,
configuration_name=configuration_name,
body=body,
cls=lambda x,y,z: x,
**kwargs
)
kwargs.pop('error_map', None)
kwargs.pop('content_type', None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'),
}
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
return AsyncLROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output
)
else:
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)
begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}'} # type: ignore
async def get(
self,
resource_group_name: str,
monitor_name: str,
configuration_name: str,
**kwargs
) -> "models.DatadogSingleSignOnResource":
"""Gets the datadog single sign-on resource for the given Monitor.
Gets the datadog single sign-on resource for the given Monitor.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param configuration_name: Configuration name.
:type configuration_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatadogSingleSignOnResource, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.DatadogSingleSignOnResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatadogSingleSignOnResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'monitorName': self._serialize.url("monitor_name", monitor_name, 'str'),
'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('DatadogSingleSignOnResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}'}
|
class SingleSignOnConfigurationsOperations:
'''SingleSignOnConfigurationsOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_datadog_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
'''
def __init__(self, client, config, serializer, deserializer) -> None:
pass
def list(
self,
resource_group_name: str,
monitor_name: str,
**kwargs
) -> AsyncIterable["models.DatadogSingleSignOnResourceListResponse"]:
'''List the single sign-on configurations for a given monitor resource.
List the single sign-on configurations for a given monitor resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DatadogSingleSignOnResourceListResponse or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_datadog_client.models.DatadogSingleSignOnResourceListResponse]
:raises: ~azure.core.exceptions.HttpResponseError
'''
pass
def prepare_request(next_link=None):
pass
async def extract_data(pipeline_response):
pass
async def get_next(next_link=None):
pass
async def _create_or_update_initial(
self,
resource_group_name: str,
monitor_name: str,
configuration_name: str,
body: Optional["models.DatadogSingleSignOnResource"] = None,
**kwargs
) -> "models.DatadogSingleSignOnResource":
pass
async def begin_create_or_update(
self,
resource_group_name: str,
monitor_name: str,
configuration_name: str,
body: Optional["models.DatadogSingleSignOnResource"] = None,
**kwargs
) -> AsyncLROPoller["models.DatadogSingleSignOnResource"]:
'''Configures single-sign-on for this resource.
Configures single-sign-on for this resource.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param configuration_name: Configuration name.
:type configuration_name: str
:param body:
:type body: ~microsoft_datadog_client.models.DatadogSingleSignOnResource
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either DatadogSingleSignOnResource or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~microsoft_datadog_client.models.DatadogSingleSignOnResource]
:raises ~azure.core.exceptions.HttpResponseError:
'''
pass
def get_long_running_output(pipeline_response):
pass
async def get_next(next_link=None):
'''Gets the datadog single sign-on resource for the given Monitor.
Gets the datadog single sign-on resource for the given Monitor.
:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param monitor_name: Monitor resource name.
:type monitor_name: str
:param configuration_name: Configuration name.
:type configuration_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DatadogSingleSignOnResource, or the result of cls(response)
:rtype: ~microsoft_datadog_client.models.DatadogSingleSignOnResource
:raises: ~azure.core.exceptions.HttpResponseError
'''
pass
| 10 | 4 | 36 | 5 | 25 | 9 | 3 | 0.43 | 0 | 1 | 0 | 0 | 5 | 4 | 5 | 5 | 304 | 45 | 196 | 92 | 161 | 84 | 127 | 67 | 117 | 6 | 0 | 1 | 24 |
9,391 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/__cmd_group.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Commands to manage databricks workspace private endpoint connections.
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Commands to manage databricks workspace private endpoint connections.
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,392 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_create.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._create.Create
|
class Create(AAZCommand):
"""Create the status of a private endpoint connection with the specified name
"""
_aaz_info = {
"version": "2024-05-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections/{}", "2024-05-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.name = AAZStrArg(
options=["-n", "--name"],
help="The name of the private endpoint connection",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
# define Arg Group "Private Link Service Connection State"
_args_schema = cls._args_schema
_args_schema.description = AAZStrArg(
options=["--description"],
arg_group="Private Link Service Connection State",
help="The description for the current state of a private endpoint connection",
)
_args_schema.status = AAZStrArg(
options=["--status"],
arg_group="Private Link Service Connection State",
help="The status of a private endpoint connection",
required=True,
enum={"Approved": "Approved", "Disconnected": "Disconnected", "Pending": "Pending", "Rejected": "Rejected"},
)
# define Arg Group "PrivateLinkServiceConnectionState"
_args_schema = cls._args_schema
_args_schema.actions_required = AAZStrArg(
options=["--actions-required"],
arg_group="PrivateLinkServiceConnectionState",
help="Actions required for a private endpoint connection",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.group_ids = AAZListArg(
options=["--group-ids"],
arg_group="Properties",
help="GroupIds from the private link service resource.",
)
group_ids = cls._args_schema.group_ids
group_ids.Element = AAZStrArg()
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.PrivateEndpointConnectionsCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class PrivateEndpointConnectionsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("groupIds", AAZListType, ".group_ids")
properties.set_prop("privateLinkServiceConnectionState", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
group_ids = _builder.get(".properties.groupIds")
if group_ids is not None:
group_ids.set_elements(AAZStrType, ".")
private_link_service_connection_state = _builder.get(".properties.privateLinkServiceConnectionState")
if private_link_service_connection_state is not None:
private_link_service_connection_state.set_prop("actionsRequired", AAZStrType, ".actions_required")
private_link_service_connection_state.set_prop("description", AAZStrType, ".description")
private_link_service_connection_state.set_prop("status", AAZStrType, ".status", typ_kwargs={"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_CreateHelper._build_schema_private_endpoint_connection_read(cls._schema_on_200)
return cls._schema_on_200
|
class Create(AAZCommand):
'''Create the status of a private endpoint connection with the specified name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class PrivateEndpointConnectionsCreate(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
| 29 | 1 | 12 | 1 | 10 | 0 | 1 | 0.03 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 232 | 37 | 189 | 48 | 160 | 6 | 87 | 36 | 69 | 4 | 1 | 1 | 23 |
9,393 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_create.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._create._CreateHelper
|
class _CreateHelper:
"""Helper class for Create"""
_schema_private_endpoint_connection_read = None
@classmethod
def _build_schema_private_endpoint_connection_read(cls, _schema):
if cls._schema_private_endpoint_connection_read is not None:
_schema.id = cls._schema_private_endpoint_connection_read.id
_schema.name = cls._schema_private_endpoint_connection_read.name
_schema.properties = cls._schema_private_endpoint_connection_read.properties
_schema.type = cls._schema_private_endpoint_connection_read.type
return
cls._schema_private_endpoint_connection_read = _schema_private_endpoint_connection_read = AAZObjectType()
private_endpoint_connection_read = _schema_private_endpoint_connection_read
private_endpoint_connection_read.id = AAZStrType(
flags={"read_only": True},
)
private_endpoint_connection_read.name = AAZStrType(
flags={"read_only": True},
)
private_endpoint_connection_read.properties = AAZObjectType(
flags={"required": True},
)
private_endpoint_connection_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_private_endpoint_connection_read.properties
properties.group_ids = AAZListType(
serialized_name="groupIds",
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
)
properties.private_link_service_connection_state = AAZObjectType(
serialized_name="privateLinkServiceConnectionState",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
group_ids = _schema_private_endpoint_connection_read.properties.group_ids
group_ids.Element = AAZStrType()
private_endpoint = _schema_private_endpoint_connection_read.properties.private_endpoint
private_endpoint.id = AAZStrType(
flags={"read_only": True},
)
private_link_service_connection_state = _schema_private_endpoint_connection_read.properties.private_link_service_connection_state
private_link_service_connection_state.actions_required = AAZStrType(
serialized_name="actionsRequired",
)
private_link_service_connection_state.description = AAZStrType()
private_link_service_connection_state.status = AAZStrType(
flags={"required": True},
)
_schema.id = cls._schema_private_endpoint_connection_read.id
_schema.name = cls._schema_private_endpoint_connection_read.name
_schema.properties = cls._schema_private_endpoint_connection_read.properties
_schema.type = cls._schema_private_endpoint_connection_read.type
|
class _CreateHelper:
'''Helper class for Create'''
@classmethod
def _build_schema_private_endpoint_connection_read(cls, _schema):
pass
| 3 | 1 | 61 | 7 | 54 | 0 | 2 | 0.02 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 67 | 9 | 57 | 10 | 54 | 1 | 32 | 8 | 30 | 2 | 0 | 1 | 2 |
9,394 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_delete.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._delete.Delete
|
class Delete(AAZCommand):
"""Delete private endpoint connection with the specified name
"""
_aaz_info = {
"version": "2024-05-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections/{}", "2024-05-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.name = AAZStrArg(
options=["-n", "--name"],
help="The name of the private endpoint connection",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
id_part="name",
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.PrivateEndpointConnectionsDelete(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class PrivateEndpointConnectionsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**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(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class Delete(AAZCommand):
'''Delete private endpoint connection with the specified name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class PrivateEndpointConnectionsDelete(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
| 23 | 1 | 9 | 0 | 8 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 4 | 0 | 5 | 5 | 150 | 20 | 127 | 33 | 104 | 3 | 52 | 24 | 37 | 4 | 1 | 1 | 17 |
9,395 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_list.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._list.List
|
class List(AAZCommand):
"""List private endpoint connections of the workspace
"""
_aaz_info = {
"version": "2024-05-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections", "2024-05-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.PrivateEndpointConnectionsList(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class PrivateEndpointConnectionsList(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.Databricks/workspaces/{workspaceName}/privateEndpointConnections",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.group_ids = AAZListType(
serialized_name="groupIds",
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
)
properties.private_link_service_connection_state = AAZObjectType(
serialized_name="privateLinkServiceConnectionState",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
group_ids = cls._schema_on_200.value.Element.properties.group_ids
group_ids.Element = AAZStrType()
private_endpoint = cls._schema_on_200.value.Element.properties.private_endpoint
private_endpoint.id = AAZStrType(
flags={"read_only": True},
)
private_link_service_connection_state = cls._schema_on_200.value.Element.properties.private_link_service_connection_state
private_link_service_connection_state.actions_required = AAZStrType(
serialized_name="actionsRequired",
)
private_link_service_connection_state.description = AAZStrType()
private_link_service_connection_state.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class List(AAZCommand):
'''List private endpoint connections of the workspace
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class PrivateEndpointConnectionsList(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
| 27 | 1 | 10 | 1 | 9 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 197 | 32 | 162 | 48 | 135 | 3 | 82 | 38 | 65 | 2 | 1 | 1 | 18 |
9,396 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_show.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._show.Show
|
class Show(AAZCommand):
"""Get a private endpoint connection properties for a workspace
"""
_aaz_info = {
"version": "2024-05-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections/{}", "2024-05-01"],
]
}
def _handler(self, command_args):
super()._handler(command_args)
self._execute_operations()
return self._output()
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.name = AAZStrArg(
options=["-n", "--name"],
help="The name of the private endpoint connection",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
id_part="name",
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.PrivateEndpointConnectionsGet(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class PrivateEndpointConnectionsGet(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.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**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(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-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},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.group_ids = AAZListType(
serialized_name="groupIds",
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
)
properties.private_link_service_connection_state = AAZObjectType(
serialized_name="privateLinkServiceConnectionState",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
group_ids = cls._schema_on_200.properties.group_ids
group_ids.Element = AAZStrType()
private_endpoint = cls._schema_on_200.properties.private_endpoint
private_endpoint.id = AAZStrType(
flags={"read_only": True},
)
private_link_service_connection_state = cls._schema_on_200.properties.private_link_service_connection_state
private_link_service_connection_state.actions_required = AAZStrType(
serialized_name="actionsRequired",
)
private_link_service_connection_state.description = AAZStrType()
private_link_service_connection_state.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class Show(AAZCommand):
'''Get a private endpoint connection properties for a workspace
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class PrivateEndpointConnectionsGet(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
| 27 | 1 | 10 | 1 | 10 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 197 | 29 | 165 | 44 | 138 | 3 | 77 | 34 | 60 | 2 | 1 | 1 | 18 |
9,397 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_update.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._update.Update
|
class Update(AAZCommand):
"""Update the status of a private endpoint connection with the specified name
"""
_aaz_info = {
"version": "2024-05-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections/{}", "2024-05-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
AZ_SUPPORT_GENERIC_UPDATE = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.name = AAZStrArg(
options=["-n", "--name"],
help="The name of the private endpoint connection",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
id_part="name",
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
# define Arg Group "Private Link Service Connection State"
_args_schema = cls._args_schema
_args_schema.description = AAZStrArg(
options=["--description"],
arg_group="Private Link Service Connection State",
help="The description for the current state of a private endpoint connection",
nullable=True,
)
_args_schema.status = AAZStrArg(
options=["--status"],
arg_group="Private Link Service Connection State",
help="The status of a private endpoint connection",
enum={"Approved": "Approved", "Disconnected": "Disconnected", "Pending": "Pending", "Rejected": "Rejected"},
)
# define Arg Group "PrivateLinkServiceConnectionState"
_args_schema = cls._args_schema
_args_schema.actions_required = AAZStrArg(
options=["--actions-required"],
arg_group="PrivateLinkServiceConnectionState",
help="Actions required for a private endpoint connection",
nullable=True,
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.group_ids = AAZListArg(
options=["--group-ids"],
arg_group="Properties",
help="GroupIds from the private link service resource.",
nullable=True,
)
group_ids = cls._args_schema.group_ids
group_ids.Element = AAZStrArg(
nullable=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.PrivateEndpointConnectionsGet(ctx=self.ctx)()
self.pre_instance_update(self.ctx.vars.instance)
self.InstanceUpdateByJson(ctx=self.ctx)()
self.InstanceUpdateByGeneric(ctx=self.ctx)()
self.post_instance_update(self.ctx.vars.instance)
yield self.PrivateEndpointConnectionsCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class PrivateEndpointConnectionsGet(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.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**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(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-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_private_endpoint_connection_read(cls._schema_on_200)
return cls._schema_on_200
class PrivateEndpointConnectionsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-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(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_private_endpoint_connection_read(cls._schema_on_200)
return cls._schema_on_200
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}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("groupIds", AAZListType, ".group_ids")
properties.set_prop("privateLinkServiceConnectionState", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
group_ids = _builder.get(".properties.groupIds")
if group_ids is not None:
group_ids.set_elements(AAZStrType, ".")
private_link_service_connection_state = _builder.get(".properties.privateLinkServiceConnectionState")
if private_link_service_connection_state is not None:
private_link_service_connection_state.set_prop("actionsRequired", AAZStrType, ".actions_required")
private_link_service_connection_state.set_prop("description", AAZStrType, ".description")
private_link_service_connection_state.set_prop("status", AAZStrType, ".status", typ_kwargs={"flags": {"required": True}})
return _instance_value
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance_by_generic(
self.ctx.vars.instance,
self.ctx.generic_update_args
)
|
class Update(AAZCommand):
'''Update the status of a private endpoint connection with the specified name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
pass
class PrivateEndpointConnectionsGet(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
class PrivateEndpointConnectionsCreate(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
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
| 55 | 1 | 9 | 1 | 9 | 0 | 1 | 0.02 | 1 | 5 | 4 | 0 | 7 | 0 | 8 | 8 | 361 | 60 | 295 | 84 | 240 | 6 | 139 | 63 | 104 | 4 | 1 | 1 | 39 |
9,398 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_update.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._update._UpdateHelper
|
class _UpdateHelper:
"""Helper class for Update"""
_schema_private_endpoint_connection_read = None
@classmethod
def _build_schema_private_endpoint_connection_read(cls, _schema):
if cls._schema_private_endpoint_connection_read is not None:
_schema.id = cls._schema_private_endpoint_connection_read.id
_schema.name = cls._schema_private_endpoint_connection_read.name
_schema.properties = cls._schema_private_endpoint_connection_read.properties
_schema.type = cls._schema_private_endpoint_connection_read.type
return
cls._schema_private_endpoint_connection_read = _schema_private_endpoint_connection_read = AAZObjectType()
private_endpoint_connection_read = _schema_private_endpoint_connection_read
private_endpoint_connection_read.id = AAZStrType(
flags={"read_only": True},
)
private_endpoint_connection_read.name = AAZStrType(
flags={"read_only": True},
)
private_endpoint_connection_read.properties = AAZObjectType(
flags={"required": True},
)
private_endpoint_connection_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_private_endpoint_connection_read.properties
properties.group_ids = AAZListType(
serialized_name="groupIds",
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
)
properties.private_link_service_connection_state = AAZObjectType(
serialized_name="privateLinkServiceConnectionState",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
group_ids = _schema_private_endpoint_connection_read.properties.group_ids
group_ids.Element = AAZStrType()
private_endpoint = _schema_private_endpoint_connection_read.properties.private_endpoint
private_endpoint.id = AAZStrType(
flags={"read_only": True},
)
private_link_service_connection_state = _schema_private_endpoint_connection_read.properties.private_link_service_connection_state
private_link_service_connection_state.actions_required = AAZStrType(
serialized_name="actionsRequired",
)
private_link_service_connection_state.description = AAZStrType()
private_link_service_connection_state.status = AAZStrType(
flags={"required": True},
)
_schema.id = cls._schema_private_endpoint_connection_read.id
_schema.name = cls._schema_private_endpoint_connection_read.name
_schema.properties = cls._schema_private_endpoint_connection_read.properties
_schema.type = cls._schema_private_endpoint_connection_read.type
|
class _UpdateHelper:
'''Helper class for Update'''
@classmethod
def _build_schema_private_endpoint_connection_read(cls, _schema):
pass
| 3 | 1 | 61 | 7 | 54 | 0 | 2 | 0.02 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 67 | 9 | 57 | 10 | 54 | 1 | 32 | 8 | 30 | 2 | 0 | 1 | 2 |
9,399 |
Azure/azure-cli-extensions
|
src/databricks/azext_databricks/aaz/latest/databricks/workspace/private_endpoint_connection/_wait.py
|
azext_databricks.aaz.latest.databricks.workspace.private_endpoint_connection._wait.Wait
|
class Wait(AAZWaitCommand):
"""Place the CLI in a waiting state until a condition is met.
"""
_aaz_info = {
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.databricks/workspaces/{}/privateendpointconnections/{}", "2024-05-01"],
]
}
def _handler(self, command_args):
super()._handler(command_args)
self._execute_operations()
return self._output()
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.name = AAZStrArg(
options=["-n", "--name"],
help="The name of the private endpoint connection",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.workspace_name = AAZStrArg(
options=["--workspace-name"],
help="The name of the workspace.",
required=True,
id_part="name",
fmt=AAZStrArgFormat(
max_length=64,
min_length=3,
),
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.PrivateEndpointConnectionsGet(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False)
return result
class PrivateEndpointConnectionsGet(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.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
**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(
"privateEndpointConnectionName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"workspaceName", self.ctx.args.workspace_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-05-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},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.group_ids = AAZListType(
serialized_name="groupIds",
)
properties.private_endpoint = AAZObjectType(
serialized_name="privateEndpoint",
)
properties.private_link_service_connection_state = AAZObjectType(
serialized_name="privateLinkServiceConnectionState",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
group_ids = cls._schema_on_200.properties.group_ids
group_ids.Element = AAZStrType()
private_endpoint = cls._schema_on_200.properties.private_endpoint
private_endpoint.id = AAZStrType(
flags={"read_only": True},
)
private_link_service_connection_state = cls._schema_on_200.properties.private_link_service_connection_state
private_link_service_connection_state.actions_required = AAZStrType(
serialized_name="actionsRequired",
)
private_link_service_connection_state.description = AAZStrType()
private_link_service_connection_state.status = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class Wait(AAZWaitCommand):
'''Place the CLI in a waiting state until a condition is met.
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class PrivateEndpointConnectionsGet(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
| 27 | 1 | 10 | 1 | 10 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 196 | 29 | 164 | 44 | 137 | 3 | 77 | 34 | 60 | 2 | 1 | 1 | 18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.